forked from anhbaysgalan1/ethereum-playbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtokens.yml
More file actions
122 lines (106 loc) · 2.19 KB
/
tokens.yml
File metadata and controls
122 lines (106 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
INVENTORY:
testnet:
- http://localhost:8545
genesis:
- var/chain/geth.ipc
WALLETS:
alice:
privkey: "41022453C949BAB4821358D2FA5B93CA6B046EFFA7B7A19765ACF8FD6AE8FA9B"
bob:
keyfile: "examples/keystore/bob.json"
password: "1234"
# foo3:
# address: 0x3b47427740b5dedf1bfae36862a78d7134609607
# keystore: "var/chain/keystore"
# password: "1234"
CONTRACTS:
property-token:
name: PropertyToken
sol: contracts/PropertyToken.sol
instances:
- &PTO123
contract: property-token
address: 0x0
- &PTO124
contract: property-token
address: 0x0
CALL:
eth-balances:
wallet: .
method: eth_getBalance
params:
- {type: address, value: @@}
- latest
txinfo:
method: eth_getTransactionByHash
params:
- {type: string, reference: $1}
txreceipt:
method: eth_getTransactionReceipt
params:
- {type: string, reference: $1}
VIEW:
get-owner:
instance: *PTO123
method: owner
token-balances:
wallet: .
instance: *PTO123
method: balanceOf
params:
- {type: address, value: @@}
WRITE:
send-100-wei:
wallet: alice
to: bob
value: 100
send-wei:
wallet: alice
to: bob
value: $1
send-100-gwei:
wallet: alice
to: bob
value: 100 gwei
send-1-ether:
wallet: alice
to: bob
value: 1 ether
deploy-property-token:
wallet: bob
instance:
contract: property-token
params:
- Atlant Property Token 123
- PTO123
- {type: uint, value: 50 * 1e6 * 1e18}
mint-100-tokens:
wallet: bob
instance: *PTO123
method: mint
params:
- {type: address, value: @bob}
- {type: uint, value: 100 * 1e18}
transfer-50-tokens:
wallet: bob
instance: *PTO123
method: transfer
params:
- {type: address, value: @alice}
- {type: uint, value: 50 * 1e18}
# same as transfer, but unified with ETH send
send-25-tokens:
wallet: bob
to: alice
value: 25 * 1e18 PTO123
TARGETS:
make-transfers:
- token-balances
- mint-100-tokens
- transfer-50-tokens
- send-25-tokens
- token-balances
view:
- txinfo
- txreceipt