Adding contract sample

+ Demo a recursive contract call to itself
This commit is contained in:
romanman 2014-06-17 16:43:47 +01:00
parent f7a264b0a8
commit 4cd255ceeb
1 changed files with 19 additions and 0 deletions

19
samples/call-me-more.se Normal file
View File

@ -0,0 +1,19 @@
init:
# Setting the storage value
contract.storage[999] = 3
code:
# Using the storage on the call
a = contract.storage[999]
if a > 0:
contract.storage[999] = a - 1
# call to contract: 77045e71a7a2c50903d88e564cd72fab11e82051
send((tx.gas / 10 * 8), 0x77045e71a7a2c50903d88e564cd72fab11e82051, 0)
else:
stop