Custom and numbered work examples updated to work without byte arrays. Revisit this...
[robmyers:artworld-ethereum.git] / serpent / hot_cold.se
1 init:
2     contract.storage[1000] = "hot"
3     contract.storage[1001] = "cold"
4
5 code:
6     // Make sure we have enough gas to run the contact
7     if tx.value < tx.basefee * 100:
8         // If not, stop
9         stop
10
11     // Swap
12     temp = contract.storage[1000]
13     contract.storage[1000] = contract.storage[1001]
14     contract.storage[1001] = temp