-
Notifications
You must be signed in to change notification settings - Fork 4
/
test_PunksV2.rb
64 lines (45 loc) · 1.24 KB
/
test_PunksV2.rb
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
###
# to run use (in /punks):
# $ ruby test_PunksV2.rb
$LOAD_PATH.unshift( '../solidity-typed/lib' )
$LOAD_PATH.unshift( '../rubysol/lib' )
require 'rubysol'
require_relative 'PunksV2' # punks contract
pp PunksMarket
pp PunksMarket.name
pp PunksMarket::Assign
pp PunksMarket::Transfer
pp PunksMarket::PunkTransfer
pp PunksMarket::PunkOffered
pp PunksMarket::PunkBidEntered
pp PunksMarket::PunkBidWithdrawn
pp PunksMarket::PunkBought
pp PunksMarket::PunkNoLongerForSale
pp PunksMarket::Offer
pp PunksMarket::Bid
pp PunksMarket::Assign.name
pp PunksMarket::Transfer.name
pp PunksMarket::PunkTransfer.name
pp PunksMarket::PunkOffered.name
pp PunksMarket::PunkBidEntered.name
pp PunksMarket::PunkBidWithdrawn.name
pp PunksMarket::PunkBought.name
pp PunksMarket::PunkNoLongerForSale.name
pp PunksMarket::Offer.name
pp PunksMarket::Bid.name
ALICE = '0x'+'a'*40 # e.g. '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
BOB = '0x'+'b'*40
CHARLIE = '0x'+'c'*40
pp ALICE
pp BOB
pp CHARLIE
Runtime.msg.sender = ALICE
punks = PunksMarket.construct
pp punks
pp punks.serialize
pp punks.name
pp punks.symbol
pp punks.decimals
pp punks.totalSupply
pp punks.balanceOf( ALICE )
puts "bye"