@sentio/sdk 2.0.0-rc.13 → 2.0.0-rc.15
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/lib/aptos/api.d.ts +5 -0
- package/lib/aptos/api.js +21 -0
- package/lib/aptos/api.js.map +1 -0
- package/lib/aptos/aptos-plugin.d.ts +14 -0
- package/lib/aptos/aptos-plugin.js +146 -0
- package/lib/aptos/aptos-plugin.js.map +1 -0
- package/lib/aptos/aptos-processor.d.ts +72 -0
- package/lib/aptos/aptos-processor.js +201 -0
- package/lib/aptos/aptos-processor.js.map +1 -0
- package/lib/aptos/builtin/0x1.d.ts +2140 -0
- package/lib/aptos/builtin/0x1.js +2727 -0
- package/lib/aptos/builtin/0x1.js.map +1 -0
- package/lib/aptos/builtin/0x3.d.ts +573 -0
- package/lib/aptos/builtin/0x3.js +496 -0
- package/lib/aptos/builtin/0x3.js.map +1 -0
- package/lib/aptos/builtin/index.d.ts +2 -0
- package/lib/aptos/builtin/index.js +6 -0
- package/lib/aptos/builtin/index.js.map +1 -0
- package/lib/aptos/codegen/codegen.d.ts +23 -0
- package/lib/aptos/codegen/codegen.js +388 -0
- package/lib/aptos/codegen/codegen.js.map +1 -0
- package/lib/aptos/codegen/index.d.ts +1 -0
- package/lib/aptos/codegen/index.js +2 -0
- package/lib/aptos/codegen/index.js.map +1 -0
- package/lib/aptos/codegen/typegen.d.ts +18 -0
- package/lib/aptos/codegen/typegen.js +145 -0
- package/lib/aptos/codegen/typegen.js.map +1 -0
- package/lib/aptos/codegen/typegen.test.d.ts +1 -0
- package/lib/aptos/codegen/typegen.test.js.map +1 -0
- package/lib/aptos/context.d.ts +21 -0
- package/lib/aptos/context.js +59 -0
- package/lib/aptos/context.js.map +1 -0
- package/lib/aptos/index.d.ts +9 -0
- package/lib/aptos/index.js +8 -0
- package/lib/aptos/index.js.map +1 -0
- package/lib/aptos/models.d.ts +37 -0
- package/lib/aptos/models.js +2 -0
- package/lib/aptos/models.js.map +1 -0
- package/lib/aptos/move-coder.d.ts +22 -0
- package/lib/aptos/move-coder.js +164 -0
- package/lib/aptos/move-coder.js.map +1 -0
- package/lib/aptos/move-types.d.ts +10 -0
- package/lib/aptos/move-types.js +2 -0
- package/lib/aptos/move-types.js.map +1 -0
- package/lib/aptos/network.d.ts +11 -0
- package/lib/aptos/network.js +27 -0
- package/lib/aptos/network.js.map +1 -0
- package/lib/aptos/run-codegen.d.ts +1 -0
- package/lib/aptos/run-codegen.js +12 -0
- package/lib/aptos/run-codegen.js.map +1 -0
- package/lib/aptos/tests/aptos.test.d.ts +1 -0
- package/lib/aptos/tests/aptos.test.js.map +1 -0
- package/lib/aptos/tests/souffl3.d.ts +1 -0
- package/lib/aptos/tests/souffl3.js +44 -0
- package/lib/aptos/tests/souffl3.js.map +1 -0
- package/lib/aptos/tests/types/index.d.ts +3 -0
- package/lib/aptos/tests/types/index.js +7 -0
- package/lib/aptos/tests/types/index.js.map +1 -0
- package/lib/aptos/tests/types/reserved.d.ts +445 -0
- package/lib/aptos/tests/types/reserved.js +301 -0
- package/lib/aptos/tests/types/reserved.js.map +1 -0
- package/lib/aptos/tests/types/soffl3.d.ts +1065 -0
- package/lib/aptos/tests/types/soffl3.js +548 -0
- package/lib/aptos/tests/types/soffl3.js.map +1 -0
- package/lib/aptos/tests/types/souffle.d.ts +440 -0
- package/lib/aptos/tests/types/souffle.js +295 -0
- package/lib/aptos/tests/types/souffle.js.map +1 -0
- package/lib/aptos/types.d.ts +9 -0
- package/lib/aptos/types.js +130 -0
- package/lib/aptos/types.js.map +1 -0
- package/lib/aptos/types.test.d.ts +1 -0
- package/lib/aptos/types.test.js.map +1 -0
- package/lib/aptos/utils.d.ts +7 -0
- package/lib/aptos/utils.js +20 -0
- package/lib/aptos/utils.js.map +1 -0
- package/lib/builtin/internal/eacaggregatorproxy_processor.js +90 -180
- package/lib/builtin/internal/eacaggregatorproxy_processor.js.map +1 -1
- package/lib/builtin/internal/erc1155_processor.js +25 -50
- package/lib/builtin/internal/erc1155_processor.js.map +1 -1
- package/lib/builtin/internal/erc20_processor.js +40 -80
- package/lib/builtin/internal/erc20_processor.js.map +1 -1
- package/lib/builtin/internal/erc20bytes_processor.js +30 -60
- package/lib/builtin/internal/erc20bytes_processor.js.map +1 -1
- package/lib/builtin/internal/erc721_processor.js +45 -90
- package/lib/builtin/internal/erc721_processor.js.map +1 -1
- package/lib/builtin/internal/weth9_processor.js +30 -60
- package/lib/builtin/internal/weth9_processor.js.map +1 -1
- package/lib/{utils/chain.d.ts → chain.d.ts} +0 -0
- package/lib/{utils/chain.js → chain.js} +0 -0
- package/lib/chain.js.map +1 -0
- package/lib/core/context.js +1 -1
- package/lib/core/context.js.map +1 -1
- package/lib/core/sui-plugin.js +1 -1
- package/lib/core/sui-plugin.js.map +1 -1
- package/lib/error.d.ts +1 -1
- package/lib/error.js +10 -12
- package/lib/error.js.map +1 -1
- package/lib/eth/base-processor-template.d.ts +3 -3
- package/lib/eth/base-processor-template.js.map +1 -1
- package/lib/eth/base-processor.d.ts +3 -3
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/eth/{eth-event.d.ts → eth.d.ts} +1 -1
- package/lib/eth/eth.js +2 -0
- package/lib/eth/eth.js.map +1 -0
- package/lib/eth/index.d.ts +1 -0
- package/lib/eth/index.js +1 -0
- package/lib/eth/index.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/solana/builtin/index.d.ts +1 -0
- package/lib/solana/builtin/index.js +2 -0
- package/lib/solana/builtin/index.js.map +1 -0
- package/lib/solana/builtin/spl-token-processor.d.ts +39 -0
- package/lib/solana/builtin/spl-token-processor.js +254 -0
- package/lib/solana/builtin/spl-token-processor.js.map +1 -0
- package/lib/solana/builtin/types.d.ts +427 -0
- package/lib/solana/builtin/types.js +200 -0
- package/lib/solana/builtin/types.js.map +1 -0
- package/lib/solana/codegen/codegen.d.ts +1 -0
- package/lib/solana/codegen/codegen.js +122 -0
- package/lib/solana/codegen/codegen.js.map +1 -0
- package/lib/solana/codegen/index.d.ts +1 -0
- package/lib/solana/codegen/index.js +2 -0
- package/lib/solana/codegen/index.js.map +1 -0
- package/lib/solana/index.d.ts +4 -0
- package/lib/solana/index.js +5 -0
- package/lib/solana/index.js.map +1 -0
- package/lib/solana/run-codegen.d.ts +2 -0
- package/lib/solana/run-codegen.js +12 -0
- package/lib/solana/run-codegen.js.map +1 -0
- package/lib/solana/solana-context.d.ts +9 -0
- package/lib/solana/solana-context.js +28 -0
- package/lib/solana/solana-context.js.map +1 -0
- package/lib/solana/solana-options.d.ts +10 -0
- package/lib/solana/solana-options.js +10 -0
- package/lib/solana/solana-options.js.map +1 -0
- package/lib/solana/solana-plugin.d.ts +9 -0
- package/lib/solana/solana-plugin.js +87 -0
- package/lib/solana/solana-plugin.js.map +1 -0
- package/lib/solana/solana-processor.d.ts +43 -0
- package/lib/solana/solana-processor.js +72 -0
- package/lib/solana/solana-processor.js.map +1 -0
- package/lib/solana/tests/solana.test.d.ts +1 -0
- package/lib/solana/tests/solana.test.js.map +1 -0
- package/lib/solana/tests/types/basic_1.d.ts +26 -0
- package/lib/solana/tests/types/basic_1.js +63 -0
- package/lib/solana/tests/types/basic_1.js.map +1 -0
- package/lib/solana/tests/types/basic_1_processor.d.ts +21 -0
- package/lib/solana/tests/types/basic_1_processor.js +35 -0
- package/lib/solana/tests/types/basic_1_processor.js.map +1 -0
- package/lib/solana/tests/types/token_bridge.d.ts +29 -0
- package/lib/solana/tests/types/token_bridge.js +938 -0
- package/lib/solana/tests/types/token_bridge.js.map +1 -0
- package/lib/solana/tests/types/token_bridge_processor.d.ts +212 -0
- package/lib/solana/tests/types/token_bridge_processor.js +134 -0
- package/lib/solana/tests/types/token_bridge_processor.js.map +1 -0
- package/lib/solana/tests/wormhole-token-bridge.d.ts +15 -0
- package/lib/solana/tests/wormhole-token-bridge.js +79 -0
- package/lib/solana/tests/wormhole-token-bridge.js.map +1 -0
- package/lib/target-ethers-sentio/view-function.cjs +4 -9
- package/lib/target-ethers-sentio/view-function.cjs.map +1 -1
- package/lib/testing/test-processor-server.js +1 -1
- package/lib/testing/test-processor-server.js.map +1 -1
- package/lib/testing/test-provider.js +1 -1
- package/lib/testing/test-provider.js.map +1 -1
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/index.js.map +1 -1
- package/package.json +34 -11
- package/src/aptos/abis/0x1.json +9205 -0
- package/src/aptos/abis/0x3.json +1515 -0
- package/src/aptos/api.ts +23 -0
- package/src/aptos/aptos-plugin.ts +183 -0
- package/src/aptos/aptos-processor.ts +331 -0
- package/src/aptos/builtin/0x1.ts +4911 -0
- package/src/aptos/builtin/0x3.ts +1092 -0
- package/src/aptos/builtin/index.ts +5 -0
- package/src/aptos/codegen/codegen.ts +470 -0
- package/src/aptos/codegen/index.ts +1 -0
- package/src/aptos/codegen/tsconfig.json +8 -0
- package/src/aptos/codegen/typegen.ts +165 -0
- package/src/aptos/context.ts +72 -0
- package/src/aptos/index.ts +10 -0
- package/src/aptos/models.ts +47 -0
- package/src/aptos/move-coder.ts +201 -0
- package/src/aptos/move-types.ts +11 -0
- package/src/aptos/network.ts +29 -0
- package/src/aptos/run-codegen.ts +13 -0
- package/src/aptos/tests/abis/reserved.json +402 -0
- package/src/aptos/tests/abis/soffl3.json +1411 -0
- package/src/aptos/tests/abis/souffle.json +389 -0
- package/src/aptos/tests/souffl3.ts +57 -0
- package/src/aptos/tests/types/index.ts +6 -0
- package/src/aptos/tests/types/reserved.ts +881 -0
- package/src/aptos/tests/types/soffl3.ts +1820 -0
- package/src/aptos/tests/types/souffle.ts +880 -0
- package/src/aptos/types.ts +149 -0
- package/src/aptos/utils.ts +26 -0
- package/src/builtin/internal/eacaggregatorproxy_processor.ts +90 -162
- package/src/builtin/internal/erc1155_processor.ts +25 -49
- package/src/builtin/internal/erc20_processor.ts +40 -72
- package/src/builtin/internal/erc20bytes_processor.ts +30 -54
- package/src/builtin/internal/erc721_processor.ts +45 -81
- package/src/builtin/internal/weth9_processor.ts +30 -54
- package/src/{utils/chain.ts → chain.ts} +0 -0
- package/src/core/context.ts +1 -1
- package/src/core/sui-plugin.ts +1 -1
- package/src/error.ts +12 -14
- package/src/eth/base-processor-template.ts +3 -3
- package/src/eth/base-processor.ts +4 -4
- package/src/eth/{eth-event.ts → eth.ts} +1 -1
- package/src/eth/index.ts +2 -0
- package/src/index.ts +2 -2
- package/src/solana/builtin/index.ts +1 -0
- package/src/solana/builtin/spl-token-processor.ts +298 -0
- package/src/solana/builtin/types.ts +279 -0
- package/src/solana/codegen/codegen.ts +140 -0
- package/src/solana/codegen/index.ts +1 -0
- package/src/solana/codegen/tsconfig.json +8 -0
- package/src/solana/index.ts +4 -0
- package/src/solana/run-codegen.ts +13 -0
- package/src/solana/solana-context.ts +30 -0
- package/src/solana/solana-options.ts +11 -0
- package/src/solana/solana-plugin.ts +103 -0
- package/src/solana/solana-processor.ts +102 -0
- package/src/solana/tests/abis/basic_1.json +62 -0
- package/src/solana/tests/abis/token_bridge.json +937 -0
- package/src/solana/tests/types/basic_1.ts +62 -0
- package/src/solana/tests/types/basic_1_processor.ts +42 -0
- package/src/solana/tests/types/token_bridge.ts +937 -0
- package/src/solana/tests/types/token_bridge_processor.ts +150 -0
- package/src/solana/tests/wormhole-token-bridge.ts +96 -0
- package/src/target-ethers-sentio/view-function.cts +4 -11
- package/src/testing/test-processor-server.ts +1 -1
- package/src/testing/test-provider.ts +1 -1
- package/src/utils/index.ts +0 -1
- package/lib/eth/eth-event.js +0 -2
- package/lib/eth/eth-event.js.map +0 -1
- package/lib/utils/chain.js.map +0 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { SPLITTER, VECTOR_STR } from './utils.js'
|
|
2
|
+
|
|
3
|
+
export class TypeDescriptor {
|
|
4
|
+
// type: string
|
|
5
|
+
|
|
6
|
+
// qualified name without type parameters
|
|
7
|
+
qname: string
|
|
8
|
+
// account?: string
|
|
9
|
+
// module?: string
|
|
10
|
+
|
|
11
|
+
typeArgs: TypeDescriptor[]
|
|
12
|
+
|
|
13
|
+
constructor(symbol: string, typeParams?: TypeDescriptor[]) {
|
|
14
|
+
this.qname = symbol
|
|
15
|
+
this.typeArgs = typeParams || []
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
getSignature(): string {
|
|
19
|
+
if (this.typeArgs.length > 0) {
|
|
20
|
+
return this.qname + '<' + this.typeArgs.map((t) => t.getSignature()).join(', ') + '>'
|
|
21
|
+
}
|
|
22
|
+
return this.qname
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Replace T0, T1 with more concrete type
|
|
26
|
+
applyTypeArgs(ctx: Map<string, TypeDescriptor>): TypeDescriptor {
|
|
27
|
+
const replace = ctx.get(this.qname)
|
|
28
|
+
if (replace) {
|
|
29
|
+
return replace
|
|
30
|
+
}
|
|
31
|
+
if (ctx.size === 0 || this.typeArgs.length === 0) {
|
|
32
|
+
return this
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const typeArgs: TypeDescriptor[] = []
|
|
36
|
+
for (const arg of this.typeArgs) {
|
|
37
|
+
const replace = ctx.get(arg.qname)
|
|
38
|
+
if (replace) {
|
|
39
|
+
typeArgs.push(replace)
|
|
40
|
+
} else {
|
|
41
|
+
typeArgs.push(arg.applyTypeArgs(ctx))
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return new TypeDescriptor(this.qname, typeArgs)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// all depended types including itself, not include system type
|
|
48
|
+
dependedTypes(): string[] {
|
|
49
|
+
if (this.qname.startsWith('&')) {
|
|
50
|
+
return []
|
|
51
|
+
}
|
|
52
|
+
switch (this.qname) {
|
|
53
|
+
case 'signer':
|
|
54
|
+
case 'address':
|
|
55
|
+
case '0x1::string::String':
|
|
56
|
+
case 'bool':
|
|
57
|
+
case 'u8':
|
|
58
|
+
case 'u16':
|
|
59
|
+
case 'u32':
|
|
60
|
+
case 'u64':
|
|
61
|
+
case 'u128':
|
|
62
|
+
return []
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Type parameters are not depended
|
|
66
|
+
if (this.qname.indexOf(SPLITTER) == -1) {
|
|
67
|
+
if (this.qname.startsWith('T')) {
|
|
68
|
+
return []
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const types = new Set<string>()
|
|
73
|
+
for (const param of this.typeArgs) {
|
|
74
|
+
param.dependedTypes().forEach((t) => types.add(t))
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (this.qname !== VECTOR_STR) {
|
|
78
|
+
types.add(this.qname)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return Array.from(types)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function parseMoveType(type: string): TypeDescriptor {
|
|
86
|
+
// type = type.replace('&', '')
|
|
87
|
+
|
|
88
|
+
type = type.replaceAll('&mut ', '&')
|
|
89
|
+
type = type.replaceAll('mut ', '')
|
|
90
|
+
|
|
91
|
+
// TODO replace ' ' is not exactly safe, need to double check this
|
|
92
|
+
type = type.replaceAll(' ', '')
|
|
93
|
+
|
|
94
|
+
const stack: TypeDescriptor[] = [new TypeDescriptor('')]
|
|
95
|
+
let buffer = []
|
|
96
|
+
|
|
97
|
+
// xxx:asdf<g1<a,<c,d>>, b, g2<a,b>, e>
|
|
98
|
+
for (let i = 0; i < type.length; i++) {
|
|
99
|
+
const ch = type[i]
|
|
100
|
+
if (ch === '<') {
|
|
101
|
+
// const symbol = type.slice(symbolStart, i)
|
|
102
|
+
// symbolStart =
|
|
103
|
+
const symbol = buffer.join('')
|
|
104
|
+
buffer = []
|
|
105
|
+
stack[stack.length - 1].qname = symbol
|
|
106
|
+
stack.push(new TypeDescriptor(''))
|
|
107
|
+
continue
|
|
108
|
+
}
|
|
109
|
+
if (ch === '>') {
|
|
110
|
+
const typeParam = stack.pop()
|
|
111
|
+
if (!typeParam) {
|
|
112
|
+
throw Error('Uxpectecd stack size')
|
|
113
|
+
}
|
|
114
|
+
if (buffer.length > 0) {
|
|
115
|
+
typeParam.qname = buffer.join('')
|
|
116
|
+
buffer = []
|
|
117
|
+
}
|
|
118
|
+
stack[stack.length - 1].typeArgs.push(typeParam)
|
|
119
|
+
continue
|
|
120
|
+
}
|
|
121
|
+
if (ch === ',') {
|
|
122
|
+
const typeParam = stack.pop()
|
|
123
|
+
if (!typeParam) {
|
|
124
|
+
throw Error('Uxpectecd stack size')
|
|
125
|
+
}
|
|
126
|
+
if (buffer.length > 0) {
|
|
127
|
+
typeParam.qname = buffer.join('')
|
|
128
|
+
buffer = []
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
stack[stack.length - 1].typeArgs.push(typeParam)
|
|
132
|
+
// continue parse next param
|
|
133
|
+
stack.push(new TypeDescriptor(''))
|
|
134
|
+
continue
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
buffer.push(ch)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (buffer.length > 0) {
|
|
141
|
+
stack[stack.length - 1].qname = buffer.join('')
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const res = stack.pop()
|
|
145
|
+
if (!res || stack.length > 0) {
|
|
146
|
+
throw Error('Uxpectecd stack size')
|
|
147
|
+
}
|
|
148
|
+
return res
|
|
149
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MoveFunction, MoveModule } from './move-types.js'
|
|
2
|
+
|
|
3
|
+
export const SPLITTER = '::'
|
|
4
|
+
|
|
5
|
+
export const VECTOR_STR = 'vector'
|
|
6
|
+
|
|
7
|
+
export function isFrameworkAccount(account: string) {
|
|
8
|
+
return account === '0x1' || account === '0x2' || account === '0x3'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function moduleQname(module: MoveModule): string {
|
|
12
|
+
return module.address.toLowerCase() + SPLITTER + module.name
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function moduleQnameForType(type: string): [string, string] {
|
|
16
|
+
const parts = type.split(SPLITTER).slice(0, 2)
|
|
17
|
+
return [parts[0], parts[1]]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function getMeaningfulFunctionParams(func: MoveFunction): string[] {
|
|
21
|
+
let params = func.params
|
|
22
|
+
if (func.params[0] === '&signer') {
|
|
23
|
+
params = params.slice(1)
|
|
24
|
+
}
|
|
25
|
+
return params
|
|
26
|
+
}
|
|
@@ -440,71 +440,51 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
|
440
440
|
EACAggregatorProxyContractView
|
|
441
441
|
> {
|
|
442
442
|
async accessController(overrides?: Overrides): Promise<string> {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
};
|
|
448
|
-
}
|
|
449
|
-
return await this.view.accessController(overrides || {});
|
|
450
|
-
} catch (e) {
|
|
451
|
-
throw transformEtherError(e, this.context);
|
|
443
|
+
if (!overrides && this.context) {
|
|
444
|
+
overrides = {
|
|
445
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
446
|
+
};
|
|
452
447
|
}
|
|
448
|
+
return await this.view.accessController(overrides || {});
|
|
453
449
|
}
|
|
454
450
|
|
|
455
451
|
async aggregator(overrides?: Overrides): Promise<string> {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
return await this.view.aggregator(overrides || {});
|
|
463
|
-
} catch (e) {
|
|
464
|
-
throw transformEtherError(e, this.context);
|
|
452
|
+
if (!overrides && this.context) {
|
|
453
|
+
overrides = {
|
|
454
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
455
|
+
};
|
|
465
456
|
}
|
|
457
|
+
return await this.view.aggregator(overrides || {});
|
|
466
458
|
}
|
|
467
459
|
|
|
468
460
|
async decimals(overrides?: Overrides): Promise<bigint> {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
|
-
return await this.view.decimals(overrides || {});
|
|
476
|
-
} catch (e) {
|
|
477
|
-
throw transformEtherError(e, this.context);
|
|
461
|
+
if (!overrides && this.context) {
|
|
462
|
+
overrides = {
|
|
463
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
464
|
+
};
|
|
478
465
|
}
|
|
466
|
+
return await this.view.decimals(overrides || {});
|
|
479
467
|
}
|
|
480
468
|
|
|
481
469
|
async description(overrides?: Overrides): Promise<string> {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
return await this.view.description(overrides || {});
|
|
489
|
-
} catch (e) {
|
|
490
|
-
throw transformEtherError(e, this.context);
|
|
470
|
+
if (!overrides && this.context) {
|
|
471
|
+
overrides = {
|
|
472
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
473
|
+
};
|
|
491
474
|
}
|
|
475
|
+
return await this.view.description(overrides || {});
|
|
492
476
|
}
|
|
493
477
|
|
|
494
478
|
async getAnswer(
|
|
495
479
|
_roundId: BigNumberish,
|
|
496
480
|
overrides?: Overrides
|
|
497
481
|
): Promise<bigint> {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
};
|
|
503
|
-
}
|
|
504
|
-
return await this.view.getAnswer(_roundId, overrides || {});
|
|
505
|
-
} catch (e) {
|
|
506
|
-
throw transformEtherError(e, this.context);
|
|
482
|
+
if (!overrides && this.context) {
|
|
483
|
+
overrides = {
|
|
484
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
485
|
+
};
|
|
507
486
|
}
|
|
487
|
+
return await this.view.getAnswer(_roundId, overrides || {});
|
|
508
488
|
}
|
|
509
489
|
|
|
510
490
|
async getRoundData(
|
|
@@ -519,58 +499,42 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
|
519
499
|
answeredInRound: bigint;
|
|
520
500
|
}
|
|
521
501
|
> {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
return await this.view.getRoundData(_roundId, overrides || {});
|
|
529
|
-
} catch (e) {
|
|
530
|
-
throw transformEtherError(e, this.context);
|
|
502
|
+
if (!overrides && this.context) {
|
|
503
|
+
overrides = {
|
|
504
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
505
|
+
};
|
|
531
506
|
}
|
|
507
|
+
return await this.view.getRoundData(_roundId, overrides || {});
|
|
532
508
|
}
|
|
533
509
|
|
|
534
510
|
async getTimestamp(
|
|
535
511
|
_roundId: BigNumberish,
|
|
536
512
|
overrides?: Overrides
|
|
537
513
|
): Promise<bigint> {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
};
|
|
543
|
-
}
|
|
544
|
-
return await this.view.getTimestamp(_roundId, overrides || {});
|
|
545
|
-
} catch (e) {
|
|
546
|
-
throw transformEtherError(e, this.context);
|
|
514
|
+
if (!overrides && this.context) {
|
|
515
|
+
overrides = {
|
|
516
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
517
|
+
};
|
|
547
518
|
}
|
|
519
|
+
return await this.view.getTimestamp(_roundId, overrides || {});
|
|
548
520
|
}
|
|
549
521
|
|
|
550
522
|
async latestAnswer(overrides?: Overrides): Promise<bigint> {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
};
|
|
556
|
-
}
|
|
557
|
-
return await this.view.latestAnswer(overrides || {});
|
|
558
|
-
} catch (e) {
|
|
559
|
-
throw transformEtherError(e, this.context);
|
|
523
|
+
if (!overrides && this.context) {
|
|
524
|
+
overrides = {
|
|
525
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
526
|
+
};
|
|
560
527
|
}
|
|
528
|
+
return await this.view.latestAnswer(overrides || {});
|
|
561
529
|
}
|
|
562
530
|
|
|
563
531
|
async latestRound(overrides?: Overrides): Promise<bigint> {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
};
|
|
569
|
-
}
|
|
570
|
-
return await this.view.latestRound(overrides || {});
|
|
571
|
-
} catch (e) {
|
|
572
|
-
throw transformEtherError(e, this.context);
|
|
532
|
+
if (!overrides && this.context) {
|
|
533
|
+
overrides = {
|
|
534
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
535
|
+
};
|
|
573
536
|
}
|
|
537
|
+
return await this.view.latestRound(overrides || {});
|
|
574
538
|
}
|
|
575
539
|
|
|
576
540
|
async latestRoundData(
|
|
@@ -584,84 +548,60 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
|
584
548
|
answeredInRound: bigint;
|
|
585
549
|
}
|
|
586
550
|
> {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
};
|
|
592
|
-
}
|
|
593
|
-
return await this.view.latestRoundData(overrides || {});
|
|
594
|
-
} catch (e) {
|
|
595
|
-
throw transformEtherError(e, this.context);
|
|
551
|
+
if (!overrides && this.context) {
|
|
552
|
+
overrides = {
|
|
553
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
554
|
+
};
|
|
596
555
|
}
|
|
556
|
+
return await this.view.latestRoundData(overrides || {});
|
|
597
557
|
}
|
|
598
558
|
|
|
599
559
|
async latestTimestamp(overrides?: Overrides): Promise<bigint> {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
};
|
|
605
|
-
}
|
|
606
|
-
return await this.view.latestTimestamp(overrides || {});
|
|
607
|
-
} catch (e) {
|
|
608
|
-
throw transformEtherError(e, this.context);
|
|
560
|
+
if (!overrides && this.context) {
|
|
561
|
+
overrides = {
|
|
562
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
563
|
+
};
|
|
609
564
|
}
|
|
565
|
+
return await this.view.latestTimestamp(overrides || {});
|
|
610
566
|
}
|
|
611
567
|
|
|
612
568
|
async owner(overrides?: Overrides): Promise<string> {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
};
|
|
618
|
-
}
|
|
619
|
-
return await this.view.owner(overrides || {});
|
|
620
|
-
} catch (e) {
|
|
621
|
-
throw transformEtherError(e, this.context);
|
|
569
|
+
if (!overrides && this.context) {
|
|
570
|
+
overrides = {
|
|
571
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
572
|
+
};
|
|
622
573
|
}
|
|
574
|
+
return await this.view.owner(overrides || {});
|
|
623
575
|
}
|
|
624
576
|
|
|
625
577
|
async phaseAggregators(
|
|
626
578
|
arg0: BigNumberish,
|
|
627
579
|
overrides?: Overrides
|
|
628
580
|
): Promise<string> {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
};
|
|
634
|
-
}
|
|
635
|
-
return await this.view.phaseAggregators(arg0, overrides || {});
|
|
636
|
-
} catch (e) {
|
|
637
|
-
throw transformEtherError(e, this.context);
|
|
581
|
+
if (!overrides && this.context) {
|
|
582
|
+
overrides = {
|
|
583
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
584
|
+
};
|
|
638
585
|
}
|
|
586
|
+
return await this.view.phaseAggregators(arg0, overrides || {});
|
|
639
587
|
}
|
|
640
588
|
|
|
641
589
|
async phaseId(overrides?: Overrides): Promise<bigint> {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
};
|
|
647
|
-
}
|
|
648
|
-
return await this.view.phaseId(overrides || {});
|
|
649
|
-
} catch (e) {
|
|
650
|
-
throw transformEtherError(e, this.context);
|
|
590
|
+
if (!overrides && this.context) {
|
|
591
|
+
overrides = {
|
|
592
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
593
|
+
};
|
|
651
594
|
}
|
|
595
|
+
return await this.view.phaseId(overrides || {});
|
|
652
596
|
}
|
|
653
597
|
|
|
654
598
|
async proposedAggregator(overrides?: Overrides): Promise<string> {
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
};
|
|
660
|
-
}
|
|
661
|
-
return await this.view.proposedAggregator(overrides || {});
|
|
662
|
-
} catch (e) {
|
|
663
|
-
throw transformEtherError(e, this.context);
|
|
599
|
+
if (!overrides && this.context) {
|
|
600
|
+
overrides = {
|
|
601
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
602
|
+
};
|
|
664
603
|
}
|
|
604
|
+
return await this.view.proposedAggregator(overrides || {});
|
|
665
605
|
}
|
|
666
606
|
|
|
667
607
|
async proposedGetRoundData(
|
|
@@ -676,16 +616,12 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
|
676
616
|
answeredInRound: bigint;
|
|
677
617
|
}
|
|
678
618
|
> {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
};
|
|
684
|
-
}
|
|
685
|
-
return await this.view.proposedGetRoundData(_roundId, overrides || {});
|
|
686
|
-
} catch (e) {
|
|
687
|
-
throw transformEtherError(e, this.context);
|
|
619
|
+
if (!overrides && this.context) {
|
|
620
|
+
overrides = {
|
|
621
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
622
|
+
};
|
|
688
623
|
}
|
|
624
|
+
return await this.view.proposedGetRoundData(_roundId, overrides || {});
|
|
689
625
|
}
|
|
690
626
|
|
|
691
627
|
async proposedLatestRoundData(
|
|
@@ -699,29 +635,21 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
|
699
635
|
answeredInRound: bigint;
|
|
700
636
|
}
|
|
701
637
|
> {
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
};
|
|
707
|
-
}
|
|
708
|
-
return await this.view.proposedLatestRoundData(overrides || {});
|
|
709
|
-
} catch (e) {
|
|
710
|
-
throw transformEtherError(e, this.context);
|
|
638
|
+
if (!overrides && this.context) {
|
|
639
|
+
overrides = {
|
|
640
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
641
|
+
};
|
|
711
642
|
}
|
|
643
|
+
return await this.view.proposedLatestRoundData(overrides || {});
|
|
712
644
|
}
|
|
713
645
|
|
|
714
646
|
async version(overrides?: Overrides): Promise<bigint> {
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
};
|
|
720
|
-
}
|
|
721
|
-
return await this.view.version(overrides || {});
|
|
722
|
-
} catch (e) {
|
|
723
|
-
throw transformEtherError(e, this.context);
|
|
647
|
+
if (!overrides && this.context) {
|
|
648
|
+
overrides = {
|
|
649
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
650
|
+
};
|
|
724
651
|
}
|
|
652
|
+
return await this.view.version(overrides || {});
|
|
725
653
|
}
|
|
726
654
|
}
|
|
727
655
|
|
|
@@ -209,16 +209,12 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
|
209
209
|
id: BigNumberish,
|
|
210
210
|
overrides?: Overrides
|
|
211
211
|
): Promise<bigint> {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
return await this.view.balanceOf(account, id, overrides || {});
|
|
219
|
-
} catch (e) {
|
|
220
|
-
throw transformEtherError(e, this.context);
|
|
212
|
+
if (!overrides && this.context) {
|
|
213
|
+
overrides = {
|
|
214
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
215
|
+
};
|
|
221
216
|
}
|
|
217
|
+
return await this.view.balanceOf(account, id, overrides || {});
|
|
222
218
|
}
|
|
223
219
|
|
|
224
220
|
async balanceOfBatch(
|
|
@@ -226,16 +222,12 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
|
226
222
|
ids: BigNumberish[],
|
|
227
223
|
overrides?: Overrides
|
|
228
224
|
): Promise<bigint[]> {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
return await this.view.balanceOfBatch(accounts, ids, overrides || {});
|
|
236
|
-
} catch (e) {
|
|
237
|
-
throw transformEtherError(e, this.context);
|
|
225
|
+
if (!overrides && this.context) {
|
|
226
|
+
overrides = {
|
|
227
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
228
|
+
};
|
|
238
229
|
}
|
|
230
|
+
return await this.view.balanceOfBatch(accounts, ids, overrides || {});
|
|
239
231
|
}
|
|
240
232
|
|
|
241
233
|
async isApprovedForAll(
|
|
@@ -243,49 +235,33 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
|
243
235
|
operator: string,
|
|
244
236
|
overrides?: Overrides
|
|
245
237
|
): Promise<boolean> {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
return await this.view.isApprovedForAll(
|
|
253
|
-
account,
|
|
254
|
-
operator,
|
|
255
|
-
overrides || {}
|
|
256
|
-
);
|
|
257
|
-
} catch (e) {
|
|
258
|
-
throw transformEtherError(e, this.context);
|
|
238
|
+
if (!overrides && this.context) {
|
|
239
|
+
overrides = {
|
|
240
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
241
|
+
};
|
|
259
242
|
}
|
|
243
|
+
return await this.view.isApprovedForAll(account, operator, overrides || {});
|
|
260
244
|
}
|
|
261
245
|
|
|
262
246
|
async supportsInterface(
|
|
263
247
|
interfaceId: BytesLike,
|
|
264
248
|
overrides?: Overrides
|
|
265
249
|
): Promise<boolean> {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
return await this.view.supportsInterface(interfaceId, overrides || {});
|
|
273
|
-
} catch (e) {
|
|
274
|
-
throw transformEtherError(e, this.context);
|
|
250
|
+
if (!overrides && this.context) {
|
|
251
|
+
overrides = {
|
|
252
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
253
|
+
};
|
|
275
254
|
}
|
|
255
|
+
return await this.view.supportsInterface(interfaceId, overrides || {});
|
|
276
256
|
}
|
|
277
257
|
|
|
278
258
|
async uri(id: BigNumberish, overrides?: Overrides): Promise<string> {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
return await this.view.uri(id, overrides || {});
|
|
286
|
-
} catch (e) {
|
|
287
|
-
throw transformEtherError(e, this.context);
|
|
259
|
+
if (!overrides && this.context) {
|
|
260
|
+
overrides = {
|
|
261
|
+
blockTag: toBlockTag(this.context.blockNumber),
|
|
262
|
+
};
|
|
288
263
|
}
|
|
264
|
+
return await this.view.uri(id, overrides || {});
|
|
289
265
|
}
|
|
290
266
|
}
|
|
291
267
|
|