Skip to content

Latest commit

 

History

History
 
 

geth-test

Folders and files

Tests for some of the functaionality incorperated in the smart contract.

Start geth with
    geth --dev --genesis genesis_block.json --datadir ./data  console 2>> out.log.geth
The genesis file has ether assigned to the accounts in ./data/keystore this provides ether for testing.
To unlock these accounts use "Write here a good, randomly generated, passphrase!" with the double quoates excluded. each script do this automatically.

Functionality, each script requires the previous scripts to be run successfully first.

deploy.js : Deploys the contract. inside geth run loadScript("deploy.js")
newCampaign.js: Create a new campaign inside the randao. inside geth run loadScript("newCampaign.js")
commit.js: Commit a new commitment for the campaign. inside geth run loadScript("commit.js")
reveal.js: Reveal the commit. inside geth run loadScript("reveal.js")
getRandom.js: Fetch the random of the campaign. inside geth run loadScript("getRandom.js")