@thruputchain/client 0.0.0-stage → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +935 -2
- package/dist/actions-CdFSUTO2.js +298 -0
- package/dist/actions-CdFSUTO2.js.map +1 -0
- package/dist/actions-DxJZ3yIv.cjs +357 -0
- package/dist/actions-DxJZ3yIv.cjs.map +1 -0
- package/dist/actions.cjs +19 -0
- package/dist/actions.d.cts +4 -0
- package/dist/actions.d.ts +4 -0
- package/dist/actions.js +3 -0
- package/dist/client-BxB6ktQd.d.cts +690 -0
- package/dist/client-BxB6ktQd.d.cts.map +1 -0
- package/dist/client-BxB6ktQd.d.ts +690 -0
- package/dist/client-BxB6ktQd.d.ts.map +1 -0
- package/dist/codec-B7HJjMzI.cjs +8190 -0
- package/dist/codec-B7HJjMzI.cjs.map +1 -0
- package/dist/codec-CX-19jac.js +8130 -0
- package/dist/codec-CX-19jac.js.map +1 -0
- package/dist/contract-BpxjDMHw.js +1105 -0
- package/dist/contract-BpxjDMHw.js.map +1 -0
- package/dist/contract-D0wCFcAN.cjs +1219 -0
- package/dist/contract-D0wCFcAN.cjs.map +1 -0
- package/dist/contract.cjs +58 -0
- package/dist/contract.d.cts +3 -0
- package/dist/contract.d.ts +3 -0
- package/dist/contract.js +2 -0
- package/dist/contracts.cjs +1050 -0
- package/dist/contracts.cjs.map +1 -0
- package/dist/contracts.d.cts +397 -0
- package/dist/contracts.d.cts.map +1 -0
- package/dist/contracts.d.ts +397 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +1030 -0
- package/dist/contracts.js.map +1 -0
- package/dist/dev_wallet-BXWK5KR6.cjs +530 -0
- package/dist/dev_wallet-BXWK5KR6.cjs.map +1 -0
- package/dist/dev_wallet-C9eMQROk.js +497 -0
- package/dist/dev_wallet-C9eMQROk.js.map +1 -0
- package/dist/domainSeparator-B_vU_zUD.cjs +102 -0
- package/dist/domainSeparator-B_vU_zUD.cjs.map +1 -0
- package/dist/domainSeparator-CBCvxIj-.js +79 -0
- package/dist/domainSeparator-CBCvxIj-.js.map +1 -0
- package/dist/execution-CRDyKu45.d.ts +227 -0
- package/dist/execution-CRDyKu45.d.ts.map +1 -0
- package/dist/execution-DyxaIG4v.d.cts +227 -0
- package/dist/execution-DyxaIG4v.d.cts.map +1 -0
- package/dist/hex-DIcaALXL.js +112 -0
- package/dist/hex-DIcaALXL.js.map +1 -0
- package/dist/hex-DkGpiZ5e.cjs +189 -0
- package/dist/hex-DkGpiZ5e.cjs.map +1 -0
- package/dist/index--5LsCotr.d.ts +192 -0
- package/dist/index--5LsCotr.d.ts.map +1 -0
- package/dist/index-B5KqSHeL.d.cts +192 -0
- package/dist/index-B5KqSHeL.d.cts.map +1 -0
- package/dist/index-BZ0O5jZG.d.cts +163 -0
- package/dist/index-BZ0O5jZG.d.cts.map +1 -0
- package/dist/index-BuPQcAK2.d.ts +23 -0
- package/dist/index-BuPQcAK2.d.ts.map +1 -0
- package/dist/index-ByNNqY7S.d.cts +83 -0
- package/dist/index-ByNNqY7S.d.cts.map +1 -0
- package/dist/index-C-M-4jMR.d.cts +263 -0
- package/dist/index-C-M-4jMR.d.cts.map +1 -0
- package/dist/index-C97zw2rk.d.ts +137 -0
- package/dist/index-C97zw2rk.d.ts.map +1 -0
- package/dist/index-CIHK7Ew9.d.cts +303 -0
- package/dist/index-CIHK7Ew9.d.cts.map +1 -0
- package/dist/index-CIHK7Ew9.d.ts +303 -0
- package/dist/index-CIHK7Ew9.d.ts.map +1 -0
- package/dist/index-CXuO2Zjx.d.ts +263 -0
- package/dist/index-CXuO2Zjx.d.ts.map +1 -0
- package/dist/index-DOEBWXY2.d.cts +137 -0
- package/dist/index-DOEBWXY2.d.cts.map +1 -0
- package/dist/index-DzrLv3EA.d.cts +82 -0
- package/dist/index-DzrLv3EA.d.cts.map +1 -0
- package/dist/index-DzrLv3EA.d.ts +82 -0
- package/dist/index-DzrLv3EA.d.ts.map +1 -0
- package/dist/index-fdTURpBk.d.ts +83 -0
- package/dist/index-fdTURpBk.d.ts.map +1 -0
- package/dist/index-sAzHHayu.d.ts +163 -0
- package/dist/index-sAzHHayu.d.ts.map +1 -0
- package/dist/index-uQqRk9Ww.d.cts +23 -0
- package/dist/index-uQqRk9Ww.d.cts.map +1 -0
- package/dist/index.cjs +478 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +173 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +173 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +231 -0
- package/dist/index.js.map +1 -0
- package/dist/provider.cjs +101 -0
- package/dist/provider.cjs.map +1 -0
- package/dist/provider.d.cts +2 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.js +76 -0
- package/dist/provider.js.map +1 -0
- package/dist/readError-BVbfTMLv.cjs +604 -0
- package/dist/readError-BVbfTMLv.cjs.map +1 -0
- package/dist/readError-Dn_XN98x.js +551 -0
- package/dist/readError-Dn_XN98x.js.map +1 -0
- package/dist/readViews-BKJtE5J3.d.cts +594 -0
- package/dist/readViews-BKJtE5J3.d.cts.map +1 -0
- package/dist/readViews-C_FX8wby.d.ts +594 -0
- package/dist/readViews-C_FX8wby.d.ts.map +1 -0
- package/dist/rolldown-runtime-D6vf50IK.cjs +28 -0
- package/dist/sendInvocation-2EZanZZr.cjs +661 -0
- package/dist/sendInvocation-2EZanZZr.cjs.map +1 -0
- package/dist/sendInvocation-C4ruTC-9.js +505 -0
- package/dist/sendInvocation-C4ruTC-9.js.map +1 -0
- package/dist/sign-BewmV_EL.cjs +139 -0
- package/dist/sign-BewmV_EL.cjs.map +1 -0
- package/dist/sign-DVIRyW8Y.js +122 -0
- package/dist/sign-DVIRyW8Y.js.map +1 -0
- package/dist/sign-Ve0eetRO.d.ts +48 -0
- package/dist/sign-Ve0eetRO.d.ts.map +1 -0
- package/dist/sign-eUT0iGQG.d.cts +48 -0
- package/dist/sign-eUT0iGQG.d.cts.map +1 -0
- package/dist/signed-op.cjs +9 -0
- package/dist/signed-op.d.cts +3 -0
- package/dist/signed-op.d.ts +3 -0
- package/dist/signed-op.js +3 -0
- package/dist/signedOp-Bluo0OAd.cjs +183 -0
- package/dist/signedOp-Bluo0OAd.cjs.map +1 -0
- package/dist/signedOp-x4fakrr4.js +166 -0
- package/dist/signedOp-x4fakrr4.js.map +1 -0
- package/dist/signed_op-BzVbBgv4.js +154 -0
- package/dist/signed_op-BzVbBgv4.js.map +1 -0
- package/dist/signed_op-DFgQ2yFj.d.ts +58 -0
- package/dist/signed_op-DFgQ2yFj.d.ts.map +1 -0
- package/dist/signed_op-LwxrDud8.d.cts +58 -0
- package/dist/signed_op-LwxrDud8.d.cts.map +1 -0
- package/dist/signed_op-z_8fqAi1.cjs +175 -0
- package/dist/signed_op-z_8fqAi1.cjs.map +1 -0
- package/dist/signers-BFP84wJP.cjs +137 -0
- package/dist/signers-BFP84wJP.cjs.map +1 -0
- package/dist/signers-CzOSedwJ.js +120 -0
- package/dist/signers-CzOSedwJ.js.map +1 -0
- package/dist/signers.cjs +5 -0
- package/dist/signers.d.cts +3 -0
- package/dist/signers.d.ts +3 -0
- package/dist/signers.js +2 -0
- package/dist/size-506oTE28.js +91 -0
- package/dist/size-506oTE28.js.map +1 -0
- package/dist/size-OAFfOthl.cjs +108 -0
- package/dist/size-OAFfOthl.cjs.map +1 -0
- package/dist/transaction-CwkQxQOx.js +24 -0
- package/dist/transaction-CwkQxQOx.js.map +1 -0
- package/dist/transaction-DrSrCJ5y.cjs +47 -0
- package/dist/transaction-DrSrCJ5y.cjs.map +1 -0
- package/dist/transaction.cjs +13 -0
- package/dist/transaction.d.cts +3 -0
- package/dist/transaction.d.ts +3 -0
- package/dist/transaction.js +4 -0
- package/dist/transactionHash-CO9ajbvU.js +24 -0
- package/dist/transactionHash-CO9ajbvU.js.map +1 -0
- package/dist/transactionHash-D5yf4KoL.cjs +29 -0
- package/dist/transactionHash-D5yf4KoL.cjs.map +1 -0
- package/dist/transport-B-P16rs6.cjs +252 -0
- package/dist/transport-B-P16rs6.cjs.map +1 -0
- package/dist/transport-DqyoNtUy.js +234 -0
- package/dist/transport-DqyoNtUy.js.map +1 -0
- package/dist/transport.cjs +19 -0
- package/dist/transport.d.cts +3 -0
- package/dist/transport.d.ts +3 -0
- package/dist/transport.js +4 -0
- package/dist/types-BE40oD_Q.d.cts +18 -0
- package/dist/types-BE40oD_Q.d.cts.map +1 -0
- package/dist/types-BE40oD_Q.d.ts +18 -0
- package/dist/types-BE40oD_Q.d.ts.map +1 -0
- package/dist/validation-4w-vDGAi.cjs +543 -0
- package/dist/validation-4w-vDGAi.cjs.map +1 -0
- package/dist/validation-eXATmgO0.js +411 -0
- package/dist/validation-eXATmgO0.js.map +1 -0
- package/dist/wallet-Bthapk8i.cjs +709 -0
- package/dist/wallet-Bthapk8i.cjs.map +1 -0
- package/dist/wallet-CwWPYoHF.js +667 -0
- package/dist/wallet-CwWPYoHF.js.map +1 -0
- package/dist/wallet.cjs +27 -0
- package/dist/wallet.d.cts +3 -0
- package/dist/wallet.d.ts +3 -0
- package/dist/wallet.js +3 -0
- package/package.json +122 -4
|
@@ -0,0 +1,1030 @@
|
|
|
1
|
+
import { c as defineContractEvent, o as defineContractMethod, u as createContractCodecContext } from "./contract-BpxjDMHw.js";
|
|
2
|
+
import { a as spec, i as default_wallet, n as spec$1, r as DefaultWallet, t as DevWallet } from "./dev_wallet-C9eMQROk.js";
|
|
3
|
+
import { n as spec$4, r as thruput_signed_op_if, t as SignedOp } from "./signed_op-BzVbBgv4.js";
|
|
4
|
+
import * as __gh_protocol from "@thruputchain/protocol";
|
|
5
|
+
import * as __gh_contract_spec from "@thruputchain/contract-spec";
|
|
6
|
+
import * as __gh_protocol_utils from "@thruputchain/protocol/utils";
|
|
7
|
+
//#region src/contracts/erc20.ts
|
|
8
|
+
const __gh_s$1 = __gh_contract_spec.contractSpecString;
|
|
9
|
+
const __gh_entrypoints$1 = {
|
|
10
|
+
ERC20: { v0_1: {
|
|
11
|
+
adjustAllowance: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("d5acf88949a80342")),
|
|
12
|
+
allowance: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("d296058ebcf260cb")),
|
|
13
|
+
deleteAllowance: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("dafe89d86eaf8ddf")),
|
|
14
|
+
deleteBalance: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("2924d916f07d51aa")),
|
|
15
|
+
getBalance: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("b921b642d31d7dac")),
|
|
16
|
+
getBalanceOf: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("41ac95d6e06e2620")),
|
|
17
|
+
initialize: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("18944c3aa4944671")),
|
|
18
|
+
mint: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("f3f3bd9dede066a3")),
|
|
19
|
+
totalSupply: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("2cbfcd0cb5c3f962")),
|
|
20
|
+
transfer: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("63285b3523f9dc3f")),
|
|
21
|
+
transferFrom: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("695be60513fcc294"))
|
|
22
|
+
} },
|
|
23
|
+
ERC20Metadata: { v0_1: {
|
|
24
|
+
decimals: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("d9462e42964991d0")),
|
|
25
|
+
initialize: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("f65b96296d684b0b")),
|
|
26
|
+
name: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("51ad51ee8a5d9dd8")),
|
|
27
|
+
symbol: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("3ddac721aa5abdea"))
|
|
28
|
+
} }
|
|
29
|
+
};
|
|
30
|
+
const spec$3 = {
|
|
31
|
+
interfaces: [{
|
|
32
|
+
name: __gh_s$1("ERC20"),
|
|
33
|
+
vers: __gh_s$1("0.1.68"),
|
|
34
|
+
throws: [{
|
|
35
|
+
selector: 17743209598778486752n,
|
|
36
|
+
ty: {
|
|
37
|
+
v: __gh_contract_spec.ContractTypeKind.Named,
|
|
38
|
+
named: {
|
|
39
|
+
crate_name: __gh_s$1("thruput-erc20-if"),
|
|
40
|
+
major: __gh_s$1("0.1"),
|
|
41
|
+
module_path: __gh_s$1("thruput_erc20_if::error"),
|
|
42
|
+
declared: __gh_s$1("ERC20Error")
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}],
|
|
46
|
+
methods: [
|
|
47
|
+
{
|
|
48
|
+
name: __gh_s$1("adjust_allowance"),
|
|
49
|
+
args: [{
|
|
50
|
+
name: __gh_s$1("spender"),
|
|
51
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
52
|
+
}, {
|
|
53
|
+
name: __gh_s$1("difference"),
|
|
54
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.I128 }
|
|
55
|
+
}],
|
|
56
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.Void },
|
|
57
|
+
effect: null
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: __gh_s$1("allowance"),
|
|
61
|
+
args: [{
|
|
62
|
+
name: __gh_s$1("owner"),
|
|
63
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
64
|
+
}, {
|
|
65
|
+
name: __gh_s$1("spender"),
|
|
66
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
67
|
+
}],
|
|
68
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.I128 },
|
|
69
|
+
effect: null
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: __gh_s$1("delete_allowance"),
|
|
73
|
+
args: [{
|
|
74
|
+
name: __gh_s$1("spender"),
|
|
75
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
76
|
+
}],
|
|
77
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.Void },
|
|
78
|
+
effect: null
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: __gh_s$1("delete_balance"),
|
|
82
|
+
args: [],
|
|
83
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.Void },
|
|
84
|
+
effect: null
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: __gh_s$1("get_balance"),
|
|
88
|
+
args: [],
|
|
89
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.I128 },
|
|
90
|
+
effect: null
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: __gh_s$1("get_balance_of"),
|
|
94
|
+
args: [{
|
|
95
|
+
name: __gh_s$1("addr"),
|
|
96
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
97
|
+
}],
|
|
98
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.I128 },
|
|
99
|
+
effect: null
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: __gh_s$1("initialize"),
|
|
103
|
+
args: [{
|
|
104
|
+
name: __gh_s$1("administrator"),
|
|
105
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
106
|
+
}],
|
|
107
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.Void },
|
|
108
|
+
effect: null
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: __gh_s$1("mint"),
|
|
112
|
+
args: [{
|
|
113
|
+
name: __gh_s$1("receiver"),
|
|
114
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
115
|
+
}, {
|
|
116
|
+
name: __gh_s$1("amount"),
|
|
117
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.I128 }
|
|
118
|
+
}],
|
|
119
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.Void },
|
|
120
|
+
effect: null
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: __gh_s$1("total_supply"),
|
|
124
|
+
args: [],
|
|
125
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.I128 },
|
|
126
|
+
effect: null
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: __gh_s$1("transfer"),
|
|
130
|
+
args: [{
|
|
131
|
+
name: __gh_s$1("receiver"),
|
|
132
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
133
|
+
}, {
|
|
134
|
+
name: __gh_s$1("amount"),
|
|
135
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.I128 }
|
|
136
|
+
}],
|
|
137
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.Void },
|
|
138
|
+
effect: null
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: __gh_s$1("transfer_from"),
|
|
142
|
+
args: [
|
|
143
|
+
{
|
|
144
|
+
name: __gh_s$1("owner"),
|
|
145
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: __gh_s$1("receiver"),
|
|
149
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: __gh_s$1("amount"),
|
|
153
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.I128 }
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.Void },
|
|
157
|
+
effect: null
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}, {
|
|
161
|
+
name: __gh_s$1("ERC20Metadata"),
|
|
162
|
+
vers: __gh_s$1("0.1.68"),
|
|
163
|
+
throws: [],
|
|
164
|
+
methods: [
|
|
165
|
+
{
|
|
166
|
+
name: __gh_s$1("decimals"),
|
|
167
|
+
args: [],
|
|
168
|
+
return_type: {
|
|
169
|
+
v: __gh_contract_spec.ContractTypeKind.Option,
|
|
170
|
+
option_inner: { v: __gh_contract_spec.ContractTypeKind.U32 }
|
|
171
|
+
},
|
|
172
|
+
effect: null
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: __gh_s$1("initialize"),
|
|
176
|
+
args: [
|
|
177
|
+
{
|
|
178
|
+
name: __gh_s$1("administrator"),
|
|
179
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: __gh_s$1("name"),
|
|
183
|
+
ty: {
|
|
184
|
+
v: __gh_contract_spec.ContractTypeKind.Option,
|
|
185
|
+
option_inner: { v: __gh_contract_spec.ContractTypeKind.String }
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: __gh_s$1("symbol"),
|
|
190
|
+
ty: {
|
|
191
|
+
v: __gh_contract_spec.ContractTypeKind.Option,
|
|
192
|
+
option_inner: { v: __gh_contract_spec.ContractTypeKind.String }
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: __gh_s$1("decimals"),
|
|
197
|
+
ty: {
|
|
198
|
+
v: __gh_contract_spec.ContractTypeKind.Option,
|
|
199
|
+
option_inner: { v: __gh_contract_spec.ContractTypeKind.U32 }
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.Void },
|
|
204
|
+
effect: null
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: __gh_s$1("name"),
|
|
208
|
+
args: [],
|
|
209
|
+
return_type: {
|
|
210
|
+
v: __gh_contract_spec.ContractTypeKind.Option,
|
|
211
|
+
option_inner: { v: __gh_contract_spec.ContractTypeKind.String }
|
|
212
|
+
},
|
|
213
|
+
effect: null
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: __gh_s$1("symbol"),
|
|
217
|
+
args: [],
|
|
218
|
+
return_type: {
|
|
219
|
+
v: __gh_contract_spec.ContractTypeKind.Option,
|
|
220
|
+
option_inner: { v: __gh_contract_spec.ContractTypeKind.String }
|
|
221
|
+
},
|
|
222
|
+
effect: null
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
}],
|
|
226
|
+
type_defs: [{
|
|
227
|
+
v: __gh_contract_spec.ContractTypeDefKind.TypeDefEnum,
|
|
228
|
+
enum_def: {
|
|
229
|
+
name: {
|
|
230
|
+
crate_name: __gh_s$1("thruput-erc20-if"),
|
|
231
|
+
major: __gh_s$1("0.1"),
|
|
232
|
+
module_path: __gh_s$1("thruput_erc20_if::error"),
|
|
233
|
+
declared: __gh_s$1("ERC20Error")
|
|
234
|
+
},
|
|
235
|
+
variants: [
|
|
236
|
+
{
|
|
237
|
+
name: __gh_s$1("AlreadyInitialized"),
|
|
238
|
+
value: 1n
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: __gh_s$1("MustBeContractOwner"),
|
|
242
|
+
value: 2n
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: __gh_s$1("TooLarge"),
|
|
246
|
+
value: 3n
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: __gh_s$1("BalanceNotZero"),
|
|
250
|
+
value: 4n
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: __gh_s$1("NegativeAmount"),
|
|
254
|
+
value: 5n
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: __gh_s$1("Internal"),
|
|
258
|
+
value: 100n
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
}],
|
|
263
|
+
events: [
|
|
264
|
+
{
|
|
265
|
+
name: {
|
|
266
|
+
crate_name: __gh_s$1("thruput-erc20-if"),
|
|
267
|
+
major: __gh_s$1("0.1"),
|
|
268
|
+
module_path: __gh_s$1("thruput_erc20_if::events"),
|
|
269
|
+
declared: __gh_s$1("AllowanceChangeEvent")
|
|
270
|
+
},
|
|
271
|
+
signature: __gh_protocol.topic(__gh_protocol_utils.fromHex("b607e0e1095d9b516d05fdb9ed63e6717aec2740bda162dd0d6336d4a19335f7")),
|
|
272
|
+
topics: [{
|
|
273
|
+
name: __gh_s$1("owner"),
|
|
274
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
275
|
+
}, {
|
|
276
|
+
name: __gh_s$1("spender"),
|
|
277
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
278
|
+
}],
|
|
279
|
+
fields: [{
|
|
280
|
+
name: __gh_s$1("difference"),
|
|
281
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.I128 }
|
|
282
|
+
}]
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: {
|
|
286
|
+
crate_name: __gh_s$1("thruput-erc20-if"),
|
|
287
|
+
major: __gh_s$1("0.1"),
|
|
288
|
+
module_path: __gh_s$1("thruput_erc20_if::events"),
|
|
289
|
+
declared: __gh_s$1("AllowanceDeleteEvent")
|
|
290
|
+
},
|
|
291
|
+
signature: __gh_protocol.topic(__gh_protocol_utils.fromHex("9384f33409fa51703bb4dc8d7f5b87e469840866bde189d8a263c7b3be110872")),
|
|
292
|
+
topics: [{
|
|
293
|
+
name: __gh_s$1("owner"),
|
|
294
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
295
|
+
}, {
|
|
296
|
+
name: __gh_s$1("spender"),
|
|
297
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
298
|
+
}],
|
|
299
|
+
fields: [{
|
|
300
|
+
name: __gh_s$1("removed"),
|
|
301
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.I128 }
|
|
302
|
+
}]
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: {
|
|
306
|
+
crate_name: __gh_s$1("thruput-erc20-if"),
|
|
307
|
+
major: __gh_s$1("0.1"),
|
|
308
|
+
module_path: __gh_s$1("thruput_erc20_if::events"),
|
|
309
|
+
declared: __gh_s$1("MintEvent")
|
|
310
|
+
},
|
|
311
|
+
signature: __gh_protocol.topic(__gh_protocol_utils.fromHex("4e939db8b4598c749291f2b23802902094b3e6e5b0c4de6995429e25493287fc")),
|
|
312
|
+
topics: [{
|
|
313
|
+
name: __gh_s$1("to"),
|
|
314
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
315
|
+
}],
|
|
316
|
+
fields: [{
|
|
317
|
+
name: __gh_s$1("amount"),
|
|
318
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.I128 }
|
|
319
|
+
}]
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
name: {
|
|
323
|
+
crate_name: __gh_s$1("thruput-erc20-if"),
|
|
324
|
+
major: __gh_s$1("0.1"),
|
|
325
|
+
module_path: __gh_s$1("thruput_erc20_if::events"),
|
|
326
|
+
declared: __gh_s$1("TransferEvent")
|
|
327
|
+
},
|
|
328
|
+
signature: __gh_protocol.topic(__gh_protocol_utils.fromHex("5229153abd7aabc422c9e2217845f087f3819787d3d72375155f4c65f2089cce")),
|
|
329
|
+
topics: [{
|
|
330
|
+
name: __gh_s$1("from"),
|
|
331
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
332
|
+
}, {
|
|
333
|
+
name: __gh_s$1("to"),
|
|
334
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
335
|
+
}],
|
|
336
|
+
fields: [{
|
|
337
|
+
name: __gh_s$1("amount"),
|
|
338
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.I128 }
|
|
339
|
+
}]
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
};
|
|
343
|
+
const __gh_codecs$1 = createContractCodecContext(spec$3.type_defs);
|
|
344
|
+
const ERC20 = { v0_1: {
|
|
345
|
+
adjustAllowance: defineContractMethod({
|
|
346
|
+
interfaceName: "ERC20",
|
|
347
|
+
interfaceVersion: "0.1.68",
|
|
348
|
+
abiName: "adjust_allowance",
|
|
349
|
+
publicName: "adjustAllowance",
|
|
350
|
+
entrypoint: __gh_entrypoints$1.ERC20.v0_1.adjustAllowance,
|
|
351
|
+
effect: spec$3.interfaces[0].methods[0].effect,
|
|
352
|
+
args: [{
|
|
353
|
+
abiName: "spender",
|
|
354
|
+
publicName: "spender",
|
|
355
|
+
type: spec$3.interfaces[0].methods[0].args[0].ty
|
|
356
|
+
}, {
|
|
357
|
+
abiName: "difference",
|
|
358
|
+
publicName: "difference",
|
|
359
|
+
type: spec$3.interfaces[0].methods[0].args[1].ty
|
|
360
|
+
}],
|
|
361
|
+
returnType: spec$3.interfaces[0].methods[0].return_type,
|
|
362
|
+
throws: [{
|
|
363
|
+
selector: 17743209598778486752n,
|
|
364
|
+
name: "ERC20Error",
|
|
365
|
+
type: spec$3.interfaces[0].throws[0].ty
|
|
366
|
+
}],
|
|
367
|
+
codecs: __gh_codecs$1
|
|
368
|
+
}),
|
|
369
|
+
allowance: defineContractMethod({
|
|
370
|
+
interfaceName: "ERC20",
|
|
371
|
+
interfaceVersion: "0.1.68",
|
|
372
|
+
abiName: "allowance",
|
|
373
|
+
publicName: "allowance",
|
|
374
|
+
entrypoint: __gh_entrypoints$1.ERC20.v0_1.allowance,
|
|
375
|
+
effect: spec$3.interfaces[0].methods[1].effect,
|
|
376
|
+
args: [{
|
|
377
|
+
abiName: "owner",
|
|
378
|
+
publicName: "owner",
|
|
379
|
+
type: spec$3.interfaces[0].methods[1].args[0].ty
|
|
380
|
+
}, {
|
|
381
|
+
abiName: "spender",
|
|
382
|
+
publicName: "spender",
|
|
383
|
+
type: spec$3.interfaces[0].methods[1].args[1].ty
|
|
384
|
+
}],
|
|
385
|
+
returnType: spec$3.interfaces[0].methods[1].return_type,
|
|
386
|
+
throws: [{
|
|
387
|
+
selector: 17743209598778486752n,
|
|
388
|
+
name: "ERC20Error",
|
|
389
|
+
type: spec$3.interfaces[0].throws[0].ty
|
|
390
|
+
}],
|
|
391
|
+
codecs: __gh_codecs$1
|
|
392
|
+
}),
|
|
393
|
+
deleteAllowance: defineContractMethod({
|
|
394
|
+
interfaceName: "ERC20",
|
|
395
|
+
interfaceVersion: "0.1.68",
|
|
396
|
+
abiName: "delete_allowance",
|
|
397
|
+
publicName: "deleteAllowance",
|
|
398
|
+
entrypoint: __gh_entrypoints$1.ERC20.v0_1.deleteAllowance,
|
|
399
|
+
effect: spec$3.interfaces[0].methods[2].effect,
|
|
400
|
+
args: [{
|
|
401
|
+
abiName: "spender",
|
|
402
|
+
publicName: "spender",
|
|
403
|
+
type: spec$3.interfaces[0].methods[2].args[0].ty
|
|
404
|
+
}],
|
|
405
|
+
returnType: spec$3.interfaces[0].methods[2].return_type,
|
|
406
|
+
throws: [{
|
|
407
|
+
selector: 17743209598778486752n,
|
|
408
|
+
name: "ERC20Error",
|
|
409
|
+
type: spec$3.interfaces[0].throws[0].ty
|
|
410
|
+
}],
|
|
411
|
+
codecs: __gh_codecs$1
|
|
412
|
+
}),
|
|
413
|
+
deleteBalance: defineContractMethod({
|
|
414
|
+
interfaceName: "ERC20",
|
|
415
|
+
interfaceVersion: "0.1.68",
|
|
416
|
+
abiName: "delete_balance",
|
|
417
|
+
publicName: "deleteBalance",
|
|
418
|
+
entrypoint: __gh_entrypoints$1.ERC20.v0_1.deleteBalance,
|
|
419
|
+
effect: spec$3.interfaces[0].methods[3].effect,
|
|
420
|
+
args: [],
|
|
421
|
+
returnType: spec$3.interfaces[0].methods[3].return_type,
|
|
422
|
+
throws: [{
|
|
423
|
+
selector: 17743209598778486752n,
|
|
424
|
+
name: "ERC20Error",
|
|
425
|
+
type: spec$3.interfaces[0].throws[0].ty
|
|
426
|
+
}],
|
|
427
|
+
codecs: __gh_codecs$1
|
|
428
|
+
}),
|
|
429
|
+
getBalance: defineContractMethod({
|
|
430
|
+
interfaceName: "ERC20",
|
|
431
|
+
interfaceVersion: "0.1.68",
|
|
432
|
+
abiName: "get_balance",
|
|
433
|
+
publicName: "getBalance",
|
|
434
|
+
entrypoint: __gh_entrypoints$1.ERC20.v0_1.getBalance,
|
|
435
|
+
effect: spec$3.interfaces[0].methods[4].effect,
|
|
436
|
+
args: [],
|
|
437
|
+
returnType: spec$3.interfaces[0].methods[4].return_type,
|
|
438
|
+
throws: [{
|
|
439
|
+
selector: 17743209598778486752n,
|
|
440
|
+
name: "ERC20Error",
|
|
441
|
+
type: spec$3.interfaces[0].throws[0].ty
|
|
442
|
+
}],
|
|
443
|
+
codecs: __gh_codecs$1
|
|
444
|
+
}),
|
|
445
|
+
getBalanceOf: defineContractMethod({
|
|
446
|
+
interfaceName: "ERC20",
|
|
447
|
+
interfaceVersion: "0.1.68",
|
|
448
|
+
abiName: "get_balance_of",
|
|
449
|
+
publicName: "getBalanceOf",
|
|
450
|
+
entrypoint: __gh_entrypoints$1.ERC20.v0_1.getBalanceOf,
|
|
451
|
+
effect: spec$3.interfaces[0].methods[5].effect,
|
|
452
|
+
args: [{
|
|
453
|
+
abiName: "addr",
|
|
454
|
+
publicName: "addr",
|
|
455
|
+
type: spec$3.interfaces[0].methods[5].args[0].ty
|
|
456
|
+
}],
|
|
457
|
+
returnType: spec$3.interfaces[0].methods[5].return_type,
|
|
458
|
+
throws: [{
|
|
459
|
+
selector: 17743209598778486752n,
|
|
460
|
+
name: "ERC20Error",
|
|
461
|
+
type: spec$3.interfaces[0].throws[0].ty
|
|
462
|
+
}],
|
|
463
|
+
codecs: __gh_codecs$1
|
|
464
|
+
}),
|
|
465
|
+
initialize: defineContractMethod({
|
|
466
|
+
interfaceName: "ERC20",
|
|
467
|
+
interfaceVersion: "0.1.68",
|
|
468
|
+
abiName: "initialize",
|
|
469
|
+
publicName: "initialize",
|
|
470
|
+
entrypoint: __gh_entrypoints$1.ERC20.v0_1.initialize,
|
|
471
|
+
effect: spec$3.interfaces[0].methods[6].effect,
|
|
472
|
+
args: [{
|
|
473
|
+
abiName: "administrator",
|
|
474
|
+
publicName: "administrator",
|
|
475
|
+
type: spec$3.interfaces[0].methods[6].args[0].ty
|
|
476
|
+
}],
|
|
477
|
+
returnType: spec$3.interfaces[0].methods[6].return_type,
|
|
478
|
+
throws: [{
|
|
479
|
+
selector: 17743209598778486752n,
|
|
480
|
+
name: "ERC20Error",
|
|
481
|
+
type: spec$3.interfaces[0].throws[0].ty
|
|
482
|
+
}],
|
|
483
|
+
codecs: __gh_codecs$1
|
|
484
|
+
}),
|
|
485
|
+
mint: defineContractMethod({
|
|
486
|
+
interfaceName: "ERC20",
|
|
487
|
+
interfaceVersion: "0.1.68",
|
|
488
|
+
abiName: "mint",
|
|
489
|
+
publicName: "mint",
|
|
490
|
+
entrypoint: __gh_entrypoints$1.ERC20.v0_1.mint,
|
|
491
|
+
effect: spec$3.interfaces[0].methods[7].effect,
|
|
492
|
+
args: [{
|
|
493
|
+
abiName: "receiver",
|
|
494
|
+
publicName: "receiver",
|
|
495
|
+
type: spec$3.interfaces[0].methods[7].args[0].ty
|
|
496
|
+
}, {
|
|
497
|
+
abiName: "amount",
|
|
498
|
+
publicName: "amount",
|
|
499
|
+
type: spec$3.interfaces[0].methods[7].args[1].ty
|
|
500
|
+
}],
|
|
501
|
+
returnType: spec$3.interfaces[0].methods[7].return_type,
|
|
502
|
+
throws: [{
|
|
503
|
+
selector: 17743209598778486752n,
|
|
504
|
+
name: "ERC20Error",
|
|
505
|
+
type: spec$3.interfaces[0].throws[0].ty
|
|
506
|
+
}],
|
|
507
|
+
codecs: __gh_codecs$1
|
|
508
|
+
}),
|
|
509
|
+
totalSupply: defineContractMethod({
|
|
510
|
+
interfaceName: "ERC20",
|
|
511
|
+
interfaceVersion: "0.1.68",
|
|
512
|
+
abiName: "total_supply",
|
|
513
|
+
publicName: "totalSupply",
|
|
514
|
+
entrypoint: __gh_entrypoints$1.ERC20.v0_1.totalSupply,
|
|
515
|
+
effect: spec$3.interfaces[0].methods[8].effect,
|
|
516
|
+
args: [],
|
|
517
|
+
returnType: spec$3.interfaces[0].methods[8].return_type,
|
|
518
|
+
throws: [{
|
|
519
|
+
selector: 17743209598778486752n,
|
|
520
|
+
name: "ERC20Error",
|
|
521
|
+
type: spec$3.interfaces[0].throws[0].ty
|
|
522
|
+
}],
|
|
523
|
+
codecs: __gh_codecs$1
|
|
524
|
+
}),
|
|
525
|
+
transfer: defineContractMethod({
|
|
526
|
+
interfaceName: "ERC20",
|
|
527
|
+
interfaceVersion: "0.1.68",
|
|
528
|
+
abiName: "transfer",
|
|
529
|
+
publicName: "transfer",
|
|
530
|
+
entrypoint: __gh_entrypoints$1.ERC20.v0_1.transfer,
|
|
531
|
+
effect: spec$3.interfaces[0].methods[9].effect,
|
|
532
|
+
args: [{
|
|
533
|
+
abiName: "receiver",
|
|
534
|
+
publicName: "receiver",
|
|
535
|
+
type: spec$3.interfaces[0].methods[9].args[0].ty
|
|
536
|
+
}, {
|
|
537
|
+
abiName: "amount",
|
|
538
|
+
publicName: "amount",
|
|
539
|
+
type: spec$3.interfaces[0].methods[9].args[1].ty
|
|
540
|
+
}],
|
|
541
|
+
returnType: spec$3.interfaces[0].methods[9].return_type,
|
|
542
|
+
throws: [{
|
|
543
|
+
selector: 17743209598778486752n,
|
|
544
|
+
name: "ERC20Error",
|
|
545
|
+
type: spec$3.interfaces[0].throws[0].ty
|
|
546
|
+
}],
|
|
547
|
+
codecs: __gh_codecs$1
|
|
548
|
+
}),
|
|
549
|
+
transferFrom: defineContractMethod({
|
|
550
|
+
interfaceName: "ERC20",
|
|
551
|
+
interfaceVersion: "0.1.68",
|
|
552
|
+
abiName: "transfer_from",
|
|
553
|
+
publicName: "transferFrom",
|
|
554
|
+
entrypoint: __gh_entrypoints$1.ERC20.v0_1.transferFrom,
|
|
555
|
+
effect: spec$3.interfaces[0].methods[10].effect,
|
|
556
|
+
args: [
|
|
557
|
+
{
|
|
558
|
+
abiName: "owner",
|
|
559
|
+
publicName: "owner",
|
|
560
|
+
type: spec$3.interfaces[0].methods[10].args[0].ty
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
abiName: "receiver",
|
|
564
|
+
publicName: "receiver",
|
|
565
|
+
type: spec$3.interfaces[0].methods[10].args[1].ty
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
abiName: "amount",
|
|
569
|
+
publicName: "amount",
|
|
570
|
+
type: spec$3.interfaces[0].methods[10].args[2].ty
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
returnType: spec$3.interfaces[0].methods[10].return_type,
|
|
574
|
+
throws: [{
|
|
575
|
+
selector: 17743209598778486752n,
|
|
576
|
+
name: "ERC20Error",
|
|
577
|
+
type: spec$3.interfaces[0].throws[0].ty
|
|
578
|
+
}],
|
|
579
|
+
codecs: __gh_codecs$1
|
|
580
|
+
})
|
|
581
|
+
} };
|
|
582
|
+
const ERC20Metadata = { v0_1: {
|
|
583
|
+
decimals: defineContractMethod({
|
|
584
|
+
interfaceName: "ERC20Metadata",
|
|
585
|
+
interfaceVersion: "0.1.68",
|
|
586
|
+
abiName: "decimals",
|
|
587
|
+
publicName: "decimals",
|
|
588
|
+
entrypoint: __gh_entrypoints$1.ERC20Metadata.v0_1.decimals,
|
|
589
|
+
effect: spec$3.interfaces[1].methods[0].effect,
|
|
590
|
+
args: [],
|
|
591
|
+
returnType: spec$3.interfaces[1].methods[0].return_type,
|
|
592
|
+
throws: [],
|
|
593
|
+
codecs: __gh_codecs$1
|
|
594
|
+
}),
|
|
595
|
+
initialize: defineContractMethod({
|
|
596
|
+
interfaceName: "ERC20Metadata",
|
|
597
|
+
interfaceVersion: "0.1.68",
|
|
598
|
+
abiName: "initialize",
|
|
599
|
+
publicName: "initialize",
|
|
600
|
+
entrypoint: __gh_entrypoints$1.ERC20Metadata.v0_1.initialize,
|
|
601
|
+
effect: spec$3.interfaces[1].methods[1].effect,
|
|
602
|
+
args: [
|
|
603
|
+
{
|
|
604
|
+
abiName: "administrator",
|
|
605
|
+
publicName: "administrator",
|
|
606
|
+
type: spec$3.interfaces[1].methods[1].args[0].ty
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
abiName: "name",
|
|
610
|
+
publicName: "name",
|
|
611
|
+
type: spec$3.interfaces[1].methods[1].args[1].ty
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
abiName: "symbol",
|
|
615
|
+
publicName: "symbol",
|
|
616
|
+
type: spec$3.interfaces[1].methods[1].args[2].ty
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
abiName: "decimals",
|
|
620
|
+
publicName: "decimals",
|
|
621
|
+
type: spec$3.interfaces[1].methods[1].args[3].ty
|
|
622
|
+
}
|
|
623
|
+
],
|
|
624
|
+
returnType: spec$3.interfaces[1].methods[1].return_type,
|
|
625
|
+
throws: [],
|
|
626
|
+
codecs: __gh_codecs$1
|
|
627
|
+
}),
|
|
628
|
+
name: defineContractMethod({
|
|
629
|
+
interfaceName: "ERC20Metadata",
|
|
630
|
+
interfaceVersion: "0.1.68",
|
|
631
|
+
abiName: "name",
|
|
632
|
+
publicName: "name",
|
|
633
|
+
entrypoint: __gh_entrypoints$1.ERC20Metadata.v0_1.name,
|
|
634
|
+
effect: spec$3.interfaces[1].methods[2].effect,
|
|
635
|
+
args: [],
|
|
636
|
+
returnType: spec$3.interfaces[1].methods[2].return_type,
|
|
637
|
+
throws: [],
|
|
638
|
+
codecs: __gh_codecs$1
|
|
639
|
+
}),
|
|
640
|
+
symbol: defineContractMethod({
|
|
641
|
+
interfaceName: "ERC20Metadata",
|
|
642
|
+
interfaceVersion: "0.1.68",
|
|
643
|
+
abiName: "symbol",
|
|
644
|
+
publicName: "symbol",
|
|
645
|
+
entrypoint: __gh_entrypoints$1.ERC20Metadata.v0_1.symbol,
|
|
646
|
+
effect: spec$3.interfaces[1].methods[3].effect,
|
|
647
|
+
args: [],
|
|
648
|
+
returnType: spec$3.interfaces[1].methods[3].return_type,
|
|
649
|
+
throws: [],
|
|
650
|
+
codecs: __gh_codecs$1
|
|
651
|
+
})
|
|
652
|
+
} };
|
|
653
|
+
const thruput_erc20_if = { v0_1: {
|
|
654
|
+
error: { ERC20Error: {
|
|
655
|
+
AlreadyInitialized: 1n,
|
|
656
|
+
MustBeContractOwner: 2n,
|
|
657
|
+
TooLarge: 3n,
|
|
658
|
+
BalanceNotZero: 4n,
|
|
659
|
+
NegativeAmount: 5n,
|
|
660
|
+
Internal: 100n
|
|
661
|
+
} },
|
|
662
|
+
events: {
|
|
663
|
+
AllowanceChangeEvent: defineContractEvent({
|
|
664
|
+
name: "AllowanceChangeEvent",
|
|
665
|
+
signature: spec$3.events[0].signature,
|
|
666
|
+
topics: [{
|
|
667
|
+
name: "owner",
|
|
668
|
+
type: spec$3.events[0].topics[0].ty,
|
|
669
|
+
representation: "address"
|
|
670
|
+
}, {
|
|
671
|
+
name: "spender",
|
|
672
|
+
type: spec$3.events[0].topics[1].ty,
|
|
673
|
+
representation: "address"
|
|
674
|
+
}],
|
|
675
|
+
fields: [{
|
|
676
|
+
name: "difference",
|
|
677
|
+
type: spec$3.events[0].fields[0].ty
|
|
678
|
+
}],
|
|
679
|
+
codecs: __gh_codecs$1
|
|
680
|
+
}),
|
|
681
|
+
AllowanceDeleteEvent: defineContractEvent({
|
|
682
|
+
name: "AllowanceDeleteEvent",
|
|
683
|
+
signature: spec$3.events[1].signature,
|
|
684
|
+
topics: [{
|
|
685
|
+
name: "owner",
|
|
686
|
+
type: spec$3.events[1].topics[0].ty,
|
|
687
|
+
representation: "address"
|
|
688
|
+
}, {
|
|
689
|
+
name: "spender",
|
|
690
|
+
type: spec$3.events[1].topics[1].ty,
|
|
691
|
+
representation: "address"
|
|
692
|
+
}],
|
|
693
|
+
fields: [{
|
|
694
|
+
name: "removed",
|
|
695
|
+
type: spec$3.events[1].fields[0].ty
|
|
696
|
+
}],
|
|
697
|
+
codecs: __gh_codecs$1
|
|
698
|
+
}),
|
|
699
|
+
MintEvent: defineContractEvent({
|
|
700
|
+
name: "MintEvent",
|
|
701
|
+
signature: spec$3.events[2].signature,
|
|
702
|
+
topics: [{
|
|
703
|
+
name: "to",
|
|
704
|
+
type: spec$3.events[2].topics[0].ty,
|
|
705
|
+
representation: "address"
|
|
706
|
+
}],
|
|
707
|
+
fields: [{
|
|
708
|
+
name: "amount",
|
|
709
|
+
type: spec$3.events[2].fields[0].ty
|
|
710
|
+
}],
|
|
711
|
+
codecs: __gh_codecs$1
|
|
712
|
+
}),
|
|
713
|
+
TransferEvent: defineContractEvent({
|
|
714
|
+
name: "TransferEvent",
|
|
715
|
+
signature: spec$3.events[3].signature,
|
|
716
|
+
topics: [{
|
|
717
|
+
name: "from",
|
|
718
|
+
type: spec$3.events[3].topics[0].ty,
|
|
719
|
+
representation: "address"
|
|
720
|
+
}, {
|
|
721
|
+
name: "to",
|
|
722
|
+
type: spec$3.events[3].topics[1].ty,
|
|
723
|
+
representation: "address"
|
|
724
|
+
}],
|
|
725
|
+
fields: [{
|
|
726
|
+
name: "amount",
|
|
727
|
+
type: spec$3.events[3].fields[0].ty
|
|
728
|
+
}],
|
|
729
|
+
codecs: __gh_codecs$1
|
|
730
|
+
})
|
|
731
|
+
}
|
|
732
|
+
} };
|
|
733
|
+
function decodeEvent(__gh_event) {
|
|
734
|
+
return thruput_erc20_if.v0_1.events.AllowanceChangeEvent.decode(__gh_event) ?? thruput_erc20_if.v0_1.events.AllowanceDeleteEvent.decode(__gh_event) ?? thruput_erc20_if.v0_1.events.MintEvent.decode(__gh_event) ?? thruput_erc20_if.v0_1.events.TransferEvent.decode(__gh_event);
|
|
735
|
+
}
|
|
736
|
+
//#endregion
|
|
737
|
+
//#region src/contracts/erc20_permit.ts
|
|
738
|
+
const __gh_s = __gh_contract_spec.contractSpecString;
|
|
739
|
+
const __gh_entrypoints = { ERC20Permit: { v0_1: {
|
|
740
|
+
deleteAllowanceSigned: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("0a791be04a1d1c4b")),
|
|
741
|
+
increaseAllowanceSigned: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("3a47108e9850272e")),
|
|
742
|
+
transferFromSigned: __gh_protocol.contractEntrypointID(__gh_protocol_utils.fromHex("87c3df36183d4aec"))
|
|
743
|
+
} } };
|
|
744
|
+
const spec$2 = {
|
|
745
|
+
interfaces: [{
|
|
746
|
+
name: __gh_s("ERC20Permit"),
|
|
747
|
+
vers: __gh_s("0.1.68"),
|
|
748
|
+
throws: [{
|
|
749
|
+
selector: 1922803514601889220n,
|
|
750
|
+
ty: {
|
|
751
|
+
v: __gh_contract_spec.ContractTypeKind.Named,
|
|
752
|
+
named: {
|
|
753
|
+
crate_name: __gh_s("thruput-erc20-permit-if"),
|
|
754
|
+
major: __gh_s("0.1"),
|
|
755
|
+
module_path: __gh_s("thruput_erc20_permit_if::error"),
|
|
756
|
+
declared: __gh_s("ERC20PermitError")
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}, {
|
|
760
|
+
selector: 17743209598778486752n,
|
|
761
|
+
ty: {
|
|
762
|
+
v: __gh_contract_spec.ContractTypeKind.Named,
|
|
763
|
+
named: {
|
|
764
|
+
crate_name: __gh_s("thruput-erc20-if"),
|
|
765
|
+
major: __gh_s("0.1"),
|
|
766
|
+
module_path: __gh_s("thruput_erc20_if::error"),
|
|
767
|
+
declared: __gh_s("ERC20Error")
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}],
|
|
771
|
+
methods: [
|
|
772
|
+
{
|
|
773
|
+
name: __gh_s("delete_allowance_signed"),
|
|
774
|
+
args: [{
|
|
775
|
+
name: __gh_s("grant"),
|
|
776
|
+
ty: {
|
|
777
|
+
v: __gh_contract_spec.ContractTypeKind.SignedToken,
|
|
778
|
+
signed_token_preimage: { preimage_type: {
|
|
779
|
+
v: __gh_contract_spec.ContractTypeKind.Named,
|
|
780
|
+
named: {
|
|
781
|
+
crate_name: __gh_s("thruput-erc20-permit-if"),
|
|
782
|
+
major: __gh_s("0.1"),
|
|
783
|
+
module_path: __gh_s("thruput_erc20_permit_if"),
|
|
784
|
+
declared: __gh_s("DeleteAllowanceGrant")
|
|
785
|
+
}
|
|
786
|
+
} }
|
|
787
|
+
}
|
|
788
|
+
}],
|
|
789
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.Void },
|
|
790
|
+
effect: null
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
name: __gh_s("increase_allowance_signed"),
|
|
794
|
+
args: [{
|
|
795
|
+
name: __gh_s("grant"),
|
|
796
|
+
ty: {
|
|
797
|
+
v: __gh_contract_spec.ContractTypeKind.SignedToken,
|
|
798
|
+
signed_token_preimage: { preimage_type: {
|
|
799
|
+
v: __gh_contract_spec.ContractTypeKind.Named,
|
|
800
|
+
named: {
|
|
801
|
+
crate_name: __gh_s("thruput-erc20-permit-if"),
|
|
802
|
+
major: __gh_s("0.1"),
|
|
803
|
+
module_path: __gh_s("thruput_erc20_permit_if"),
|
|
804
|
+
declared: __gh_s("PermitGrant")
|
|
805
|
+
}
|
|
806
|
+
} }
|
|
807
|
+
}
|
|
808
|
+
}],
|
|
809
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.Void },
|
|
810
|
+
effect: null
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
name: __gh_s("transfer_from_signed"),
|
|
814
|
+
args: [
|
|
815
|
+
{
|
|
816
|
+
name: __gh_s("grant"),
|
|
817
|
+
ty: {
|
|
818
|
+
v: __gh_contract_spec.ContractTypeKind.SignedToken,
|
|
819
|
+
signed_token_preimage: { preimage_type: {
|
|
820
|
+
v: __gh_contract_spec.ContractTypeKind.Named,
|
|
821
|
+
named: {
|
|
822
|
+
crate_name: __gh_s("thruput-erc20-permit-if"),
|
|
823
|
+
major: __gh_s("0.1"),
|
|
824
|
+
module_path: __gh_s("thruput_erc20_permit_if"),
|
|
825
|
+
declared: __gh_s("PermitGrant")
|
|
826
|
+
}
|
|
827
|
+
} }
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
name: __gh_s("receiver"),
|
|
832
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
name: __gh_s("amount"),
|
|
836
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.I128 }
|
|
837
|
+
}
|
|
838
|
+
],
|
|
839
|
+
return_type: { v: __gh_contract_spec.ContractTypeKind.Void },
|
|
840
|
+
effect: null
|
|
841
|
+
}
|
|
842
|
+
]
|
|
843
|
+
}],
|
|
844
|
+
type_defs: [
|
|
845
|
+
{
|
|
846
|
+
v: __gh_contract_spec.ContractTypeDefKind.TypeDefEnum,
|
|
847
|
+
enum_def: {
|
|
848
|
+
name: {
|
|
849
|
+
crate_name: __gh_s("thruput-erc20-if"),
|
|
850
|
+
major: __gh_s("0.1"),
|
|
851
|
+
module_path: __gh_s("thruput_erc20_if::error"),
|
|
852
|
+
declared: __gh_s("ERC20Error")
|
|
853
|
+
},
|
|
854
|
+
variants: [
|
|
855
|
+
{
|
|
856
|
+
name: __gh_s("AlreadyInitialized"),
|
|
857
|
+
value: 1n
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
name: __gh_s("MustBeContractOwner"),
|
|
861
|
+
value: 2n
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
name: __gh_s("TooLarge"),
|
|
865
|
+
value: 3n
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
name: __gh_s("BalanceNotZero"),
|
|
869
|
+
value: 4n
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
name: __gh_s("NegativeAmount"),
|
|
873
|
+
value: 5n
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
name: __gh_s("Internal"),
|
|
877
|
+
value: 100n
|
|
878
|
+
}
|
|
879
|
+
]
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
v: __gh_contract_spec.ContractTypeDefKind.TypeDefStruct,
|
|
884
|
+
struct_def: {
|
|
885
|
+
name: {
|
|
886
|
+
crate_name: __gh_s("thruput-erc20-permit-if"),
|
|
887
|
+
major: __gh_s("0.1"),
|
|
888
|
+
module_path: __gh_s("thruput_erc20_permit_if"),
|
|
889
|
+
declared: __gh_s("DeleteAllowanceGrant")
|
|
890
|
+
},
|
|
891
|
+
fields: [{
|
|
892
|
+
name: __gh_s("spender"),
|
|
893
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
894
|
+
}]
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
v: __gh_contract_spec.ContractTypeDefKind.TypeDefStruct,
|
|
899
|
+
struct_def: {
|
|
900
|
+
name: {
|
|
901
|
+
crate_name: __gh_s("thruput-erc20-permit-if"),
|
|
902
|
+
major: __gh_s("0.1"),
|
|
903
|
+
module_path: __gh_s("thruput_erc20_permit_if"),
|
|
904
|
+
declared: __gh_s("PermitGrant")
|
|
905
|
+
},
|
|
906
|
+
fields: [{
|
|
907
|
+
name: __gh_s("spender"),
|
|
908
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.Address }
|
|
909
|
+
}, {
|
|
910
|
+
name: __gh_s("amount"),
|
|
911
|
+
ty: { v: __gh_contract_spec.ContractTypeKind.I128 }
|
|
912
|
+
}]
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
v: __gh_contract_spec.ContractTypeDefKind.TypeDefEnum,
|
|
917
|
+
enum_def: {
|
|
918
|
+
name: {
|
|
919
|
+
crate_name: __gh_s("thruput-erc20-permit-if"),
|
|
920
|
+
major: __gh_s("0.1"),
|
|
921
|
+
module_path: __gh_s("thruput_erc20_permit_if::error"),
|
|
922
|
+
declared: __gh_s("ERC20PermitError")
|
|
923
|
+
},
|
|
924
|
+
variants: [{
|
|
925
|
+
name: __gh_s("NotSpender"),
|
|
926
|
+
value: 1n
|
|
927
|
+
}, {
|
|
928
|
+
name: __gh_s("ExceedsGrant"),
|
|
929
|
+
value: 2n
|
|
930
|
+
}]
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
],
|
|
934
|
+
events: []
|
|
935
|
+
};
|
|
936
|
+
const __gh_codecs = createContractCodecContext(spec$2.type_defs);
|
|
937
|
+
const ERC20Permit = { v0_1: {
|
|
938
|
+
deleteAllowanceSigned: defineContractMethod({
|
|
939
|
+
interfaceName: "ERC20Permit",
|
|
940
|
+
interfaceVersion: "0.1.68",
|
|
941
|
+
abiName: "delete_allowance_signed",
|
|
942
|
+
publicName: "deleteAllowanceSigned",
|
|
943
|
+
entrypoint: __gh_entrypoints.ERC20Permit.v0_1.deleteAllowanceSigned,
|
|
944
|
+
effect: spec$2.interfaces[0].methods[0].effect,
|
|
945
|
+
args: [{
|
|
946
|
+
abiName: "grant",
|
|
947
|
+
publicName: "grant",
|
|
948
|
+
type: spec$2.interfaces[0].methods[0].args[0].ty
|
|
949
|
+
}],
|
|
950
|
+
returnType: spec$2.interfaces[0].methods[0].return_type,
|
|
951
|
+
throws: [{
|
|
952
|
+
selector: 1922803514601889220n,
|
|
953
|
+
name: "ERC20PermitError",
|
|
954
|
+
type: spec$2.interfaces[0].throws[0].ty
|
|
955
|
+
}, {
|
|
956
|
+
selector: 17743209598778486752n,
|
|
957
|
+
name: "ERC20Error",
|
|
958
|
+
type: spec$2.interfaces[0].throws[1].ty
|
|
959
|
+
}],
|
|
960
|
+
codecs: __gh_codecs
|
|
961
|
+
}),
|
|
962
|
+
increaseAllowanceSigned: defineContractMethod({
|
|
963
|
+
interfaceName: "ERC20Permit",
|
|
964
|
+
interfaceVersion: "0.1.68",
|
|
965
|
+
abiName: "increase_allowance_signed",
|
|
966
|
+
publicName: "increaseAllowanceSigned",
|
|
967
|
+
entrypoint: __gh_entrypoints.ERC20Permit.v0_1.increaseAllowanceSigned,
|
|
968
|
+
effect: spec$2.interfaces[0].methods[1].effect,
|
|
969
|
+
args: [{
|
|
970
|
+
abiName: "grant",
|
|
971
|
+
publicName: "grant",
|
|
972
|
+
type: spec$2.interfaces[0].methods[1].args[0].ty
|
|
973
|
+
}],
|
|
974
|
+
returnType: spec$2.interfaces[0].methods[1].return_type,
|
|
975
|
+
throws: [{
|
|
976
|
+
selector: 1922803514601889220n,
|
|
977
|
+
name: "ERC20PermitError",
|
|
978
|
+
type: spec$2.interfaces[0].throws[0].ty
|
|
979
|
+
}, {
|
|
980
|
+
selector: 17743209598778486752n,
|
|
981
|
+
name: "ERC20Error",
|
|
982
|
+
type: spec$2.interfaces[0].throws[1].ty
|
|
983
|
+
}],
|
|
984
|
+
codecs: __gh_codecs
|
|
985
|
+
}),
|
|
986
|
+
transferFromSigned: defineContractMethod({
|
|
987
|
+
interfaceName: "ERC20Permit",
|
|
988
|
+
interfaceVersion: "0.1.68",
|
|
989
|
+
abiName: "transfer_from_signed",
|
|
990
|
+
publicName: "transferFromSigned",
|
|
991
|
+
entrypoint: __gh_entrypoints.ERC20Permit.v0_1.transferFromSigned,
|
|
992
|
+
effect: spec$2.interfaces[0].methods[2].effect,
|
|
993
|
+
args: [
|
|
994
|
+
{
|
|
995
|
+
abiName: "grant",
|
|
996
|
+
publicName: "grant",
|
|
997
|
+
type: spec$2.interfaces[0].methods[2].args[0].ty
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
abiName: "receiver",
|
|
1001
|
+
publicName: "receiver",
|
|
1002
|
+
type: spec$2.interfaces[0].methods[2].args[1].ty
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
abiName: "amount",
|
|
1006
|
+
publicName: "amount",
|
|
1007
|
+
type: spec$2.interfaces[0].methods[2].args[2].ty
|
|
1008
|
+
}
|
|
1009
|
+
],
|
|
1010
|
+
returnType: spec$2.interfaces[0].methods[2].return_type,
|
|
1011
|
+
throws: [{
|
|
1012
|
+
selector: 1922803514601889220n,
|
|
1013
|
+
name: "ERC20PermitError",
|
|
1014
|
+
type: spec$2.interfaces[0].throws[0].ty
|
|
1015
|
+
}, {
|
|
1016
|
+
selector: 17743209598778486752n,
|
|
1017
|
+
name: "ERC20Error",
|
|
1018
|
+
type: spec$2.interfaces[0].throws[1].ty
|
|
1019
|
+
}],
|
|
1020
|
+
codecs: __gh_codecs
|
|
1021
|
+
})
|
|
1022
|
+
} };
|
|
1023
|
+
const thruput_erc20_permit_if = { v0_1: { error: { ERC20PermitError: {
|
|
1024
|
+
NotSpender: 1n,
|
|
1025
|
+
ExceedsGrant: 2n
|
|
1026
|
+
} } } };
|
|
1027
|
+
//#endregion
|
|
1028
|
+
export { DefaultWallet, spec as DefaultWalletSpec, DevWallet, spec$1 as DevWalletSpec, ERC20, ERC20Metadata, ERC20Permit, spec$2 as ERC20PermitSpec, spec$3 as ERC20Spec, SignedOp, spec$4 as SignedOpSpec, decodeEvent as decodeERC20Event, default_wallet, thruput_erc20_if, thruput_erc20_permit_if, thruput_signed_op_if };
|
|
1029
|
+
|
|
1030
|
+
//# sourceMappingURL=contracts.js.map
|