forked from tonindexer/anton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
telemint_test.go
258 lines (235 loc) · 20 KB
/
telemint_test.go
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
package known_test
import (
"encoding/json"
"math/big"
"os"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/xssnick/tonutils-go/address"
"github.com/xssnick/tonutils-go/tlb"
"github.com/xssnick/tonutils-go/tvm/cell"
"github.com/tonindexer/anton/abi"
"github.com/tonindexer/anton/addr"
)
type (
TeleitemAuctionConfig struct {
BeneficiaryAddress *address.Address `tlb:"addr"`
InitialMinBid tlb.Coins `tlb:"."`
MaxBid tlb.Coins `tlb:"."`
MinBidStep uint8 `tlb:"## 8"`
MinExtendTime uint32 `tlb:"## 32"`
Duration uint32 `tlb:"## 32"`
}
TelemintRoyaltyParams struct {
Numerator uint16 `tlb:"## 16"`
Denominator uint16 `tlb:"## 16"`
Destination *address.Address `tlb:"addr"`
}
TelemintTokenInfo struct {
Name *abi.TelemintText `tlb:"."`
Domain *abi.TelemintText `tlb:"."`
}
)
type (
TelemintMsgDeploy struct {
_ tlb.Magic `tlb:"#4637289a"`
Sig []byte `tlb:"bits 512"`
SubwalletID uint32 `tlb:"## 32"`
ValidSince uint32 `tlb:"## 32"`
ValidTill uint32 `tlb:"## 32"`
TokenName *abi.TelemintText `tlb:"."`
Content *cell.Cell `tlb:"^"`
AuctionConfig *TeleitemAuctionConfig `tlb:"^"`
RoyaltyParams *TelemintRoyaltyParams `tlb:"maybe ^"`
}
TelemintMsgDeployV2 struct {
_ tlb.Magic `tlb:"#4637289b"`
Sig []byte `tlb:"bits 512"`
SubwalletID uint32 `tlb:"## 32"`
ValidSince uint32 `tlb:"## 32"`
ValidTill uint32 `tlb:"## 32"`
TokenName *abi.TelemintText `tlb:"."`
Content *cell.Cell `tlb:"^"`
AuctionConfig *TeleitemAuctionConfig `tlb:"^"`
RoyaltyParams *TelemintRoyaltyParams `tlb:"maybe ^"`
// Restrictions
}
TeleitemMsgDeploy struct {
_ tlb.Magic `tlb:"#299a3e15"`
SenderAddress *address.Address `tlb:"addr"`
Bid tlb.Coins `tlb:"."`
Info *TelemintTokenInfo `tlb:"^"`
Content *cell.Cell `tlb:"^"`
AuctionConfig *TeleitemAuctionConfig `tlb:"^"`
RoyaltyParams *TelemintRoyaltyParams `tlb:"^"`
}
)
func TestNewOperationDesc_TelemintNFTCollection(t *testing.T) {
var testCases = []*struct {
structType any
expected string
}{
{
structType: (*TelemintMsgDeploy)(nil),
expected: `{"op_name":"telemint_msg_deploy","op_code":"0x4637289a","body":[{"name":"sig","tlb_type":"bits 512","format":"bytes"},{"name":"subwallet_id","tlb_type":"## 32","format":"uint32"},{"name":"valid_since","tlb_type":"## 32","format":"uint32"},{"name":"valid_till","tlb_type":"## 32","format":"uint32"},{"name":"token_name","tlb_type":".","format":"telemintText"},{"name":"content","tlb_type":"^","format":"cell"},{"name":"auction_config","tlb_type":"^","format":"struct","struct_fields":[{"name":"beneficiary_address","tlb_type":"addr","format":"addr"},{"name":"initial_min_bid","tlb_type":".","format":"coins"},{"name":"max_bid","tlb_type":".","format":"coins"},{"name":"min_bid_step","tlb_type":"## 8","format":"uint8"},{"name":"min_extend_time","tlb_type":"## 32","format":"uint32"},{"name":"duration","tlb_type":"## 32","format":"uint32"}]},{"name":"royalty_params","tlb_type":"maybe ^","format":"struct","struct_fields":[{"name":"numerator","tlb_type":"## 16","format":"uint16"},{"name":"denominator","tlb_type":"## 16","format":"uint16"},{"name":"destination","tlb_type":"addr","format":"addr"}]}]}`,
}, {
structType: (*TelemintMsgDeployV2)(nil),
expected: `{"op_name":"telemint_msg_deploy_v_2","op_code":"0x4637289b","body":[{"name":"sig","tlb_type":"bits 512","format":"bytes"},{"name":"subwallet_id","tlb_type":"## 32","format":"uint32"},{"name":"valid_since","tlb_type":"## 32","format":"uint32"},{"name":"valid_till","tlb_type":"## 32","format":"uint32"},{"name":"token_name","tlb_type":".","format":"telemintText"},{"name":"content","tlb_type":"^","format":"cell"},{"name":"auction_config","tlb_type":"^","format":"struct","struct_fields":[{"name":"beneficiary_address","tlb_type":"addr","format":"addr"},{"name":"initial_min_bid","tlb_type":".","format":"coins"},{"name":"max_bid","tlb_type":".","format":"coins"},{"name":"min_bid_step","tlb_type":"## 8","format":"uint8"},{"name":"min_extend_time","tlb_type":"## 32","format":"uint32"},{"name":"duration","tlb_type":"## 32","format":"uint32"}]},{"name":"royalty_params","tlb_type":"maybe ^","format":"struct","struct_fields":[{"name":"numerator","tlb_type":"## 16","format":"uint16"},{"name":"denominator","tlb_type":"## 16","format":"uint16"},{"name":"destination","tlb_type":"addr","format":"addr"}]}]}`,
}, {
structType: (*TeleitemMsgDeploy)(nil),
expected: `{"op_name":"teleitem_msg_deploy","op_code":"0x299a3e15","body":[{"name":"sender_address","tlb_type":"addr","format":"addr"},{"name":"bid","tlb_type":".","format":"coins"},{"name":"info","tlb_type":"^","format":"struct","struct_fields":[{"name":"name","tlb_type":".","format":"telemintText"},{"name":"domain","tlb_type":".","format":"telemintText"}]},{"name":"content","tlb_type":"^","format":"cell"},{"name":"auction_config","tlb_type":"^","format":"struct","struct_fields":[{"name":"beneficiary_address","tlb_type":"addr","format":"addr"},{"name":"initial_min_bid","tlb_type":".","format":"coins"},{"name":"max_bid","tlb_type":".","format":"coins"},{"name":"min_bid_step","tlb_type":"## 8","format":"uint8"},{"name":"min_extend_time","tlb_type":"## 32","format":"uint32"},{"name":"duration","tlb_type":"## 32","format":"uint32"}]},{"name":"royalty_params","tlb_type":"^","format":"struct","struct_fields":[{"name":"numerator","tlb_type":"## 16","format":"uint16"},{"name":"denominator","tlb_type":"## 16","format":"uint16"},{"name":"destination","tlb_type":"addr","format":"addr"}]}]}`,
},
}
for _, test := range testCases {
d, err := abi.NewOperationDesc(test.structType)
require.Nil(t, err)
got, err := json.Marshal(d)
require.Nil(t, err)
assert.Equal(t, test.expected, string(got))
}
}
type (
TeleitemStartAuction struct {
_ tlb.Magic `tlb:"#487a8e81"`
QueryID uint64 `tlb:"## 64"`
AuctionConfig *TeleitemAuctionConfig `tlb:"^"`
}
TeleitemCancelAuction struct {
_ tlb.Magic `tlb:"#371638ae"`
QueryID uint64 `tlb:"## 64"`
}
TeleitemOK struct {
_ tlb.Magic `tlb:"#a37a0983"`
QueryID uint64 `tlb:"## 64"`
}
TeleitemOutbidNotification struct {
_ tlb.Magic `tlb:"#557cea20"`
}
)
func TestNewOperationDesc_TelemintNFTItem(t *testing.T) {
var testCases = []*struct {
structType any
expected string
}{
{
structType: (*TeleitemStartAuction)(nil),
expected: `{"op_name":"teleitem_start_auction","op_code":"0x487a8e81","body":[{"name":"query_id","tlb_type":"## 64","format":"uint64"},{"name":"auction_config","tlb_type":"^","format":"struct","struct_fields":[{"name":"beneficiary_address","tlb_type":"addr","format":"addr"},{"name":"initial_min_bid","tlb_type":".","format":"coins"},{"name":"max_bid","tlb_type":".","format":"coins"},{"name":"min_bid_step","tlb_type":"## 8","format":"uint8"},{"name":"min_extend_time","tlb_type":"## 32","format":"uint32"},{"name":"duration","tlb_type":"## 32","format":"uint32"}]}]}`,
}, {
structType: (*TeleitemCancelAuction)(nil),
expected: `{"op_name":"teleitem_cancel_auction","op_code":"0x371638ae","body":[{"name":"query_id","tlb_type":"## 64","format":"uint64"}]}`,
}, {
structType: (*TeleitemOK)(nil),
expected: `{"op_name":"teleitem_ok","op_code":"0xa37a0983","body":[{"name":"query_id","tlb_type":"## 64","format":"uint64"}]}`,
}, {
structType: (*TeleitemOutbidNotification)(nil),
expected: `{"op_name":"teleitem_outbid_notification","op_code":"0x557cea20","body":null}`,
},
}
for _, test := range testCases {
d, err := abi.NewOperationDesc(test.structType)
require.Nil(t, err)
got, err := json.Marshal(d)
require.Nil(t, err)
assert.Equal(t, test.expected, string(got))
}
}
func TestOperationDesc_TelemintNFTCollection(t *testing.T) {
var (
interfaces []*abi.InterfaceDesc
i *abi.InterfaceDesc
)
j, err := os.ReadFile("telemint.json")
require.Nil(t, err)
err = json.Unmarshal(j, &interfaces)
require.Nil(t, err)
for _, i = range interfaces {
if i.Name == "telemint_nft_collection" {
err := i.RegisterDefinitions()
require.Nil(t, err)
break
}
}
var testCases = []*struct {
name string
boc string
expected string
}{
{
// tx hash 0ff74e54e6bff335658c3dac65045632ca11d840b99d1650788ceefa7c37b616
name: "telemint_msg_deploy",
boc: `te6cckEBBAEA6gADsUY3KJphrCuza/Lb313RaBRyRsTRVoTNp6ceHrgVNS0nFgxrIl1BQpKB8HyFHCXrHrM4ma3Cq8fpX1ls4eXsrBHk3OkIAAAAA2PDFEtjwxThB25vbWVyNTjAAwIBAEsABQBkgAgRtHZRbYDLSyfCByJNN1VTi/GV14GNOz4VV3VlUyStcABhgAwcNTYmtuVtY9ClO4/AGIimMJuro731Y7+KIrFPpsxTqgSoF8gAAKAAAcIAASdQEABeAWh0dHBzOi8vbmZ0LmZyYWdtZW50LmNvbS91c2VybmFtZS9ub21lcjU4Lmpzb26nqG30`,
expected: `{"sig":"Yawrs2vy299d0WgUckbE0VaEzaenHh64FTUtJxYMayJdQUKSgfB8hRwl6x6zOJmtwqvH6V9ZbOHl7KwR5NzpCA==","subwallet_id":3,"valid_since":1673729099,"valid_till":1673729249,"token_name":{"Len":7,"Text":"nomer58"},"content":"te6cckEBAQEAMQAAXgFodHRwczovL25mdC5mcmFnbWVudC5jb20vdXNlcm5hbWUvbm9tZXI1OC5qc29uUWvn5w==","auction_config":{"beneficiary_address":"EQBg4amxNbcrax6FKdx-AMRFMYTdXR3vqx38URWKfTZinejc","initial_min_bid":"10000000000","max_bid":"0","min_bid_step":5,"min_extend_time":3600,"duration":604800},"royalty_params":{"numerator":5,"denominator":100,"destination":"EQBAjaOyi2wGWlk-EDkSabqqnF-MrrwMadnwqrurKpkla9nE"}}`,
}, {
// tx hash 726b637d8127068310350fcacfe45918a641b163759074e2ceb23ac4a901cb1d
name: "telemint_msg_deploy_v_2",
boc: `te6cckEBBAEA8AADuUY3KJscZHOp8v4ACiYXmiUzxlVQuojEbXs1wST89fxdPptM8bTC/X7cQ+lPEl6mbhLnHetMET9ptfXXk5PGoxdv7cEHAAAADGOQcQhjkHGeCzg4ODA5ODYwNjA2oAMCAQBLAAUAZIAIEbR2UW2Ay0snwgciTTdVU4vxldeBjTs+FVd1ZVMkrXAAYYAIEbR2UW2Ay0snwgciTTdVU4vxldeBjTs+FVd1ZVMkrWoJUC+QAACgAAHCAAEnUBAAYgFodHRwczovL25mdC5mcmFnbWVudC5jb20vbnVtYmVyLzg4ODA5ODYwNjA2Lmpzb27chHEq`,
expected: `{"sig":"HGRzqfL+AAomF5olM8ZVULqIxG17NcEk/PX8XT6bTPG0wv1+3EPpTxJepm4S5x3rTBE/abX115OTxqMXb+3BBw==","subwallet_id":12,"valid_since":1670410504,"valid_till":1670410654,"token_name":{"Len":11,"Text":"88809860606"},"content":"te6cckEBAQEAMwAAYgFodHRwczovL25mdC5mcmFnbWVudC5jb20vbnVtYmVyLzg4ODA5ODYwNjA2Lmpzb26vX872","auction_config":{"beneficiary_address":"EQBAjaOyi2wGWlk-EDkSabqqnF-MrrwMadnwqrurKpkla9nE","initial_min_bid":"20000000000","max_bid":"0","min_bid_step":5,"min_extend_time":3600,"duration":604800},"royalty_params":{"numerator":5,"denominator":100,"destination":"EQBAjaOyi2wGWlk-EDkSabqqnF-MrrwMadnwqrurKpkla9nE"}}`,
}, {
// tx hash 0b73df250c943a08bee93eff7edd3e10d85b4d3700f1858adf8547cc0f4dba4d
name: "teleitem_msg_deploy",
boc: `te6cckEBBQEA0wAEVSmaPhWAAKkpQssPUR7gVnU4J4Usgy79aEsghesXqNV3ZiG0a3zqBKgXyAEDAgEEAGGACcFWZ9FV+Xo7WsatuSn9hb+IIgkeSBJao/47XuB+LiIKBKgXyAAAoAABwgABJ1AQAGQBaHR0cHM6Ly9uZnQuZnJhZ21lbnQuY29tL3VzZXJuYW1lL29ubHlfc2FsZXMuanNvbgAiCm9ubHlfc2FsZXMFbWUAdAAASwAFAGSACBG0dlFtgMtLJ8IHIk03VVOL8ZXXgY07PhVXdWVTJK1wCtjbZA==`,
expected: `{"sender_address":"EQAFSUoWWHqI9wKzqcE8KWQZd-tCWQQvWL1Gq7sxDaNb51vm","bid":"10000000000","info":{"name":{"Len":10,"Text":"only_sales"},"domain":{"Len":5,"Text":"me\u0000t\u0000"}},"content":"te6cckEBAQEANAAAZAFodHRwczovL25mdC5mcmFnbWVudC5jb20vdXNlcm5hbWUvb25seV9zYWxlcy5qc29uhYHACA==","auction_config":{"beneficiary_address":"EQBOCrM-iq_L0drWNW3JT-wt_EEQSPJAktUf8dr3A_FxEFt1","initial_min_bid":"10000000000","max_bid":"0","min_bid_step":5,"min_extend_time":3600,"duration":604800},"royalty_params":{"numerator":5,"denominator":100,"destination":"EQBAjaOyi2wGWlk-EDkSabqqnF-MrrwMadnwqrurKpkla9nE"}}`,
},
}
for _, test := range testCases {
j := loadOperation(t, i, test.name, test.boc)
assert.Equal(t, test.expected, j)
}
}
func TestGetMethodDesc_TelemintNFTItem(t *testing.T) {
var (
interfaces []*abi.InterfaceDesc
i *abi.InterfaceDesc
)
j, err := os.ReadFile("telemint.json")
require.Nil(t, err)
err = json.Unmarshal(j, &interfaces)
require.Nil(t, err)
for _, i = range interfaces {
if i.Name == "telemint_nft_item" {
err := i.RegisterDefinitions()
require.Nil(t, err)
break
}
}
var testCases = []*struct {
name string
addr *address.Address
code string
data string
expected []any
}{
{
name: "get_telemint_auction_config",
addr: addr.MustFromBase64("EQC2yZuyN-Aph6upzg8hyZB6PvpzMlCOZd4YgkrM2aWBqVDq").MustToTonutils(),
code: `te6cckECKwEACQUAART/APSkE/S88sgLAQIBIAIDAgFIBAUAZPIw+CdvEO1E0NT0BNHQ+kDU9ATU0UUzI3/wJzIDRBTIUATPFhLM9ADMyQHIzPQAye1UAgLKBgcCASAfIAT117fv4J28QAtDTAwFxsJJfBOD6QPpAMfoAMfQEMfoAMfoAMHOptAAixwCRcJUC0x9QM+LtRNDU9ATRIdDT//pA0VMGxwXjAiJu8tDSAtD6QNT0BNTRJ4IQaT05ULrjAieCEC/LJqK64wI0NCXAACmLYjdG9wdXCMcFsCmCAkKCwIBSBMUAL5bMzM1BIIQKZo+Fbry4NUDbo4UZvAqIG6bMQHIzPQAye1U2zHhMDGSbCHi+kAwcIIQpDIn4fglbYBAcIAQyMsFUAfPFlAF+gIVy2oSyx/LPyJukTKUWM8XAeIByQH7AAB6O18IM9M/MHCCEKjLAK3IBNAUzxZDMIBAcIAQyMsFUAfPFlAF+gIVy2oSyx/LPyJukTKUWM8XAeIByQH7AACEXwRQeF8FAdM/MHCCEIt3FzUFyMv/UATPFhAkgEBwgBDIywVQB88WUAX6AhXLahLLH8s/Im6RMpRYzxcB4gHJAfsAA/TXSsAAsJJfC+Ajbo4sUZqhQBMjcPAnIG6OGVRxkCbIUATPFhLM9ADMyVJQAcjM9ADJ7VTeUSqgQxnfJYIQNxY4rrrjAiNujio2NwPAAPLg1hA2RHDwKEEwI3DwJzJDE8hQBM8WEsz0AMzJAcjM9ADJ7VThOiTAAOMCJA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xItdJIKk4AsAA8uBGA9cKB8AA8uGdAsIIjiMwgvAZ8CRB7liP2ybuJLJWjdA1w8kgbhGrl5vmLlVVih0X/94gwACTMHgB4AGDB/QPb6EweAGAAZ7KU+1E0NT0BNEx0PpA1PQE1NETXwMgbpcwbXBUcAAg4NDU1NEx0PpA+gD6ANMH0x/TH9GC4eMY2`,
data: `te6cckECCwEAAUAAAgHAAQIAg+LkF1bB5GhSvfy7vspAVh0PCJ9/NfLh4OCKCn1cp4mkgBAa8Ua/KrQpbPP1UQ/+mat/geh2lJ3UVPzST+bgNk54UAMBMAMEBQIBQAYHAgAICQBLAAUAZIAIEbR2UW2Ay0snwgciTTdVU4vxldeBjTs+FVd1ZVMkrXAAbgFodHRwczovL25mdC5mcmFnbWVudC5jb20vdXNlcm5hbWUvY3J5cHRvY29tbXVuaXR5Lmpzb24ALA9jcnlwdG9jb21tdW5pdHkFbWUAdAABFbAvXdHmYAMikBoECgBhgBbfihY3txYCaIx7CkZDmR9iJdtkWjMBj/V+YJg42dJd69GpSiAAAKAAAcIAASdQEABXgBQS0HLD6O9gcaNhqgvbubqPCuATvbFKENj1v2auCHcCzAtHGZhgAMiWsnEd9Shp`,
expected: []any{
addr.MustFromBase64("EQC2_FCxvbiwE0Rj2FIyHMj7ES7bItGYDH-r8wTBxs6S78qs").MustToTonutils(),
big.NewInt(1000000000000),
big.NewInt(0),
big.NewInt(5),
big.NewInt(3600),
big.NewInt(604800),
},
}, {
name: "get_telemint_auction_config",
addr: addr.MustFromBase64("EQDOZIib-2DZPCKPir1tT5KtOYWzwoDGM404m9NxXeKVEDpC").MustToTonutils(),
code: `te6cckECKwEACQUAART/APSkE/S88sgLAQIBIAIDAgFIBAUAZPIw+CdvEO1E0NT0BNHQ+kDU9ATU0UUzI3/wJzIDRBTIUATPFhLM9ADMyQHIzPQAye1UAgLKBgcCASAfIAT117fv4J28QAtDTAwFxsJJfBOD6QPpAMfoAMfQEMfoAMfoAMHOptAAixwCRcJUC0x9QM+LtRN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YXRib2k0MjAFbWUAdAAfhCkV`,
expected: []any{
address.NewAddressNone(),
big.NewInt(0),
big.NewInt(0),
big.NewInt(0),
big.NewInt(0),
big.NewInt(0),
},
},
}
for _, test := range testCases {
ret := execGetMethod(t, i, test.addr, test.name, test.code, test.data)
assert.Equal(t, test.expected, ret)
}
}