ink icon indicating copy to clipboard operation
ink copied to clipboard

Add rock paper scissors game example

Open xermicus opened this issue 3 years ago • 2 comments

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.

xermicus avatar Jul 19 '22 09:07 xermicus

🦑 📈 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

paritytech-cicd-pr avatar Aug 16 '22 10:08 paritytech-cicd-pr

Can you access the logs of the failing CI stages on GitLab? There are some clippy suggestions and spellcheck also got lucky ;-).

cmichi avatar Sep 15 '22 12:09 cmichi

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:

xermicus avatar Oct 27 '22 16:10 xermicus

Gonna close this, free free to re-open if you start working on it again.

HCastano avatar Dec 16 '22 21:12 HCastano