bigman1208000 / SmartPlasma

Plasma, Plasma Cash & Plasma XT implementation in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status GoDoc

SmartPlasma

Plasma, Plasma Cash & Plasma XT implementation in Go

Tests

For Linux and Mac

cd $GOPATH/src/github.com/bigman1208000/SmartPlasma
go test -v ./... -count=1

Examples

Simple example

The test demonstrates:

  • creation of a deposit in Plasma Cash
  • transfer between users
  • withdrawal of tokens from Plasma Cash

Information is not displayed in the console, see comments in code.

For Linux and Mac

cd $GOPATH/src/github.com/bigman1208000/SmartPlasma/example/simple
go run example.go

Cycle example

  • Total 1000 users.
  • Each user owns 20 deposits.
  • Each cycle, each user transfers all his deposits to another user.
  • Then the operator collects a block.
  • He stores it in the database and sends the block hash to a Spectrum blockchain.

Assumptions:

  1. Clients do not save transactions on their side.
  2. Transactions is not checked.

For Linux and Mac

cd $GOPATH/src/github.com/bigman1208000/SmartPlasma/example/cycle
go run example.go

About

Plasma, Plasma Cash & Plasma XT implementation in Go


Languages

Language:Go 91.0%Language:Solidity 9.0%