Add rock paper scissors game example
While warming up with the stack I created a little rock paper scissors game smart contract. I'm polishing it now and would appreciate some early feedback :blush:
This is not done yet, I want to add extensive testing, more comments explaining how it works and possible a little testing client.
🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑
These are the results when building the examples/* contracts from this branch with cargo-contract 1.4.0-25bfb96 and comparing them to ink! master:
| Δ Optimized Size | Δ Used Gas | Total Optimized Size | Total Used Gas | |
|---|---|---|---|---|
accumulator |
1.00 K | |||
adder |
2.04 K | |||
contract-introspection |
2.32 K | |||
contract-terminate |
0.92 K | 275_000 | ||
contract-transfer |
8.31 K | 75_000 | ||
data-structures |
1.73 K | |||
delegate-calls |
2.89 K | 76_242 | ||
delegator |
6.34 K | 232_135 | ||
dns |
8.81 K | 225_000 | ||
erc1155 |
16.74 K | 450_000 | ||
erc20 |
8.42 K | 225_000 | ||
erc721 |
11.62 K | 600_000 | ||
flipper |
1.24 K | 75_000 | ||
forward-calls |
2.87 K | 151_411 | ||
incrementer |
1.14 K | |||
mother |
12.16 K | |||
multisig |
25.28 K | 470_240 | ||
payment-channel |
7.95 K | |||
rand-extension |
3.79 K | 75_000 | ||
rock-paper-scissors |
+17.54 K | 17.54 K | ||
seal-code-hash |
1.39 K | |||
seal-ecdsa |
1.71 K | |||
set-code-hash |
1.49 K | 150_000 | ||
subber |
2.06 K | |||
trait-erc20 |
8.69 K | 225_000 | ||
trait-flipper |
0.97 K | 75_000 | ||
trait-incrementer |
1.12 K | 150_000 | ||
updated-incrementer |
9.72 K | |||
upgradeable-flipper |
1.48 K |
Link to the run | Last update: Tue Aug 16 12:50:53 CEST 2022
Can you access the logs of the failing CI stages on GitLab? There are some clippy suggestions and spellcheck also got lucky ;-).
Sorry @cmichi this is on my back log (thanks for the feedback)! Would be nice to have this example in the ink v4 release :blush:
Gonna close this, free free to re-open if you start working on it again.