This commit is contained in:
shashkevichfrida 2023-11-16 18:54:24 +03:00
parent 8e14f0a233
commit a0789c9bd1
8 changed files with 28 additions and 0 deletions

13
coin/coin_contract.go Normal file
View file

@ -0,0 +1,13 @@
package coin
import (
"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
)
func IsWinner(playerName string) bool {
if playerName == "demo" {
return true
}
random := runtime.GetRandom()
return random%2 == 0
}

1
coin/coin_contract.json Executable file
View file

@ -0,0 +1 @@
{"name":"Coin","abi":{"methods":[{"name":"isWinner","offset":0,"parameters":[{"name":"playerName","type":"String"}],"returntype":"Boolean","safe":false}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":[]}],"supportedstandards":[],"trusts":[],"extra":null}

BIN
coin/coin_contract.nef Executable file

Binary file not shown.

5
coin/config.yml Normal file
View file

@ -0,0 +1,5 @@
name: "Coin"
supportedstandards: []
events:
permissions:
- methods: []

5
coin/go.mod Normal file
View file

@ -0,0 +1,5 @@
module coin
go 1.21.4
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231113195319-de2a44508893

2
coin/go.sum Normal file
View file

@ -0,0 +1,2 @@
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231113195319-de2a44508893 h1:1VpHe/QRrEWTyIaRG7lv372cbJavg63enFxtIMAIfXs=
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231113195319-de2a44508893/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag=

1
wallets/wallet.json Normal file
View file

@ -0,0 +1 @@
{"version":"1.0","accounts":[{"address":"Ne5RfKVQo9tcJherekuF7RvtMBEDDhwpqa","key":"6PYS8W1GBUpuWdemn4jDGh3qvEJ6waiJ8mUyd49LvNS6rvKVYse3CYdVdZ","label":"user","contract":{"script":"DCEDdZw4GtfuUmONsM9MRRmtsvTNMkldzXFp+PlTEeaigpdBVuezJw==","parameters":[{"name":"parameter0","type":"Signature"}],"deployed":false},"lock":false,"isDefault":false}],"scrypt":{"n":16384,"r":8,"p":8},"extra":{"Tokens":null}}

1
wallets/wallet0.json Normal file
View file

@ -0,0 +1 @@
{"version":"1.0","accounts":[{"address":"NYU98hHU6MJCV2bGc2rtHxjndkKFwhsfrg","key":"6PYQBuL2ZaLsndUy9sVyqCqdT974diB6mCJyMBNbXSKXoPfcNh6ixB3g6W","label":"frida","contract":{"script":"DCEDZufrbdJb4YV1UgrqWE3qVWDHvyFiIwu5vmx5xYXviZxBVuezJw==","parameters":[{"name":"parameter0","type":"Signature"}],"deployed":false},"lock":false,"isDefault":false}],"scrypt":{"n":16384,"r":8,"p":8},"extra":{"Tokens":null}}