-
Notifications
You must be signed in to change notification settings - Fork 0
/
testIt.out
187 lines (158 loc) · 21.5 KB
/
testIt.out
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
Compiled 1 Solidity file successfully (evm target: cancun).
TokenAgentFactory
Deploy TokenAgentFactory And TokenAgent
* accounts[0]->TokenAgentFactory.deploy() => 0x5FC8d326 - gasUsed: 5,572,795 0.005572795Ξ 13.93 USD @ 1.0 gwei 2500.00 ETH/USD
* accounts[0]->tokenAgentFactory.newTokenAgent() => 0x23dB4a08 - gasUsed: 186,378 0.000186378Ξ 0.47 USD @ 1.0 gwei 2500.00 ETH/USD
* tokenAgentByOwnerInfo: ["0","0x23dB4a08f2272df049a4932a4Cc3A6Dc1002B33E","0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]
* accounts[1]->tokenAgentFactory.newTokenAgent() => 0x8EFa1819 - gasUsed: 189,178 0.000189178Ξ 0.47 USD @ 1.0 gwei 2500.00 ETH/USD
* tokenAgentByOwnerInfo: ["1","0x8EFa1819Ff5B279077368d44B593a4543280e402","0x70997970C51812dc3A010C7d01b50e0d17dc79C8"]
* accounts[2]->tokenAgentFactory.newTokenAgent() => 0x6743E5c6 - gasUsed: 189,178 0.000189178Ξ 0.47 USD @ 1.0 gwei 2500.00 ETH/USD
* tokenAgentByOwnerInfo: ["2","0x6743E5c6E1B453372507E8dfD6CA53508721425B","0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"]
* accounts[3]->tokenAgentFactory.newTokenAgent() => 0xA14d9C7a - gasUsed: 189,178 0.000189178Ξ 0.47 USD @ 1.0 gwei 2500.00 ETH/USD
* tokenAgentByOwnerInfo: ["3","0xA14d9C7a916Db01cCA55ec21Be1F7665C326928F","0x90F79bf6EB2c4f870365E785982E1f101E93b906"]
Index tokenAgent Owner
----- ---------- ----------
0 0x23dB4a08 0xf39Fd6e5
1 0x8EFa1819 0x70997970
2 0x6743E5c6 0x3C44CdDd
3 0xA14d9C7a 0x90F79bf6
* now: 1:48:58 PM, expiry: 1:50:58 PM
✔ Test TokenAgent secondary functions (833ms)
✔ Test TokenAgent invalid offers
# Account ETH WETH 0x5FbDB231 ERC-20 0xe7f1725E ERC-721 0x9fE46736 ERC-1155 0xCf7Ed3Ac
--- ---------- ------------------------ ------------------------ ------------------------ ---------------------------------- ----------------------------------
0 0xf39Fd6e5 9899.973417221762627247 100.0 1000.0 0, 1, 2, 3 0:10, 1:10, 2:10, 3:10
1 0x70997970 9899.998937491978146186 100.0 1000.0 4, 5, 6, 7 0:20, 1:20, 2:20, 3:20
2 0x3C44CdDd 9899.998952911890375361 100.0 1000.0 8, 9, 10, 11 0:30, 1:30, 2:30, 3:30
3 0x90F79bf6 9899.998964645333251573 100.0 1000.0 12, 13, 14, 15 0:40, 1:40, 2:40, 3:40
* offers1: [["0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",0,1727236258,["0.3","0.2","0.1"],[],["1.0","1.0","0.1"]],["0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",1,1727236258,["0.1","0.2","0.3"],[],["1.0","1.0","0.1"]]]
* accounts[1]->tokenAgents[1].addOffers(offers1) => [0, 1] - gasUsed: 426,415 0.000426415Ξ 1.07 USD @ 1.0 gwei 2500.00 ETH/USD
+ tokenAgents[1].Offered(index:0, token: 0xe7f1725E, tokenType: 20, maker: 0x70997970, buySell: BUY, expiry: 1:50:58 PM, nonce: 0, prices: [0.3,0.2,0.1], tokenIds: [], tokenss: [1,1,0.1], timestamp: 1:50:41 PM)
+ tokenAgents[1].Offered(index:1, token: 0xe7f1725E, tokenType: 20, maker: 0x70997970, buySell: SELL, expiry: 1:50:58 PM, nonce: 0, prices: [0.1,0.2,0.3], tokenIds: [], tokenss: [1,1,0.1], timestamp: 1:50:41 PM)
# Account ETH WETH 0x5FbDB231 ERC-20 0xe7f1725E ERC-721 0x9fE46736 ERC-1155 0xCf7Ed3Ac
--- ---------- ------------------------ ------------------------ ------------------------ ---------------------------------- ----------------------------------
0 0xf39Fd6e5 9899.973417221762627247 100.0 1000.0 0, 1, 2, 3 0:10, 1:10, 2:10, 3:10
1 0x70997970 9899.998511076493738746 100.0 1000.0 4, 5, 6, 7 0:20, 1:20, 2:20, 3:20
2 0x3C44CdDd 9899.998952911890375361 100.0 1000.0 8, 9, 10, 11 0:30, 1:30, 2:30, 3:30
3 0x90F79bf6 9899.998964645333251573 100.0 1000.0 12, 13, 14, 15 0:40, 1:40, 2:40, 3:40
tokenAgents[1] Offers
# Token Type B/S Expiry Nonce Prices TokenIds Tokenss
--- ---------- ---- ---- ------------ ----- ------------------------------ ------------------------------ ------------------------------
0 0xe7f1725E 20 BUY 1:50:58 PM 0 0.30, 0.20, 0.10 1.00, 1.00, 0.10
1 0xe7f1725E 20 SELL 1:50:58 PM 0 0.10, 0.20, 0.30 1.00, 1.00, 0.10
* trades1: [[0,"295238095238095238",1,[],["1050000000000000000"]]]
* accounts[2]->tokenAgents[1].trade(trades1, PAYMENTTYPE_WETH) - gasUsed: 125,932 0.000125932Ξ 0.31 USD @ 1.0 gwei 2500.00 ETH/USD
+ tokenAgents[1].InternalTransfer(from: 0x3C44CdDd, to: 0x8EFa1819, ethers: 10.0, timestamp: 1:50:42 PM)
+ erc20Token.Transfer(from: 0x3C44CdDd, to: 0x70997970, tokens: 1.05)
+ tokenAgents[1].Traded(index:0, token: 0xe7f1725E, tokenType: 20, maker: 0x70997970, taker: 0x3C44CdDd, makerBuySell: BUY, prices: [0.3,0.2,0], tokenIds: [], tokenss: [1,0.05,0], remainingTokenss: [0,0.95,0.1], price: 0.295238095238095238, timestamp: 1:50:42 PM)
+ weth.Transfer(src: 0x70997970, guy: 0x3C44CdDd, wad: 0.31)
+ tokenAgents[1].InternalTransfer(from: 0x8EFa1819, to: 0x3C44CdDd, ethers: 10.0, timestamp: 1:50:42 PM)
# Account ETH WETH 0x5FbDB231 ERC-20 0xe7f1725E ERC-721 0x9fE46736 ERC-1155 0xCf7Ed3Ac
--- ---------- ------------------------ ------------------------ ------------------------ ---------------------------------- ----------------------------------
0 0xf39Fd6e5 9899.973417221762627247 100.0 1000.0 0, 1, 2, 3 0:10, 1:10, 2:10, 3:10
1 0x70997970 9899.998511076493738746 99.69 1001.05 4, 5, 6, 7 0:20, 1:20, 2:20, 3:20
2 0x3C44CdDd 9899.998826979764569293 100.31 998.95 8, 9, 10, 11 0:30, 1:30, 2:30, 3:30
3 0x90F79bf6 9899.998964645333251573 100.0 1000.0 12, 13, 14, 15 0:40, 1:40, 2:40, 3:40
tokenAgents[1] Offers
# Token Type B/S Expiry Nonce Prices TokenIds Tokenss
--- ---------- ---- ---- ------------ ----- ------------------------------ ------------------------------ ------------------------------
0 0xe7f1725E 20 BUY 1:50:58 PM 0 0.30, 0.20, 0.10 0.00, 0.95, 0.10
1 0xe7f1725E 20 SELL 1:50:58 PM 0 0.10, 0.20, 0.30 1.00, 1.00, 0.10
✔ Test TokenAgent ERC-20 offers and trades (108ms)
# Account ETH WETH 0x5FbDB231 ERC-20 0xe7f1725E ERC-721 0x9fE46736 ERC-1155 0xCf7Ed3Ac
--- ---------- ------------------------ ------------------------ ------------------------ ---------------------------------- ----------------------------------
0 0xf39Fd6e5 9899.973417221762627247 100.0 1000.0 0, 1, 2, 3 0:10, 1:10, 2:10, 3:10
1 0x70997970 9899.998937491978146186 100.0 1000.0 4, 5, 6, 7 0:20, 1:20, 2:20, 3:20
2 0x3C44CdDd 9899.998952911890375361 100.0 1000.0 8, 9, 10, 11 0:30, 1:30, 2:30, 3:30
3 0x90F79bf6 9899.998964645333251573 100.0 1000.0 12, 13, 14, 15 0:40, 1:40, 2:40, 3:40
* offers1: ["0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0,0,1727236258,100000000000000000,,14","0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0,1,1727236258,100000000000000000,4,5,6,7,24","0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0,1,1727236258,100000000000000000,200000000000000000,300000000000000000,400000000000000000,4,5,6,7,34"]
* accounts[1]->tokenAgents[1].addOffers(offers1) => [0, 1, 2] - gasUsed: 584,824 0.000584824Ξ 1.46 USD @ 1.0 gwei 2500.00 ETH/USD
+ tokenAgents[1].Offered(index:0, token: 0x9fE46736, tokenType: 721, maker: 0x70997970, buySell: BUY, expiry: 1:50:58 PM, nonce: 0, prices: [0.1], tokenIds: [], tokenss: [14], timestamp: 1:50:41 PM)
+ tokenAgents[1].Offered(index:1, token: 0x9fE46736, tokenType: 721, maker: 0x70997970, buySell: SELL, expiry: 1:50:58 PM, nonce: 0, prices: [0.1], tokenIds: [4,5,6,7], tokenss: [24], timestamp: 1:50:41 PM)
+ tokenAgents[1].Offered(index:2, token: 0x9fE46736, tokenType: 721, maker: 0x70997970, buySell: SELL, expiry: 1:50:58 PM, nonce: 0, prices: [0.1,0.2,0.3,0.4], tokenIds: [4,5,6,7], tokenss: [34], timestamp: 1:50:41 PM)
# Account ETH WETH 0x5FbDB231 ERC-20 0xe7f1725E ERC-721 0x9fE46736 ERC-1155 0xCf7Ed3Ac
--- ---------- ------------------------ ------------------------ ------------------------ ---------------------------------- ----------------------------------
0 0xf39Fd6e5 9899.973417221762627247 100.0 1000.0 0, 1, 2, 3 0:10, 1:10, 2:10, 3:10
1 0x70997970 9899.998352667313786122 100.0 1000.0 4, 5, 6, 7 0:20, 1:20, 2:20, 3:20
2 0x3C44CdDd 9899.998952911890375361 100.0 1000.0 8, 9, 10, 11 0:30, 1:30, 2:30, 3:30
3 0x90F79bf6 9899.998964645333251573 100.0 1000.0 12, 13, 14, 15 0:40, 1:40, 2:40, 3:40
tokenAgents[1] Offers
# Token Type B/S Expiry Nonce Prices TokenIds Tokenss
--- ---------- ---- ---- ------------ ----- ------------------------------ ------------------------------ ------------------------------
0 0x9fE46736 721 BUY 1:50:58 PM 0 0.10 14
1 0x9fE46736 721 SELL 1:50:58 PM 0 0.10 4, 5, 6, 7 24
2 0x9fE46736 721 SELL 1:50:58 PM 0 0.10, 0.20, 0.30, 0.40 4, 5, 6, 7 34
* trades1: [[1,"400000000000000000",1,[4,5,6,7],[]]]
* accounts[2]->tokenAgents[1].trade(trades1, PAYMENTTYPE_WETH) - gasUsed: 190,837 0.000190837Ξ 0.48 USD @ 1.0 gwei 2500.00 ETH/USD
+ tokenAgents[1].InternalTransfer(from: 0x3C44CdDd, to: 0x8EFa1819, ethers: 10.0, timestamp: 1:50:42 PM)
+ erc721Token.Approval(from: 0x70997970, to: 0x00000000, tokenId: 4)
+ erc721Token.Transfer(from: 0x70997970, to: 0x3C44CdDd, tokenId: 4)
+ erc721Token.Approval(from: 0x70997970, to: 0x00000000, tokenId: 5)
+ erc721Token.Transfer(from: 0x70997970, to: 0x3C44CdDd, tokenId: 5)
+ erc721Token.Approval(from: 0x70997970, to: 0x00000000, tokenId: 6)
+ erc721Token.Transfer(from: 0x70997970, to: 0x3C44CdDd, tokenId: 6)
+ erc721Token.Approval(from: 0x70997970, to: 0x00000000, tokenId: 7)
+ erc721Token.Transfer(from: 0x70997970, to: 0x3C44CdDd, tokenId: 7)
+ tokenAgents[1].Traded(index:1, token: 0x9fE46736, tokenType: 721, maker: 0x70997970, taker: 0x3C44CdDd, makerBuySell: SELL, prices: [0.1,0.1,0.1,0.1], tokenIds: [4,5,6,7], tokenss: [4], remainingTokenss: [20], price: 0.4, timestamp: 1:50:42 PM)
+ weth.Transfer(src: 0x3C44CdDd, guy: 0x70997970, wad: 0.4)
+ tokenAgents[1].InternalTransfer(from: 0x8EFa1819, to: 0x3C44CdDd, ethers: 10.0, timestamp: 1:50:42 PM)
# Account ETH WETH 0x5FbDB231 ERC-20 0xe7f1725E ERC-721 0x9fE46736 ERC-1155 0xCf7Ed3Ac
--- ---------- ------------------------ ------------------------ ------------------------ ---------------------------------- ----------------------------------
0 0xf39Fd6e5 9899.973417221762627247 100.0 1000.0 0, 1, 2, 3 0:10, 1:10, 2:10, 3:10
1 0x70997970 9899.998352667313786122 100.4 1000.0 0:20, 1:20, 2:20, 3:20
2 0x3C44CdDd 9899.998762074699538361 99.6 1000.0 4, 5, 6, 7, 8, 9, 10, 11 0:30, 1:30, 2:30, 3:30
3 0x90F79bf6 9899.998964645333251573 100.0 1000.0 12, 13, 14, 15 0:40, 1:40, 2:40, 3:40
tokenAgents[1] Offers
# Token Type B/S Expiry Nonce Prices TokenIds Tokenss
--- ---------- ---- ---- ------------ ----- ------------------------------ ------------------------------ ------------------------------
0 0x9fE46736 721 BUY 1:50:58 PM 0 0.10 14
1 0x9fE46736 721 SELL 1:50:58 PM 0 0.10 4, 5, 6, 7 20
2 0x9fE46736 721 SELL 1:50:58 PM 0 0.10, 0.20, 0.30, 0.40 4, 5, 6, 7 34
✔ Test TokenAgent ERC-721 offers and trades (55ms)
# Account ETH WETH 0x5FbDB231 ERC-20 0xe7f1725E ERC-721 0x9fE46736 ERC-1155 0xCf7Ed3Ac
--- ---------- ------------------------ ------------------------ ------------------------ ---------------------------------- ----------------------------------
0 0xf39Fd6e5 9899.973417221762627247 100.0 1000.0 0, 1, 2, 3 0:10, 1:10, 2:10, 3:10
1 0x70997970 9899.998937491978146186 100.0 1000.0 4, 5, 6, 7 0:20, 1:20, 2:20, 3:20
2 0x3C44CdDd 9899.998952911890375361 100.0 1000.0 8, 9, 10, 11 0:30, 1:30, 2:30, 3:30
3 0x90F79bf6 9899.998964645333251573 100.0 1000.0 12, 13, 14, 15 0:40, 1:40, 2:40, 3:40
* offers1: ["0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9,0,1727236258,100000000000000000,,","0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9,1,1727236258,100000000000000000,0,1,2,3,5,6,7,8","0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9,1,1727236258,100000000000000000,200000000000000000,300000000000000000,400000000000000000,0,1,2,3,10,10,10,10"]
* accounts[1]->tokenAgents[1].addOffers(offers1) => [0, 1, 2] - gasUsed: 594,987 0.000594987Ξ 1.49 USD @ 1.0 gwei 2500.00 ETH/USD
+ tokenAgents[1].Offered(index:0, token: 0xCf7Ed3Ac, tokenType: 1155, maker: 0x70997970, buySell: BUY, expiry: 1:50:58 PM, nonce: 0, prices: [0.1], tokenIds: [], tokenss: [], timestamp: 1:50:41 PM)
+ tokenAgents[1].Offered(index:1, token: 0xCf7Ed3Ac, tokenType: 1155, maker: 0x70997970, buySell: SELL, expiry: 1:50:58 PM, nonce: 0, prices: [0.1], tokenIds: [0,1,2,3], tokenss: [5,6,7,8], timestamp: 1:50:41 PM)
+ tokenAgents[1].Offered(index:2, token: 0xCf7Ed3Ac, tokenType: 1155, maker: 0x70997970, buySell: SELL, expiry: 1:50:58 PM, nonce: 0, prices: [0.1,0.2,0.3,0.4], tokenIds: [0,1,2,3], tokenss: [10,10,10,10], timestamp: 1:50:41 PM)
# Account ETH WETH 0x5FbDB231 ERC-20 0xe7f1725E ERC-721 0x9fE46736 ERC-1155 0xCf7Ed3Ac
--- ---------- ------------------------ ------------------------ ------------------------ ---------------------------------- ----------------------------------
0 0xf39Fd6e5 9899.973417221762627247 100.0 1000.0 0, 1, 2, 3 0:10, 1:10, 2:10, 3:10
1 0x70997970 9899.998342504302240954 100.0 1000.0 4, 5, 6, 7 0:20, 1:20, 2:20, 3:20
2 0x3C44CdDd 9899.998952911890375361 100.0 1000.0 8, 9, 10, 11 0:30, 1:30, 2:30, 3:30
3 0x90F79bf6 9899.998964645333251573 100.0 1000.0 12, 13, 14, 15 0:40, 1:40, 2:40, 3:40
tokenAgents[1] Offers
# Token Type B/S Expiry Nonce Prices TokenIds Tokenss
--- ---------- ---- ---- ------------ ----- ------------------------------ ------------------------------ ------------------------------
0 0xCf7Ed3Ac 1155 BUY 1:50:58 PM 0 0.10
1 0xCf7Ed3Ac 1155 SELL 1:50:58 PM 0 0.10 0, 1, 2, 3 5, 6, 7, 8
2 0xCf7Ed3Ac 1155 SELL 1:50:58 PM 0 0.10, 0.20, 0.30, 0.40 0, 1, 2, 3 10, 10, 10, 10
* trades1: [[1,"2600000000000000000",1,[0,1,2,3],[5,6,7,8]]]
* accounts[2]->tokenAgents[1].trade(trades1, PAYMENTTYPE_WETH) - gasUsed: 200,284 0.000200284Ξ 0.50 USD @ 1.0 gwei 2500.00 ETH/USD
+ tokenAgents[1].InternalTransfer(from: 0x3C44CdDd, to: 0x8EFa1819, ethers: 10.0, timestamp: 1:50:42 PM)
+ erc1155Token.TransferSingle(operator: 0x8EFa1819, from: 0x70997970, to: 0x3C44CdDd, tokenId: 0, tokens: 5)
+ erc1155Token.TransferSingle(operator: 0x8EFa1819, from: 0x70997970, to: 0x3C44CdDd, tokenId: 1, tokens: 6)
+ erc1155Token.TransferSingle(operator: 0x8EFa1819, from: 0x70997970, to: 0x3C44CdDd, tokenId: 2, tokens: 7)
+ erc1155Token.TransferSingle(operator: 0x8EFa1819, from: 0x70997970, to: 0x3C44CdDd, tokenId: 3, tokens: 8)
+ tokenAgents[1].Traded(index:1, token: 0xCf7Ed3Ac, tokenType: 1155, maker: 0x70997970, taker: 0x3C44CdDd, makerBuySell: SELL, prices: [0.1,0.1,0.1,0.1], tokenIds: [0,1,2,3], tokenss: [5,6,7,8], remainingTokenss: [0,0,0,0], price: 2.6, timestamp: 1:50:42 PM)
+ weth.Transfer(src: 0x3C44CdDd, guy: 0x70997970, wad: 2.6)
+ tokenAgents[1].InternalTransfer(from: 0x8EFa1819, to: 0x3C44CdDd, ethers: 10.0, timestamp: 1:50:42 PM)
# Account ETH WETH 0x5FbDB231 ERC-20 0xe7f1725E ERC-721 0x9fE46736 ERC-1155 0xCf7Ed3Ac
--- ---------- ------------------------ ------------------------ ------------------------ ---------------------------------- ----------------------------------
0 0xf39Fd6e5 9899.973417221762627247 100.0 1000.0 0, 1, 2, 3 0:10, 1:10, 2:10, 3:10
1 0x70997970 9899.998342504302240954 102.6 1000.0 4, 5, 6, 7 0:15, 1:14, 2:13, 3:12
2 0x3C44CdDd 9899.998752627690091361 97.4 1000.0 8, 9, 10, 11 0:35, 1:36, 2:37, 3:38
3 0x90F79bf6 9899.998964645333251573 100.0 1000.0 12, 13, 14, 15 0:40, 1:40, 2:40, 3:40
tokenAgents[1] Offers
# Token Type B/S Expiry Nonce Prices TokenIds Tokenss
--- ---------- ---- ---- ------------ ----- ------------------------------ ------------------------------ ------------------------------
0 0xCf7Ed3Ac 1155 BUY 1:50:58 PM 0 0.10
1 0xCf7Ed3Ac 1155 SELL 1:50:58 PM 0 0.10 0, 1, 2, 3 0, 0, 0, 0
2 0xCf7Ed3Ac 1155 SELL 1:50:58 PM 0 0.10, 0.20, 0.30, 0.40 0, 1, 2, 3 10, 10, 10, 10
✔ Test TokenAgent ERC-1155 offers and trades (55ms)
5 passing (1s)