Skip to content

A simple shell game solidity contract extended from ChainIDE Storage template

License

Notifications You must be signed in to change notification settings

simulacrumb-glm/shellgame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

shellgame

A simple shell game solidity contract extended from ChainIDE Storage template.

This contract is used to illustrate some unique features of Conflux Network:

Designing for normalizing gas and storage collateral to the user

Contract sponsorship

Call guess() with 0, 1, or 2 and payment of 1 CFX. Random chance of winning.

If guess is correct, 2 cfx is returned and a new random number is generated and stored as meaningful variable.

If guess is not correct, 1 wei is returned and a new random number is generated and stored as non-meaningful variable.

Contract is Ownable really for educational and illustrative reasons. getNumber() and setRange() are not needed in a pure sense.

Deployed, verified, and fully sponsored on the Conflux Core Space Testnet at:

https://testnet.confluxscan.io/address/cfxtest:acc3sg8ffunb07cnrmt0xcwnx41wj5bhx2rga5w9rm

Tutorial at:

https://www.youtube.com/watch?v=6mjuER2WvjQ

About

A simple shell game solidity contract extended from ChainIDE Storage template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published