@sentio/sdk 2.5.1-rc.1 → 2.5.1
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/eth/codegen/event-handler.js.map +1 -1
- package/lib/eth/codegen/functions-handler.js +4 -9
- package/lib/eth/codegen/functions-handler.js.map +1 -1
- package/lib/eth/context.js.map +1 -1
- package/lib/eth/index.d.ts +0 -1
- package/lib/eth/index.js +0 -1
- package/lib/eth/index.js.map +1 -1
- package/lib/move/abstract-codegen.js +3 -9
- package/lib/move/abstract-codegen.js.map +1 -1
- package/lib/sui/sui-processor.js.map +1 -1
- package/lib/utils/dex-price.test.js.map +1 -1
- package/lib/utils/erc20.test.js.map +1 -1
- package/package.json +5 -8
- package/src/eth/codegen/event-handler.ts +1 -1
- package/src/eth/codegen/functions-handler.ts +4 -10
- package/src/eth/context.ts +0 -1
- package/src/eth/index.ts +0 -1
- package/src/move/abstract-codegen.ts +3 -10
- package/src/sui/sui-processor.ts +1 -1
- package/lib/aptos/tests/aptos.test.d.ts +0 -1
- package/lib/aptos/tests/aptos.test.js.map +0 -1
- package/lib/aptos/tests/souffl3.d.ts +0 -1
- package/lib/aptos/tests/souffl3.js +0 -43
- package/lib/aptos/tests/souffl3.js.map +0 -1
- package/lib/aptos/tests/types/index.d.ts +0 -3
- package/lib/aptos/tests/types/index.js +0 -7
- package/lib/aptos/tests/types/index.js.map +0 -1
- package/lib/aptos/tests/types/reserved.d.ts +0 -340
- package/lib/aptos/tests/types/reserved.js +0 -287
- package/lib/aptos/tests/types/reserved.js.map +0 -1
- package/lib/aptos/tests/types/soffl3.d.ts +0 -801
- package/lib/aptos/tests/types/soffl3.js +0 -514
- package/lib/aptos/tests/types/soffl3.js.map +0 -1
- package/lib/aptos/tests/types/souffle.d.ts +0 -335
- package/lib/aptos/tests/types/souffle.js +0 -281
- package/lib/aptos/tests/types/souffle.js.map +0 -1
- package/lib/eth/error.d.ts +0 -1
- package/lib/eth/error.js +0 -3
- package/lib/eth/error.js.map +0 -1
- package/lib/eth/tests/account.test.d.ts +0 -1
- package/lib/eth/tests/account.test.js.map +0 -1
- package/lib/eth/tests/codegen.test.d.ts +0 -1
- package/lib/eth/tests/codegen.test.js.map +0 -1
- package/lib/eth/tests/erc20-template.test.d.ts +0 -1
- package/lib/eth/tests/erc20-template.test.js.map +0 -1
- package/lib/eth/tests/erc20.d.ts +0 -1
- package/lib/eth/tests/erc20.js +0 -52
- package/lib/eth/tests/erc20.js.map +0 -1
- package/lib/eth/tests/erc20.test.d.ts +0 -1
- package/lib/eth/tests/erc20.test.js.map +0 -1
- package/lib/eth/tests/error-capture.test.d.ts +0 -1
- package/lib/eth/tests/error-capture.test.js.map +0 -1
- package/lib/eth/tests/logger.test.d.ts +0 -1
- package/lib/eth/tests/logger.test.js.map +0 -1
- package/lib/eth/tests/types/anyswaprouter.d.ts +0 -3
- package/lib/eth/tests/types/anyswaprouter.js +0 -7
- package/lib/eth/tests/types/anyswaprouter.js.map +0 -1
- package/lib/eth/tests/types/commitmentpool.d.ts +0 -3
- package/lib/eth/tests/types/commitmentpool.js +0 -7
- package/lib/eth/tests/types/commitmentpool.js.map +0 -1
- package/lib/eth/tests/types/index.d.ts +0 -12
- package/lib/eth/tests/types/index.js +0 -16
- package/lib/eth/tests/types/index.js.map +0 -1
- package/lib/eth/tests/types/internal/AnyswapRouter.d.ts +0 -122
- package/lib/eth/tests/types/internal/AnyswapRouter.js +0 -2
- package/lib/eth/tests/types/internal/AnyswapRouter.js.map +0 -1
- package/lib/eth/tests/types/internal/CommitmentPool.d.ts +0 -176
- package/lib/eth/tests/types/internal/CommitmentPool.js +0 -2
- package/lib/eth/tests/types/internal/CommitmentPool.js.map +0 -1
- package/lib/eth/tests/types/internal/MembershipStakerV3.d.ts +0 -81
- package/lib/eth/tests/types/internal/MembershipStakerV3.js +0 -2
- package/lib/eth/tests/types/internal/MembershipStakerV3.js.map +0 -1
- package/lib/eth/tests/types/internal/Pyth.d.ts +0 -204
- package/lib/eth/tests/types/internal/Pyth.js +0 -2
- package/lib/eth/tests/types/internal/Pyth.js.map +0 -1
- package/lib/eth/tests/types/internal/Seaport.d.ts +0 -350
- package/lib/eth/tests/types/internal/Seaport.js +0 -2
- package/lib/eth/tests/types/internal/Seaport.js.map +0 -1
- package/lib/eth/tests/types/internal/TokenExchange.d.ts +0 -128
- package/lib/eth/tests/types/internal/TokenExchange.js +0 -2
- package/lib/eth/tests/types/internal/TokenExchange.js.map +0 -1
- package/lib/eth/tests/types/internal/anyswaprouter-processor.d.ts +0 -463
- package/lib/eth/tests/types/internal/anyswaprouter-processor.js +0 -425
- package/lib/eth/tests/types/internal/anyswaprouter-processor.js.map +0 -1
- package/lib/eth/tests/types/internal/anyswaprouter-test-utils.d.ts +0 -9
- package/lib/eth/tests/types/internal/anyswaprouter-test-utils.js +0 -124
- package/lib/eth/tests/types/internal/anyswaprouter-test-utils.js.map +0 -1
- package/lib/eth/tests/types/internal/commitmentpool-processor.d.ts +0 -348
- package/lib/eth/tests/types/internal/commitmentpool-processor.js +0 -607
- package/lib/eth/tests/types/internal/commitmentpool-processor.js.map +0 -1
- package/lib/eth/tests/types/internal/commitmentpool-test-utils.d.ts +0 -9
- package/lib/eth/tests/types/internal/commitmentpool-test-utils.js +0 -87
- package/lib/eth/tests/types/internal/commitmentpool-test-utils.js.map +0 -1
- package/lib/eth/tests/types/internal/common.d.ts +0 -10
- package/lib/eth/tests/types/internal/common.js +0 -8
- package/lib/eth/tests/types/internal/common.js.map +0 -1
- package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.d.ts +0 -988
- package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.js +0 -1269
- package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.js.map +0 -1
- package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.d.ts +0 -792
- package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.js +0 -1040
- package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.js.map +0 -1
- package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.d.ts +0 -549
- package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.js +0 -721
- package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.js.map +0 -1
- package/lib/eth/tests/types/internal/factories/Pyth__factory.d.ts +0 -1130
- package/lib/eth/tests/types/internal/factories/Pyth__factory.js +0 -1486
- package/lib/eth/tests/types/internal/factories/Pyth__factory.js.map +0 -1
- package/lib/eth/tests/types/internal/factories/Seaport__factory.d.ts +0 -2018
- package/lib/eth/tests/types/internal/factories/Seaport__factory.js +0 -2610
- package/lib/eth/tests/types/internal/factories/Seaport__factory.js.map +0 -1
- package/lib/eth/tests/types/internal/factories/TokenExchange__factory.d.ts +0 -651
- package/lib/eth/tests/types/internal/factories/TokenExchange__factory.js +0 -853
- package/lib/eth/tests/types/internal/factories/TokenExchange__factory.js.map +0 -1
- package/lib/eth/tests/types/internal/factories/index.d.ts +0 -6
- package/lib/eth/tests/types/internal/factories/index.js +0 -10
- package/lib/eth/tests/types/internal/factories/index.js.map +0 -1
- package/lib/eth/tests/types/internal/index.d.ts +0 -13
- package/lib/eth/tests/types/internal/index.js +0 -8
- package/lib/eth/tests/types/internal/index.js.map +0 -1
- package/lib/eth/tests/types/internal/membershipstakerv3-processor.d.ts +0 -287
- package/lib/eth/tests/types/internal/membershipstakerv3-processor.js +0 -596
- package/lib/eth/tests/types/internal/membershipstakerv3-processor.js.map +0 -1
- package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.d.ts +0 -11
- package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.js +0 -109
- package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.js.map +0 -1
- package/lib/eth/tests/types/internal/pyth-processor.d.ts +0 -422
- package/lib/eth/tests/types/internal/pyth-processor.js +0 -890
- package/lib/eth/tests/types/internal/pyth-processor.js.map +0 -1
- package/lib/eth/tests/types/internal/pyth-test-utils.d.ts +0 -13
- package/lib/eth/tests/types/internal/pyth-test-utils.js +0 -131
- package/lib/eth/tests/types/internal/pyth-test-utils.js.map +0 -1
- package/lib/eth/tests/types/internal/seaport-processor.d.ts +0 -211
- package/lib/eth/tests/types/internal/seaport-processor.js +0 -237
- package/lib/eth/tests/types/internal/seaport-processor.js.map +0 -1
- package/lib/eth/tests/types/internal/seaport-test-utils.d.ts +0 -6
- package/lib/eth/tests/types/internal/seaport-test-utils.js +0 -61
- package/lib/eth/tests/types/internal/seaport-test-utils.js.map +0 -1
- package/lib/eth/tests/types/internal/tokenexchange-processor.d.ts +0 -334
- package/lib/eth/tests/types/internal/tokenexchange-processor.js +0 -667
- package/lib/eth/tests/types/internal/tokenexchange-processor.js.map +0 -1
- package/lib/eth/tests/types/internal/tokenexchange-test-utils.d.ts +0 -13
- package/lib/eth/tests/types/internal/tokenexchange-test-utils.js +0 -149
- package/lib/eth/tests/types/internal/tokenexchange-test-utils.js.map +0 -1
- package/lib/eth/tests/types/membershipstakerv3.d.ts +0 -3
- package/lib/eth/tests/types/membershipstakerv3.js +0 -7
- package/lib/eth/tests/types/membershipstakerv3.js.map +0 -1
- package/lib/eth/tests/types/pyth.d.ts +0 -3
- package/lib/eth/tests/types/pyth.js +0 -7
- package/lib/eth/tests/types/pyth.js.map +0 -1
- package/lib/eth/tests/types/seaport.d.ts +0 -3
- package/lib/eth/tests/types/seaport.js +0 -7
- package/lib/eth/tests/types/seaport.js.map +0 -1
- package/lib/eth/tests/types/tokenexchange.d.ts +0 -3
- package/lib/eth/tests/types/tokenexchange.js +0 -7
- package/lib/eth/tests/types/tokenexchange.js.map +0 -1
- package/lib/solana/tests/solana.test.d.ts +0 -1
- package/lib/solana/tests/solana.test.js.map +0 -1
- package/lib/solana/tests/types/basic_1.d.ts +0 -26
- package/lib/solana/tests/types/basic_1.js +0 -63
- package/lib/solana/tests/types/basic_1.js.map +0 -1
- package/lib/solana/tests/types/basic_1_processor.d.ts +0 -21
- package/lib/solana/tests/types/basic_1_processor.js +0 -35
- package/lib/solana/tests/types/basic_1_processor.js.map +0 -1
- package/lib/solana/tests/types/token_bridge.d.ts +0 -29
- package/lib/solana/tests/types/token_bridge.js +0 -938
- package/lib/solana/tests/types/token_bridge.js.map +0 -1
- package/lib/solana/tests/types/token_bridge_processor.d.ts +0 -212
- package/lib/solana/tests/types/token_bridge_processor.js +0 -134
- package/lib/solana/tests/types/token_bridge_processor.js.map +0 -1
- package/lib/solana/tests/wormhole-token-bridge.d.ts +0 -15
- package/lib/solana/tests/wormhole-token-bridge.js +0 -79
- package/lib/solana/tests/wormhole-token-bridge.js.map +0 -1
- package/lib/sui/tests/sui.test.d.ts +0 -1
- package/lib/sui/tests/sui.test.js.map +0 -1
- package/lib/sui/tests/types/index.d.ts +0 -1
- package/lib/sui/tests/types/index.js +0 -5
- package/lib/sui/tests/types/index.js.map +0 -1
- package/lib/sui/tests/types/testnet/index.d.ts +0 -1
- package/lib/sui/tests/types/testnet/index.js +0 -5
- package/lib/sui/tests/types/testnet/index.js.map +0 -1
- package/lib/sui/tests/types/testnet/swap.d.ts +0 -249
- package/lib/sui/tests/types/testnet/swap.js +0 -310
- package/lib/sui/tests/types/testnet/swap.js.map +0 -1
- package/src/aptos/tests/abis/reserved.json +0 -402
- package/src/aptos/tests/abis/soffl3.json +0 -1411
- package/src/aptos/tests/abis/souffle.json +0 -389
- package/src/aptos/tests/souffl3.ts +0 -56
- package/src/aptos/tests/types/index.ts +0 -6
- package/src/aptos/tests/types/reserved.ts +0 -766
- package/src/aptos/tests/types/soffl3.ts +0 -1528
- package/src/aptos/tests/types/souffle.ts +0 -765
- package/src/eth/error.ts +0 -4
- package/src/eth/tests/abis/eth/CommitmentPool.json +0 -1034
- package/src/eth/tests/abis/eth/MembershipStakerV3.json +0 -706
- package/src/eth/tests/abis/eth/Pyth.json +0 -1471
- package/src/eth/tests/abis/eth/Seaport.json +0 -2595
- package/src/eth/tests/abis/eth/TokenExchange.json +0 -838
- package/src/eth/tests/abis/eth/anyswapRouter.json +0 -490
- package/src/eth/tests/erc20.ts +0 -63
- package/src/eth/tests/types/anyswaprouter.ts +0 -7
- package/src/eth/tests/types/commitmentpool.ts +0 -7
- package/src/eth/tests/types/index.ts +0 -33
- package/src/eth/tests/types/internal/AnyswapRouter.ts +0 -122
- package/src/eth/tests/types/internal/CommitmentPool.ts +0 -208
- package/src/eth/tests/types/internal/MembershipStakerV3.ts +0 -108
- package/src/eth/tests/types/internal/Pyth.ts +0 -246
- package/src/eth/tests/types/internal/Seaport.ts +0 -389
- package/src/eth/tests/types/internal/TokenExchange.ts +0 -142
- package/src/eth/tests/types/internal/anyswaprouter-processor.ts +0 -1396
- package/src/eth/tests/types/internal/anyswaprouter-test-utils.ts +0 -187
- package/src/eth/tests/types/internal/commitmentpool-processor.ts +0 -1575
- package/src/eth/tests/types/internal/commitmentpool-test-utils.ts +0 -150
- package/src/eth/tests/types/internal/common.ts +0 -23
- package/src/eth/tests/types/internal/factories/AnyswapRouter__factory.ts +0 -1278
- package/src/eth/tests/types/internal/factories/CommitmentPool__factory.ts +0 -1049
- package/src/eth/tests/types/internal/factories/MembershipStakerV3__factory.ts +0 -730
- package/src/eth/tests/types/internal/factories/Pyth__factory.ts +0 -1492
- package/src/eth/tests/types/internal/factories/Seaport__factory.ts +0 -2616
- package/src/eth/tests/types/internal/factories/TokenExchange__factory.ts +0 -862
- package/src/eth/tests/types/internal/factories/index.ts +0 -9
- package/src/eth/tests/types/internal/index.ts +0 -16
- package/src/eth/tests/types/internal/membershipstakerv3-processor.ts +0 -1399
- package/src/eth/tests/types/internal/membershipstakerv3-test-utils.ts +0 -188
- package/src/eth/tests/types/internal/pyth-processor.ts +0 -2043
- package/src/eth/tests/types/internal/pyth-test-utils.ts +0 -226
- package/src/eth/tests/types/internal/seaport-processor.ts +0 -678
- package/src/eth/tests/types/internal/seaport-test-utils.ts +0 -100
- package/src/eth/tests/types/internal/tokenexchange-processor.ts +0 -1570
- package/src/eth/tests/types/internal/tokenexchange-test-utils.ts +0 -244
- package/src/eth/tests/types/membershipstakerv3.ts +0 -7
- package/src/eth/tests/types/pyth.ts +0 -7
- package/src/eth/tests/types/seaport.ts +0 -7
- package/src/eth/tests/types/tokenexchange.ts +0 -7
- package/src/solana/tests/abis/basic_1.json +0 -62
- package/src/solana/tests/abis/token_bridge.json +0 -937
- package/src/solana/tests/types/basic_1.ts +0 -62
- package/src/solana/tests/types/basic_1_processor.ts +0 -42
- package/src/solana/tests/types/token_bridge.ts +0 -937
- package/src/solana/tests/types/token_bridge_processor.ts +0 -150
- package/src/solana/tests/wormhole-token-bridge.ts +0 -96
- package/src/sui/tests/abis/testnet/swap.json +0 -1752
- package/src/sui/tests/types/index.ts +0 -3
- package/src/sui/tests/types/testnet/index.ts +0 -4
- package/src/sui/tests/types/testnet/swap.ts +0 -698
|
@@ -1,1570 +0,0 @@
|
|
|
1
|
-
/* Autogenerated file. Do not edit manually. */
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
import { BigNumberish, Overrides } from "ethers";
|
|
5
|
-
import { Networkish } from "ethers/providers";
|
|
6
|
-
import {
|
|
7
|
-
addContractByABI,
|
|
8
|
-
getContractByABI,
|
|
9
|
-
addProcessor,
|
|
10
|
-
getProcessor,
|
|
11
|
-
getProvider,
|
|
12
|
-
transformEtherError,
|
|
13
|
-
Trace,
|
|
14
|
-
BindOptions,
|
|
15
|
-
BaseProcessor,
|
|
16
|
-
BaseProcessorTemplate,
|
|
17
|
-
BoundContractView,
|
|
18
|
-
ContractContext,
|
|
19
|
-
ContractView,
|
|
20
|
-
DummyProvider,
|
|
21
|
-
TypedCallTrace,
|
|
22
|
-
toBlockTag,
|
|
23
|
-
} from "@sentio/sdk/eth";
|
|
24
|
-
import { EthFetchConfig } from "@sentio/protos";
|
|
25
|
-
|
|
26
|
-
import { TokenExchange, TokenExchange__factory } from "./index.js";
|
|
27
|
-
import {
|
|
28
|
-
TokenExchangeEvent,
|
|
29
|
-
TokenExchangeEventFilter,
|
|
30
|
-
AddLiquidityEvent,
|
|
31
|
-
AddLiquidityEventFilter,
|
|
32
|
-
RemoveLiquidityEvent,
|
|
33
|
-
RemoveLiquidityEventFilter,
|
|
34
|
-
RemoveLiquidityOneEvent,
|
|
35
|
-
RemoveLiquidityOneEventFilter,
|
|
36
|
-
RemoveLiquidityImbalanceEvent,
|
|
37
|
-
RemoveLiquidityImbalanceEventFilter,
|
|
38
|
-
CommitNewAdminEvent,
|
|
39
|
-
CommitNewAdminEventFilter,
|
|
40
|
-
NewAdminEvent,
|
|
41
|
-
NewAdminEventFilter,
|
|
42
|
-
CommitNewFeeEvent,
|
|
43
|
-
CommitNewFeeEventFilter,
|
|
44
|
-
NewFeeEvent,
|
|
45
|
-
NewFeeEventFilter,
|
|
46
|
-
RampAEvent,
|
|
47
|
-
RampAEventFilter,
|
|
48
|
-
StopRampAEvent,
|
|
49
|
-
StopRampAEventFilter,
|
|
50
|
-
} from "./TokenExchange.js";
|
|
51
|
-
|
|
52
|
-
export interface ACallObject {}
|
|
53
|
-
|
|
54
|
-
export type ACallTrace = TypedCallTrace<[], ACallObject> & Trace;
|
|
55
|
-
|
|
56
|
-
export interface Get_virtual_priceCallObject {}
|
|
57
|
-
|
|
58
|
-
export type Get_virtual_priceCallTrace = TypedCallTrace<
|
|
59
|
-
[],
|
|
60
|
-
Get_virtual_priceCallObject
|
|
61
|
-
> &
|
|
62
|
-
Trace;
|
|
63
|
-
|
|
64
|
-
export interface Calc_token_amountCallObject {
|
|
65
|
-
amounts: [bigint, bigint, bigint];
|
|
66
|
-
deposit: boolean;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type Calc_token_amountCallTrace = TypedCallTrace<
|
|
70
|
-
[[bigint, bigint, bigint], boolean],
|
|
71
|
-
Calc_token_amountCallObject
|
|
72
|
-
> &
|
|
73
|
-
Trace;
|
|
74
|
-
|
|
75
|
-
export interface Add_liquidityCallObject {
|
|
76
|
-
amounts: [bigint, bigint, bigint];
|
|
77
|
-
min_mint_amount: bigint;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export type Add_liquidityCallTrace = TypedCallTrace<
|
|
81
|
-
[[bigint, bigint, bigint], bigint],
|
|
82
|
-
Add_liquidityCallObject
|
|
83
|
-
> &
|
|
84
|
-
Trace;
|
|
85
|
-
|
|
86
|
-
export interface Get_dyCallObject {
|
|
87
|
-
i: bigint;
|
|
88
|
-
j: bigint;
|
|
89
|
-
dx: bigint;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export type Get_dyCallTrace = TypedCallTrace<
|
|
93
|
-
[bigint, bigint, bigint],
|
|
94
|
-
Get_dyCallObject
|
|
95
|
-
> &
|
|
96
|
-
Trace;
|
|
97
|
-
|
|
98
|
-
export interface Get_dy_underlyingCallObject {
|
|
99
|
-
i: bigint;
|
|
100
|
-
j: bigint;
|
|
101
|
-
dx: bigint;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export type Get_dy_underlyingCallTrace = TypedCallTrace<
|
|
105
|
-
[bigint, bigint, bigint],
|
|
106
|
-
Get_dy_underlyingCallObject
|
|
107
|
-
> &
|
|
108
|
-
Trace;
|
|
109
|
-
|
|
110
|
-
export interface ExchangeCallObject {
|
|
111
|
-
i: bigint;
|
|
112
|
-
j: bigint;
|
|
113
|
-
dx: bigint;
|
|
114
|
-
min_dy: bigint;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export type ExchangeCallTrace = TypedCallTrace<
|
|
118
|
-
[bigint, bigint, bigint, bigint],
|
|
119
|
-
ExchangeCallObject
|
|
120
|
-
> &
|
|
121
|
-
Trace;
|
|
122
|
-
|
|
123
|
-
export interface Remove_liquidityCallObject {
|
|
124
|
-
_amount: bigint;
|
|
125
|
-
min_amounts: [bigint, bigint, bigint];
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export type Remove_liquidityCallTrace = TypedCallTrace<
|
|
129
|
-
[bigint, [bigint, bigint, bigint]],
|
|
130
|
-
Remove_liquidityCallObject
|
|
131
|
-
> &
|
|
132
|
-
Trace;
|
|
133
|
-
|
|
134
|
-
export interface Remove_liquidity_imbalanceCallObject {
|
|
135
|
-
amounts: [bigint, bigint, bigint];
|
|
136
|
-
max_burn_amount: bigint;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export type Remove_liquidity_imbalanceCallTrace = TypedCallTrace<
|
|
140
|
-
[[bigint, bigint, bigint], bigint],
|
|
141
|
-
Remove_liquidity_imbalanceCallObject
|
|
142
|
-
> &
|
|
143
|
-
Trace;
|
|
144
|
-
|
|
145
|
-
export interface Calc_withdraw_one_coinCallObject {
|
|
146
|
-
_token_amount: bigint;
|
|
147
|
-
i: bigint;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export type Calc_withdraw_one_coinCallTrace = TypedCallTrace<
|
|
151
|
-
[bigint, bigint],
|
|
152
|
-
Calc_withdraw_one_coinCallObject
|
|
153
|
-
> &
|
|
154
|
-
Trace;
|
|
155
|
-
|
|
156
|
-
export interface Remove_liquidity_one_coinCallObject {
|
|
157
|
-
_token_amount: bigint;
|
|
158
|
-
i: bigint;
|
|
159
|
-
min_amount: bigint;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export type Remove_liquidity_one_coinCallTrace = TypedCallTrace<
|
|
163
|
-
[bigint, bigint, bigint],
|
|
164
|
-
Remove_liquidity_one_coinCallObject
|
|
165
|
-
> &
|
|
166
|
-
Trace;
|
|
167
|
-
|
|
168
|
-
export interface Ramp_ACallObject {
|
|
169
|
-
_future_A: bigint;
|
|
170
|
-
_future_time: bigint;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export type Ramp_ACallTrace = TypedCallTrace<
|
|
174
|
-
[bigint, bigint],
|
|
175
|
-
Ramp_ACallObject
|
|
176
|
-
> &
|
|
177
|
-
Trace;
|
|
178
|
-
|
|
179
|
-
export interface Stop_ramp_ACallObject {}
|
|
180
|
-
|
|
181
|
-
export type Stop_ramp_ACallTrace = TypedCallTrace<[], Stop_ramp_ACallObject> &
|
|
182
|
-
Trace;
|
|
183
|
-
|
|
184
|
-
export interface Commit_new_feeCallObject {
|
|
185
|
-
new_fee: bigint;
|
|
186
|
-
new_admin_fee: bigint;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export type Commit_new_feeCallTrace = TypedCallTrace<
|
|
190
|
-
[bigint, bigint],
|
|
191
|
-
Commit_new_feeCallObject
|
|
192
|
-
> &
|
|
193
|
-
Trace;
|
|
194
|
-
|
|
195
|
-
export interface Apply_new_feeCallObject {}
|
|
196
|
-
|
|
197
|
-
export type Apply_new_feeCallTrace = TypedCallTrace<
|
|
198
|
-
[],
|
|
199
|
-
Apply_new_feeCallObject
|
|
200
|
-
> &
|
|
201
|
-
Trace;
|
|
202
|
-
|
|
203
|
-
export interface Revert_new_parametersCallObject {}
|
|
204
|
-
|
|
205
|
-
export type Revert_new_parametersCallTrace = TypedCallTrace<
|
|
206
|
-
[],
|
|
207
|
-
Revert_new_parametersCallObject
|
|
208
|
-
> &
|
|
209
|
-
Trace;
|
|
210
|
-
|
|
211
|
-
export interface Commit_transfer_ownershipCallObject {
|
|
212
|
-
_owner: string;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export type Commit_transfer_ownershipCallTrace = TypedCallTrace<
|
|
216
|
-
[string],
|
|
217
|
-
Commit_transfer_ownershipCallObject
|
|
218
|
-
> &
|
|
219
|
-
Trace;
|
|
220
|
-
|
|
221
|
-
export interface Apply_transfer_ownershipCallObject {}
|
|
222
|
-
|
|
223
|
-
export type Apply_transfer_ownershipCallTrace = TypedCallTrace<
|
|
224
|
-
[],
|
|
225
|
-
Apply_transfer_ownershipCallObject
|
|
226
|
-
> &
|
|
227
|
-
Trace;
|
|
228
|
-
|
|
229
|
-
export interface Revert_transfer_ownershipCallObject {}
|
|
230
|
-
|
|
231
|
-
export type Revert_transfer_ownershipCallTrace = TypedCallTrace<
|
|
232
|
-
[],
|
|
233
|
-
Revert_transfer_ownershipCallObject
|
|
234
|
-
> &
|
|
235
|
-
Trace;
|
|
236
|
-
|
|
237
|
-
export interface Admin_balancesCallObject {
|
|
238
|
-
i: bigint;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export type Admin_balancesCallTrace = TypedCallTrace<
|
|
242
|
-
[bigint],
|
|
243
|
-
Admin_balancesCallObject
|
|
244
|
-
> &
|
|
245
|
-
Trace;
|
|
246
|
-
|
|
247
|
-
export interface Withdraw_admin_feesCallObject {}
|
|
248
|
-
|
|
249
|
-
export type Withdraw_admin_feesCallTrace = TypedCallTrace<
|
|
250
|
-
[],
|
|
251
|
-
Withdraw_admin_feesCallObject
|
|
252
|
-
> &
|
|
253
|
-
Trace;
|
|
254
|
-
|
|
255
|
-
export interface Donate_admin_feesCallObject {}
|
|
256
|
-
|
|
257
|
-
export type Donate_admin_feesCallTrace = TypedCallTrace<
|
|
258
|
-
[],
|
|
259
|
-
Donate_admin_feesCallObject
|
|
260
|
-
> &
|
|
261
|
-
Trace;
|
|
262
|
-
|
|
263
|
-
export interface Kill_meCallObject {}
|
|
264
|
-
|
|
265
|
-
export type Kill_meCallTrace = TypedCallTrace<[], Kill_meCallObject> & Trace;
|
|
266
|
-
|
|
267
|
-
export interface Unkill_meCallObject {}
|
|
268
|
-
|
|
269
|
-
export type Unkill_meCallTrace = TypedCallTrace<[], Unkill_meCallObject> &
|
|
270
|
-
Trace;
|
|
271
|
-
|
|
272
|
-
export interface CoinsCallObject {
|
|
273
|
-
arg0: bigint;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
export type CoinsCallTrace = TypedCallTrace<[bigint], CoinsCallObject> & Trace;
|
|
277
|
-
|
|
278
|
-
export interface BalancesCallObject {
|
|
279
|
-
arg0: bigint;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
export type BalancesCallTrace = TypedCallTrace<[bigint], BalancesCallObject> &
|
|
283
|
-
Trace;
|
|
284
|
-
|
|
285
|
-
export interface FeeCallObject {}
|
|
286
|
-
|
|
287
|
-
export type FeeCallTrace = TypedCallTrace<[], FeeCallObject> & Trace;
|
|
288
|
-
|
|
289
|
-
export interface Admin_feeCallObject {}
|
|
290
|
-
|
|
291
|
-
export type Admin_feeCallTrace = TypedCallTrace<[], Admin_feeCallObject> &
|
|
292
|
-
Trace;
|
|
293
|
-
|
|
294
|
-
export interface OwnerCallObject {}
|
|
295
|
-
|
|
296
|
-
export type OwnerCallTrace = TypedCallTrace<[], OwnerCallObject> & Trace;
|
|
297
|
-
|
|
298
|
-
export interface Initial_ACallObject {}
|
|
299
|
-
|
|
300
|
-
export type Initial_ACallTrace = TypedCallTrace<[], Initial_ACallObject> &
|
|
301
|
-
Trace;
|
|
302
|
-
|
|
303
|
-
export interface Future_ACallObject {}
|
|
304
|
-
|
|
305
|
-
export type Future_ACallTrace = TypedCallTrace<[], Future_ACallObject> & Trace;
|
|
306
|
-
|
|
307
|
-
export interface Initial_A_timeCallObject {}
|
|
308
|
-
|
|
309
|
-
export type Initial_A_timeCallTrace = TypedCallTrace<
|
|
310
|
-
[],
|
|
311
|
-
Initial_A_timeCallObject
|
|
312
|
-
> &
|
|
313
|
-
Trace;
|
|
314
|
-
|
|
315
|
-
export interface Future_A_timeCallObject {}
|
|
316
|
-
|
|
317
|
-
export type Future_A_timeCallTrace = TypedCallTrace<
|
|
318
|
-
[],
|
|
319
|
-
Future_A_timeCallObject
|
|
320
|
-
> &
|
|
321
|
-
Trace;
|
|
322
|
-
|
|
323
|
-
export interface Admin_actions_deadlineCallObject {}
|
|
324
|
-
|
|
325
|
-
export type Admin_actions_deadlineCallTrace = TypedCallTrace<
|
|
326
|
-
[],
|
|
327
|
-
Admin_actions_deadlineCallObject
|
|
328
|
-
> &
|
|
329
|
-
Trace;
|
|
330
|
-
|
|
331
|
-
export interface Transfer_ownership_deadlineCallObject {}
|
|
332
|
-
|
|
333
|
-
export type Transfer_ownership_deadlineCallTrace = TypedCallTrace<
|
|
334
|
-
[],
|
|
335
|
-
Transfer_ownership_deadlineCallObject
|
|
336
|
-
> &
|
|
337
|
-
Trace;
|
|
338
|
-
|
|
339
|
-
export interface Future_feeCallObject {}
|
|
340
|
-
|
|
341
|
-
export type Future_feeCallTrace = TypedCallTrace<[], Future_feeCallObject> &
|
|
342
|
-
Trace;
|
|
343
|
-
|
|
344
|
-
export interface Future_admin_feeCallObject {}
|
|
345
|
-
|
|
346
|
-
export type Future_admin_feeCallTrace = TypedCallTrace<
|
|
347
|
-
[],
|
|
348
|
-
Future_admin_feeCallObject
|
|
349
|
-
> &
|
|
350
|
-
Trace;
|
|
351
|
-
|
|
352
|
-
export interface Future_ownerCallObject {}
|
|
353
|
-
|
|
354
|
-
export type Future_ownerCallTrace = TypedCallTrace<[], Future_ownerCallObject> &
|
|
355
|
-
Trace;
|
|
356
|
-
|
|
357
|
-
const templateContract = TokenExchange__factory.connect("0x0", DummyProvider);
|
|
358
|
-
|
|
359
|
-
export class TokenExchangeContractView extends ContractView<TokenExchange> {
|
|
360
|
-
constructor(contract: TokenExchange) {
|
|
361
|
-
super(contract);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
async A(overrides?: Overrides): Promise<bigint> {
|
|
365
|
-
try {
|
|
366
|
-
return await this.contract.getFunction("A()")(overrides || {});
|
|
367
|
-
} catch (e) {
|
|
368
|
-
throw transformEtherError(e, undefined);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
async get_virtual_price(overrides?: Overrides): Promise<bigint> {
|
|
373
|
-
try {
|
|
374
|
-
return await this.contract.getFunction("get_virtual_price()")(
|
|
375
|
-
overrides || {}
|
|
376
|
-
);
|
|
377
|
-
} catch (e) {
|
|
378
|
-
throw transformEtherError(e, undefined);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
async calc_token_amount(
|
|
383
|
-
amounts: [BigNumberish, BigNumberish, BigNumberish],
|
|
384
|
-
deposit: boolean,
|
|
385
|
-
overrides?: Overrides
|
|
386
|
-
): Promise<bigint> {
|
|
387
|
-
try {
|
|
388
|
-
return await this.contract.getFunction(
|
|
389
|
-
"calc_token_amount(uint256[],bool)"
|
|
390
|
-
)(amounts, deposit, overrides || {});
|
|
391
|
-
} catch (e) {
|
|
392
|
-
throw transformEtherError(e, undefined);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
async get_dy(
|
|
397
|
-
i: BigNumberish,
|
|
398
|
-
j: BigNumberish,
|
|
399
|
-
dx: BigNumberish,
|
|
400
|
-
overrides?: Overrides
|
|
401
|
-
): Promise<bigint> {
|
|
402
|
-
try {
|
|
403
|
-
return await this.contract.getFunction("get_dy(int128,int128,uint256)")(
|
|
404
|
-
i,
|
|
405
|
-
j,
|
|
406
|
-
dx,
|
|
407
|
-
overrides || {}
|
|
408
|
-
);
|
|
409
|
-
} catch (e) {
|
|
410
|
-
throw transformEtherError(e, undefined);
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
async get_dy_underlying(
|
|
415
|
-
i: BigNumberish,
|
|
416
|
-
j: BigNumberish,
|
|
417
|
-
dx: BigNumberish,
|
|
418
|
-
overrides?: Overrides
|
|
419
|
-
): Promise<bigint> {
|
|
420
|
-
try {
|
|
421
|
-
return await this.contract.getFunction(
|
|
422
|
-
"get_dy_underlying(int128,int128,uint256)"
|
|
423
|
-
)(i, j, dx, overrides || {});
|
|
424
|
-
} catch (e) {
|
|
425
|
-
throw transformEtherError(e, undefined);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
async calc_withdraw_one_coin(
|
|
430
|
-
_token_amount: BigNumberish,
|
|
431
|
-
i: BigNumberish,
|
|
432
|
-
overrides?: Overrides
|
|
433
|
-
): Promise<bigint> {
|
|
434
|
-
try {
|
|
435
|
-
return await this.contract.getFunction(
|
|
436
|
-
"calc_withdraw_one_coin(uint256,int128)"
|
|
437
|
-
)(_token_amount, i, overrides || {});
|
|
438
|
-
} catch (e) {
|
|
439
|
-
throw transformEtherError(e, undefined);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
async admin_balances(
|
|
444
|
-
i: BigNumberish,
|
|
445
|
-
overrides?: Overrides
|
|
446
|
-
): Promise<bigint> {
|
|
447
|
-
try {
|
|
448
|
-
return await this.contract.getFunction("admin_balances(uint256)")(
|
|
449
|
-
i,
|
|
450
|
-
overrides || {}
|
|
451
|
-
);
|
|
452
|
-
} catch (e) {
|
|
453
|
-
throw transformEtherError(e, undefined);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
async coins(arg0: BigNumberish, overrides?: Overrides): Promise<string> {
|
|
458
|
-
try {
|
|
459
|
-
return await this.contract.getFunction("coins(uint256)")(
|
|
460
|
-
arg0,
|
|
461
|
-
overrides || {}
|
|
462
|
-
);
|
|
463
|
-
} catch (e) {
|
|
464
|
-
throw transformEtherError(e, undefined);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
async balances(arg0: BigNumberish, overrides?: Overrides): Promise<bigint> {
|
|
469
|
-
try {
|
|
470
|
-
return await this.contract.getFunction("balances(uint256)")(
|
|
471
|
-
arg0,
|
|
472
|
-
overrides || {}
|
|
473
|
-
);
|
|
474
|
-
} catch (e) {
|
|
475
|
-
throw transformEtherError(e, undefined);
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
async fee(overrides?: Overrides): Promise<bigint> {
|
|
480
|
-
try {
|
|
481
|
-
return await this.contract.getFunction("fee()")(overrides || {});
|
|
482
|
-
} catch (e) {
|
|
483
|
-
throw transformEtherError(e, undefined);
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
async admin_fee(overrides?: Overrides): Promise<bigint> {
|
|
488
|
-
try {
|
|
489
|
-
return await this.contract.getFunction("admin_fee()")(overrides || {});
|
|
490
|
-
} catch (e) {
|
|
491
|
-
throw transformEtherError(e, undefined);
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
async owner(overrides?: Overrides): Promise<string> {
|
|
496
|
-
try {
|
|
497
|
-
return await this.contract.getFunction("owner()")(overrides || {});
|
|
498
|
-
} catch (e) {
|
|
499
|
-
throw transformEtherError(e, undefined);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
async initial_A(overrides?: Overrides): Promise<bigint> {
|
|
504
|
-
try {
|
|
505
|
-
return await this.contract.getFunction("initial_A()")(overrides || {});
|
|
506
|
-
} catch (e) {
|
|
507
|
-
throw transformEtherError(e, undefined);
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
async future_A(overrides?: Overrides): Promise<bigint> {
|
|
512
|
-
try {
|
|
513
|
-
return await this.contract.getFunction("future_A()")(overrides || {});
|
|
514
|
-
} catch (e) {
|
|
515
|
-
throw transformEtherError(e, undefined);
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
async initial_A_time(overrides?: Overrides): Promise<bigint> {
|
|
520
|
-
try {
|
|
521
|
-
return await this.contract.getFunction("initial_A_time()")(
|
|
522
|
-
overrides || {}
|
|
523
|
-
);
|
|
524
|
-
} catch (e) {
|
|
525
|
-
throw transformEtherError(e, undefined);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
async future_A_time(overrides?: Overrides): Promise<bigint> {
|
|
530
|
-
try {
|
|
531
|
-
return await this.contract.getFunction("future_A_time()")(
|
|
532
|
-
overrides || {}
|
|
533
|
-
);
|
|
534
|
-
} catch (e) {
|
|
535
|
-
throw transformEtherError(e, undefined);
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
async admin_actions_deadline(overrides?: Overrides): Promise<bigint> {
|
|
540
|
-
try {
|
|
541
|
-
return await this.contract.getFunction("admin_actions_deadline()")(
|
|
542
|
-
overrides || {}
|
|
543
|
-
);
|
|
544
|
-
} catch (e) {
|
|
545
|
-
throw transformEtherError(e, undefined);
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
async transfer_ownership_deadline(overrides?: Overrides): Promise<bigint> {
|
|
550
|
-
try {
|
|
551
|
-
return await this.contract.getFunction("transfer_ownership_deadline()")(
|
|
552
|
-
overrides || {}
|
|
553
|
-
);
|
|
554
|
-
} catch (e) {
|
|
555
|
-
throw transformEtherError(e, undefined);
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
async future_fee(overrides?: Overrides): Promise<bigint> {
|
|
560
|
-
try {
|
|
561
|
-
return await this.contract.getFunction("future_fee()")(overrides || {});
|
|
562
|
-
} catch (e) {
|
|
563
|
-
throw transformEtherError(e, undefined);
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
async future_admin_fee(overrides?: Overrides): Promise<bigint> {
|
|
568
|
-
try {
|
|
569
|
-
return await this.contract.getFunction("future_admin_fee()")(
|
|
570
|
-
overrides || {}
|
|
571
|
-
);
|
|
572
|
-
} catch (e) {
|
|
573
|
-
throw transformEtherError(e, undefined);
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
async future_owner(overrides?: Overrides): Promise<string> {
|
|
578
|
-
try {
|
|
579
|
-
return await this.contract.getFunction("future_owner()")(overrides || {});
|
|
580
|
-
} catch (e) {
|
|
581
|
-
throw transformEtherError(e, undefined);
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
export class TokenExchangeBoundContractView extends BoundContractView<
|
|
587
|
-
TokenExchange,
|
|
588
|
-
TokenExchangeContractView
|
|
589
|
-
> {
|
|
590
|
-
async A(overrides?: Overrides): Promise<bigint> {
|
|
591
|
-
if (!overrides && this.context) {
|
|
592
|
-
overrides = {
|
|
593
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
594
|
-
};
|
|
595
|
-
}
|
|
596
|
-
return await this.view.A(overrides || {});
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
async get_virtual_price(overrides?: Overrides): Promise<bigint> {
|
|
600
|
-
if (!overrides && this.context) {
|
|
601
|
-
overrides = {
|
|
602
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
return await this.view.get_virtual_price(overrides || {});
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
async calc_token_amount(
|
|
609
|
-
amounts: [BigNumberish, BigNumberish, BigNumberish],
|
|
610
|
-
deposit: boolean,
|
|
611
|
-
overrides?: Overrides
|
|
612
|
-
): Promise<bigint> {
|
|
613
|
-
if (!overrides && this.context) {
|
|
614
|
-
overrides = {
|
|
615
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
return await this.view.calc_token_amount(amounts, deposit, overrides || {});
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
async get_dy(
|
|
622
|
-
i: BigNumberish,
|
|
623
|
-
j: BigNumberish,
|
|
624
|
-
dx: BigNumberish,
|
|
625
|
-
overrides?: Overrides
|
|
626
|
-
): Promise<bigint> {
|
|
627
|
-
if (!overrides && this.context) {
|
|
628
|
-
overrides = {
|
|
629
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
return await this.view.get_dy(i, j, dx, overrides || {});
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
async get_dy_underlying(
|
|
636
|
-
i: BigNumberish,
|
|
637
|
-
j: BigNumberish,
|
|
638
|
-
dx: BigNumberish,
|
|
639
|
-
overrides?: Overrides
|
|
640
|
-
): Promise<bigint> {
|
|
641
|
-
if (!overrides && this.context) {
|
|
642
|
-
overrides = {
|
|
643
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
return await this.view.get_dy_underlying(i, j, dx, overrides || {});
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
async calc_withdraw_one_coin(
|
|
650
|
-
_token_amount: BigNumberish,
|
|
651
|
-
i: BigNumberish,
|
|
652
|
-
overrides?: Overrides
|
|
653
|
-
): Promise<bigint> {
|
|
654
|
-
if (!overrides && this.context) {
|
|
655
|
-
overrides = {
|
|
656
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
657
|
-
};
|
|
658
|
-
}
|
|
659
|
-
return await this.view.calc_withdraw_one_coin(
|
|
660
|
-
_token_amount,
|
|
661
|
-
i,
|
|
662
|
-
overrides || {}
|
|
663
|
-
);
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
async admin_balances(
|
|
667
|
-
i: BigNumberish,
|
|
668
|
-
overrides?: Overrides
|
|
669
|
-
): Promise<bigint> {
|
|
670
|
-
if (!overrides && this.context) {
|
|
671
|
-
overrides = {
|
|
672
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
673
|
-
};
|
|
674
|
-
}
|
|
675
|
-
return await this.view.admin_balances(i, overrides || {});
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
async coins(arg0: BigNumberish, overrides?: Overrides): Promise<string> {
|
|
679
|
-
if (!overrides && this.context) {
|
|
680
|
-
overrides = {
|
|
681
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
682
|
-
};
|
|
683
|
-
}
|
|
684
|
-
return await this.view.coins(arg0, overrides || {});
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
async balances(arg0: BigNumberish, overrides?: Overrides): Promise<bigint> {
|
|
688
|
-
if (!overrides && this.context) {
|
|
689
|
-
overrides = {
|
|
690
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
691
|
-
};
|
|
692
|
-
}
|
|
693
|
-
return await this.view.balances(arg0, overrides || {});
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
async fee(overrides?: Overrides): Promise<bigint> {
|
|
697
|
-
if (!overrides && this.context) {
|
|
698
|
-
overrides = {
|
|
699
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
700
|
-
};
|
|
701
|
-
}
|
|
702
|
-
return await this.view.fee(overrides || {});
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
async admin_fee(overrides?: Overrides): Promise<bigint> {
|
|
706
|
-
if (!overrides && this.context) {
|
|
707
|
-
overrides = {
|
|
708
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
709
|
-
};
|
|
710
|
-
}
|
|
711
|
-
return await this.view.admin_fee(overrides || {});
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
async owner(overrides?: Overrides): Promise<string> {
|
|
715
|
-
if (!overrides && this.context) {
|
|
716
|
-
overrides = {
|
|
717
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
return await this.view.owner(overrides || {});
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
async initial_A(overrides?: Overrides): Promise<bigint> {
|
|
724
|
-
if (!overrides && this.context) {
|
|
725
|
-
overrides = {
|
|
726
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
727
|
-
};
|
|
728
|
-
}
|
|
729
|
-
return await this.view.initial_A(overrides || {});
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
async future_A(overrides?: Overrides): Promise<bigint> {
|
|
733
|
-
if (!overrides && this.context) {
|
|
734
|
-
overrides = {
|
|
735
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
736
|
-
};
|
|
737
|
-
}
|
|
738
|
-
return await this.view.future_A(overrides || {});
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
async initial_A_time(overrides?: Overrides): Promise<bigint> {
|
|
742
|
-
if (!overrides && this.context) {
|
|
743
|
-
overrides = {
|
|
744
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
745
|
-
};
|
|
746
|
-
}
|
|
747
|
-
return await this.view.initial_A_time(overrides || {});
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
async future_A_time(overrides?: Overrides): Promise<bigint> {
|
|
751
|
-
if (!overrides && this.context) {
|
|
752
|
-
overrides = {
|
|
753
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
754
|
-
};
|
|
755
|
-
}
|
|
756
|
-
return await this.view.future_A_time(overrides || {});
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
async admin_actions_deadline(overrides?: Overrides): Promise<bigint> {
|
|
760
|
-
if (!overrides && this.context) {
|
|
761
|
-
overrides = {
|
|
762
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
763
|
-
};
|
|
764
|
-
}
|
|
765
|
-
return await this.view.admin_actions_deadline(overrides || {});
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
async transfer_ownership_deadline(overrides?: Overrides): Promise<bigint> {
|
|
769
|
-
if (!overrides && this.context) {
|
|
770
|
-
overrides = {
|
|
771
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
772
|
-
};
|
|
773
|
-
}
|
|
774
|
-
return await this.view.transfer_ownership_deadline(overrides || {});
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
async future_fee(overrides?: Overrides): Promise<bigint> {
|
|
778
|
-
if (!overrides && this.context) {
|
|
779
|
-
overrides = {
|
|
780
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
781
|
-
};
|
|
782
|
-
}
|
|
783
|
-
return await this.view.future_fee(overrides || {});
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
async future_admin_fee(overrides?: Overrides): Promise<bigint> {
|
|
787
|
-
if (!overrides && this.context) {
|
|
788
|
-
overrides = {
|
|
789
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
790
|
-
};
|
|
791
|
-
}
|
|
792
|
-
return await this.view.future_admin_fee(overrides || {});
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
async future_owner(overrides?: Overrides): Promise<string> {
|
|
796
|
-
if (!overrides && this.context) {
|
|
797
|
-
overrides = {
|
|
798
|
-
blockTag: toBlockTag(this.context.blockNumber),
|
|
799
|
-
};
|
|
800
|
-
}
|
|
801
|
-
return await this.view.future_owner(overrides || {});
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
export type TokenExchangeContext = ContractContext<
|
|
806
|
-
TokenExchange,
|
|
807
|
-
TokenExchangeBoundContractView
|
|
808
|
-
>;
|
|
809
|
-
|
|
810
|
-
export class TokenExchangeProcessor extends BaseProcessor<
|
|
811
|
-
TokenExchange,
|
|
812
|
-
TokenExchangeBoundContractView
|
|
813
|
-
> {
|
|
814
|
-
onEventTokenExchange(
|
|
815
|
-
handler: (event: TokenExchangeEvent, ctx: TokenExchangeContext) => void,
|
|
816
|
-
filter?: TokenExchangeEventFilter | TokenExchangeEventFilter[],
|
|
817
|
-
fetchConfig?: EthFetchConfig
|
|
818
|
-
) {
|
|
819
|
-
if (!filter) {
|
|
820
|
-
filter = templateContract.filters[
|
|
821
|
-
"TokenExchange(address,int128,uint256,int128,uint256)"
|
|
822
|
-
](null, null, null, null, null);
|
|
823
|
-
}
|
|
824
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
onEventAddLiquidity(
|
|
828
|
-
handler: (event: AddLiquidityEvent, ctx: TokenExchangeContext) => void,
|
|
829
|
-
filter?: AddLiquidityEventFilter | AddLiquidityEventFilter[],
|
|
830
|
-
fetchConfig?: EthFetchConfig
|
|
831
|
-
) {
|
|
832
|
-
if (!filter) {
|
|
833
|
-
filter = templateContract.filters[
|
|
834
|
-
"AddLiquidity(address,uint256[],uint256[],uint256,uint256)"
|
|
835
|
-
](null, null, null, null, null);
|
|
836
|
-
}
|
|
837
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
onEventRemoveLiquidity(
|
|
841
|
-
handler: (event: RemoveLiquidityEvent, ctx: TokenExchangeContext) => void,
|
|
842
|
-
filter?: RemoveLiquidityEventFilter | RemoveLiquidityEventFilter[],
|
|
843
|
-
fetchConfig?: EthFetchConfig
|
|
844
|
-
) {
|
|
845
|
-
if (!filter) {
|
|
846
|
-
filter = templateContract.filters[
|
|
847
|
-
"RemoveLiquidity(address,uint256[],uint256[],uint256)"
|
|
848
|
-
](null, null, null, null);
|
|
849
|
-
}
|
|
850
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
onEventRemoveLiquidityOne(
|
|
854
|
-
handler: (
|
|
855
|
-
event: RemoveLiquidityOneEvent,
|
|
856
|
-
ctx: TokenExchangeContext
|
|
857
|
-
) => void,
|
|
858
|
-
filter?: RemoveLiquidityOneEventFilter | RemoveLiquidityOneEventFilter[],
|
|
859
|
-
fetchConfig?: EthFetchConfig
|
|
860
|
-
) {
|
|
861
|
-
if (!filter) {
|
|
862
|
-
filter = templateContract.filters[
|
|
863
|
-
"RemoveLiquidityOne(address,uint256,uint256)"
|
|
864
|
-
](null, null, null);
|
|
865
|
-
}
|
|
866
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
onEventRemoveLiquidityImbalance(
|
|
870
|
-
handler: (
|
|
871
|
-
event: RemoveLiquidityImbalanceEvent,
|
|
872
|
-
ctx: TokenExchangeContext
|
|
873
|
-
) => void,
|
|
874
|
-
filter?:
|
|
875
|
-
| RemoveLiquidityImbalanceEventFilter
|
|
876
|
-
| RemoveLiquidityImbalanceEventFilter[],
|
|
877
|
-
fetchConfig?: EthFetchConfig
|
|
878
|
-
) {
|
|
879
|
-
if (!filter) {
|
|
880
|
-
filter = templateContract.filters[
|
|
881
|
-
"RemoveLiquidityImbalance(address,uint256[],uint256[],uint256,uint256)"
|
|
882
|
-
](null, null, null, null, null);
|
|
883
|
-
}
|
|
884
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
onEventCommitNewAdmin(
|
|
888
|
-
handler: (event: CommitNewAdminEvent, ctx: TokenExchangeContext) => void,
|
|
889
|
-
filter?: CommitNewAdminEventFilter | CommitNewAdminEventFilter[],
|
|
890
|
-
fetchConfig?: EthFetchConfig
|
|
891
|
-
) {
|
|
892
|
-
if (!filter) {
|
|
893
|
-
filter = templateContract.filters["CommitNewAdmin(uint256,address)"](
|
|
894
|
-
null,
|
|
895
|
-
null
|
|
896
|
-
);
|
|
897
|
-
}
|
|
898
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
onEventNewAdmin(
|
|
902
|
-
handler: (event: NewAdminEvent, ctx: TokenExchangeContext) => void,
|
|
903
|
-
filter?: NewAdminEventFilter | NewAdminEventFilter[],
|
|
904
|
-
fetchConfig?: EthFetchConfig
|
|
905
|
-
) {
|
|
906
|
-
if (!filter) {
|
|
907
|
-
filter = templateContract.filters["NewAdmin(address)"](null);
|
|
908
|
-
}
|
|
909
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
onEventCommitNewFee(
|
|
913
|
-
handler: (event: CommitNewFeeEvent, ctx: TokenExchangeContext) => void,
|
|
914
|
-
filter?: CommitNewFeeEventFilter | CommitNewFeeEventFilter[],
|
|
915
|
-
fetchConfig?: EthFetchConfig
|
|
916
|
-
) {
|
|
917
|
-
if (!filter) {
|
|
918
|
-
filter = templateContract.filters[
|
|
919
|
-
"CommitNewFee(uint256,uint256,uint256)"
|
|
920
|
-
](null, null, null);
|
|
921
|
-
}
|
|
922
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
onEventNewFee(
|
|
926
|
-
handler: (event: NewFeeEvent, ctx: TokenExchangeContext) => void,
|
|
927
|
-
filter?: NewFeeEventFilter | NewFeeEventFilter[],
|
|
928
|
-
fetchConfig?: EthFetchConfig
|
|
929
|
-
) {
|
|
930
|
-
if (!filter) {
|
|
931
|
-
filter = templateContract.filters["NewFee(uint256,uint256)"](null, null);
|
|
932
|
-
}
|
|
933
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
onEventRampA(
|
|
937
|
-
handler: (event: RampAEvent, ctx: TokenExchangeContext) => void,
|
|
938
|
-
filter?: RampAEventFilter | RampAEventFilter[],
|
|
939
|
-
fetchConfig?: EthFetchConfig
|
|
940
|
-
) {
|
|
941
|
-
if (!filter) {
|
|
942
|
-
filter = templateContract.filters[
|
|
943
|
-
"RampA(uint256,uint256,uint256,uint256)"
|
|
944
|
-
](null, null, null, null);
|
|
945
|
-
}
|
|
946
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
onEventStopRampA(
|
|
950
|
-
handler: (event: StopRampAEvent, ctx: TokenExchangeContext) => void,
|
|
951
|
-
filter?: StopRampAEventFilter | StopRampAEventFilter[],
|
|
952
|
-
fetchConfig?: EthFetchConfig
|
|
953
|
-
) {
|
|
954
|
-
if (!filter) {
|
|
955
|
-
filter = templateContract.filters["StopRampA(uint256,uint256)"](
|
|
956
|
-
null,
|
|
957
|
-
null
|
|
958
|
-
);
|
|
959
|
-
}
|
|
960
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
onCallA(
|
|
964
|
-
handler: (call: ACallTrace, ctx: TokenExchangeContext) => void,
|
|
965
|
-
fetchConfig?: EthFetchConfig
|
|
966
|
-
) {
|
|
967
|
-
return super.onTrace("0xf446c1d0", handler, fetchConfig);
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
onCallGet_virtual_price(
|
|
971
|
-
handler: (
|
|
972
|
-
call: Get_virtual_priceCallTrace,
|
|
973
|
-
ctx: TokenExchangeContext
|
|
974
|
-
) => void,
|
|
975
|
-
fetchConfig?: EthFetchConfig
|
|
976
|
-
) {
|
|
977
|
-
return super.onTrace("0xbb7b8b80", handler, fetchConfig);
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
onCallCalc_token_amount(
|
|
981
|
-
handler: (
|
|
982
|
-
call: Calc_token_amountCallTrace,
|
|
983
|
-
ctx: TokenExchangeContext
|
|
984
|
-
) => void,
|
|
985
|
-
fetchConfig?: EthFetchConfig
|
|
986
|
-
) {
|
|
987
|
-
return super.onTrace("0x3883e119", handler, fetchConfig);
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
onCallAdd_liquidity(
|
|
991
|
-
handler: (call: Add_liquidityCallTrace, ctx: TokenExchangeContext) => void,
|
|
992
|
-
fetchConfig?: EthFetchConfig
|
|
993
|
-
) {
|
|
994
|
-
return super.onTrace("0x4515cef3", handler, fetchConfig);
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
onCallGet_dy(
|
|
998
|
-
handler: (call: Get_dyCallTrace, ctx: TokenExchangeContext) => void,
|
|
999
|
-
fetchConfig?: EthFetchConfig
|
|
1000
|
-
) {
|
|
1001
|
-
return super.onTrace("0x5e0d443f", handler, fetchConfig);
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
onCallGet_dy_underlying(
|
|
1005
|
-
handler: (
|
|
1006
|
-
call: Get_dy_underlyingCallTrace,
|
|
1007
|
-
ctx: TokenExchangeContext
|
|
1008
|
-
) => void,
|
|
1009
|
-
fetchConfig?: EthFetchConfig
|
|
1010
|
-
) {
|
|
1011
|
-
return super.onTrace("0x07211ef7", handler, fetchConfig);
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
onCallExchange(
|
|
1015
|
-
handler: (call: ExchangeCallTrace, ctx: TokenExchangeContext) => void,
|
|
1016
|
-
fetchConfig?: EthFetchConfig
|
|
1017
|
-
) {
|
|
1018
|
-
return super.onTrace("0x3df02124", handler, fetchConfig);
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
onCallRemove_liquidity(
|
|
1022
|
-
handler: (
|
|
1023
|
-
call: Remove_liquidityCallTrace,
|
|
1024
|
-
ctx: TokenExchangeContext
|
|
1025
|
-
) => void,
|
|
1026
|
-
fetchConfig?: EthFetchConfig
|
|
1027
|
-
) {
|
|
1028
|
-
return super.onTrace("0xecb586a5", handler, fetchConfig);
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
onCallRemove_liquidity_imbalance(
|
|
1032
|
-
handler: (
|
|
1033
|
-
call: Remove_liquidity_imbalanceCallTrace,
|
|
1034
|
-
ctx: TokenExchangeContext
|
|
1035
|
-
) => void,
|
|
1036
|
-
fetchConfig?: EthFetchConfig
|
|
1037
|
-
) {
|
|
1038
|
-
return super.onTrace("0x9fdaea0c", handler, fetchConfig);
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
onCallCalc_withdraw_one_coin(
|
|
1042
|
-
handler: (
|
|
1043
|
-
call: Calc_withdraw_one_coinCallTrace,
|
|
1044
|
-
ctx: TokenExchangeContext
|
|
1045
|
-
) => void,
|
|
1046
|
-
fetchConfig?: EthFetchConfig
|
|
1047
|
-
) {
|
|
1048
|
-
return super.onTrace("0xcc2b27d7", handler, fetchConfig);
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
onCallRemove_liquidity_one_coin(
|
|
1052
|
-
handler: (
|
|
1053
|
-
call: Remove_liquidity_one_coinCallTrace,
|
|
1054
|
-
ctx: TokenExchangeContext
|
|
1055
|
-
) => void,
|
|
1056
|
-
fetchConfig?: EthFetchConfig
|
|
1057
|
-
) {
|
|
1058
|
-
return super.onTrace("0x1a4d01d2", handler, fetchConfig);
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
onCallRamp_A(
|
|
1062
|
-
handler: (call: Ramp_ACallTrace, ctx: TokenExchangeContext) => void,
|
|
1063
|
-
fetchConfig?: EthFetchConfig
|
|
1064
|
-
) {
|
|
1065
|
-
return super.onTrace("0x3c157e64", handler, fetchConfig);
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
onCallStop_ramp_A(
|
|
1069
|
-
handler: (call: Stop_ramp_ACallTrace, ctx: TokenExchangeContext) => void,
|
|
1070
|
-
fetchConfig?: EthFetchConfig
|
|
1071
|
-
) {
|
|
1072
|
-
return super.onTrace("0x551a6588", handler, fetchConfig);
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
onCallCommit_new_fee(
|
|
1076
|
-
handler: (call: Commit_new_feeCallTrace, ctx: TokenExchangeContext) => void,
|
|
1077
|
-
fetchConfig?: EthFetchConfig
|
|
1078
|
-
) {
|
|
1079
|
-
return super.onTrace("0x5b5a1467", handler, fetchConfig);
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
onCallApply_new_fee(
|
|
1083
|
-
handler: (call: Apply_new_feeCallTrace, ctx: TokenExchangeContext) => void,
|
|
1084
|
-
fetchConfig?: EthFetchConfig
|
|
1085
|
-
) {
|
|
1086
|
-
return super.onTrace("0x4f12fe97", handler, fetchConfig);
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
onCallRevert_new_parameters(
|
|
1090
|
-
handler: (
|
|
1091
|
-
call: Revert_new_parametersCallTrace,
|
|
1092
|
-
ctx: TokenExchangeContext
|
|
1093
|
-
) => void,
|
|
1094
|
-
fetchConfig?: EthFetchConfig
|
|
1095
|
-
) {
|
|
1096
|
-
return super.onTrace("0x226840fb", handler, fetchConfig);
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
onCallCommit_transfer_ownership(
|
|
1100
|
-
handler: (
|
|
1101
|
-
call: Commit_transfer_ownershipCallTrace,
|
|
1102
|
-
ctx: TokenExchangeContext
|
|
1103
|
-
) => void,
|
|
1104
|
-
fetchConfig?: EthFetchConfig
|
|
1105
|
-
) {
|
|
1106
|
-
return super.onTrace("0x6b441a40", handler, fetchConfig);
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
onCallApply_transfer_ownership(
|
|
1110
|
-
handler: (
|
|
1111
|
-
call: Apply_transfer_ownershipCallTrace,
|
|
1112
|
-
ctx: TokenExchangeContext
|
|
1113
|
-
) => void,
|
|
1114
|
-
fetchConfig?: EthFetchConfig
|
|
1115
|
-
) {
|
|
1116
|
-
return super.onTrace("0x6a1c05ae", handler, fetchConfig);
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
onCallRevert_transfer_ownership(
|
|
1120
|
-
handler: (
|
|
1121
|
-
call: Revert_transfer_ownershipCallTrace,
|
|
1122
|
-
ctx: TokenExchangeContext
|
|
1123
|
-
) => void,
|
|
1124
|
-
fetchConfig?: EthFetchConfig
|
|
1125
|
-
) {
|
|
1126
|
-
return super.onTrace("0x86fbf193", handler, fetchConfig);
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
onCallAdmin_balances(
|
|
1130
|
-
handler: (call: Admin_balancesCallTrace, ctx: TokenExchangeContext) => void,
|
|
1131
|
-
fetchConfig?: EthFetchConfig
|
|
1132
|
-
) {
|
|
1133
|
-
return super.onTrace("0xe2e7d264", handler, fetchConfig);
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
onCallWithdraw_admin_fees(
|
|
1137
|
-
handler: (
|
|
1138
|
-
call: Withdraw_admin_feesCallTrace,
|
|
1139
|
-
ctx: TokenExchangeContext
|
|
1140
|
-
) => void,
|
|
1141
|
-
fetchConfig?: EthFetchConfig
|
|
1142
|
-
) {
|
|
1143
|
-
return super.onTrace("0x30c54085", handler, fetchConfig);
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
onCallDonate_admin_fees(
|
|
1147
|
-
handler: (
|
|
1148
|
-
call: Donate_admin_feesCallTrace,
|
|
1149
|
-
ctx: TokenExchangeContext
|
|
1150
|
-
) => void,
|
|
1151
|
-
fetchConfig?: EthFetchConfig
|
|
1152
|
-
) {
|
|
1153
|
-
return super.onTrace("0x524c3901", handler, fetchConfig);
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
onCallKill_me(
|
|
1157
|
-
handler: (call: Kill_meCallTrace, ctx: TokenExchangeContext) => void,
|
|
1158
|
-
fetchConfig?: EthFetchConfig
|
|
1159
|
-
) {
|
|
1160
|
-
return super.onTrace("0xe3698853", handler, fetchConfig);
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
onCallUnkill_me(
|
|
1164
|
-
handler: (call: Unkill_meCallTrace, ctx: TokenExchangeContext) => void,
|
|
1165
|
-
fetchConfig?: EthFetchConfig
|
|
1166
|
-
) {
|
|
1167
|
-
return super.onTrace("0x3046f972", handler, fetchConfig);
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
onCallCoins(
|
|
1171
|
-
handler: (call: CoinsCallTrace, ctx: TokenExchangeContext) => void,
|
|
1172
|
-
fetchConfig?: EthFetchConfig
|
|
1173
|
-
) {
|
|
1174
|
-
return super.onTrace("0xc6610657", handler, fetchConfig);
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
onCallBalances(
|
|
1178
|
-
handler: (call: BalancesCallTrace, ctx: TokenExchangeContext) => void,
|
|
1179
|
-
fetchConfig?: EthFetchConfig
|
|
1180
|
-
) {
|
|
1181
|
-
return super.onTrace("0x4903b0d1", handler, fetchConfig);
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
onCallFee(
|
|
1185
|
-
handler: (call: FeeCallTrace, ctx: TokenExchangeContext) => void,
|
|
1186
|
-
fetchConfig?: EthFetchConfig
|
|
1187
|
-
) {
|
|
1188
|
-
return super.onTrace("0xddca3f43", handler, fetchConfig);
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
onCallAdmin_fee(
|
|
1192
|
-
handler: (call: Admin_feeCallTrace, ctx: TokenExchangeContext) => void,
|
|
1193
|
-
fetchConfig?: EthFetchConfig
|
|
1194
|
-
) {
|
|
1195
|
-
return super.onTrace("0xfee3f7f9", handler, fetchConfig);
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
onCallOwner(
|
|
1199
|
-
handler: (call: OwnerCallTrace, ctx: TokenExchangeContext) => void,
|
|
1200
|
-
fetchConfig?: EthFetchConfig
|
|
1201
|
-
) {
|
|
1202
|
-
return super.onTrace("0x8da5cb5b", handler, fetchConfig);
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
onCallInitial_A(
|
|
1206
|
-
handler: (call: Initial_ACallTrace, ctx: TokenExchangeContext) => void,
|
|
1207
|
-
fetchConfig?: EthFetchConfig
|
|
1208
|
-
) {
|
|
1209
|
-
return super.onTrace("0x5409491a", handler, fetchConfig);
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
onCallFuture_A(
|
|
1213
|
-
handler: (call: Future_ACallTrace, ctx: TokenExchangeContext) => void,
|
|
1214
|
-
fetchConfig?: EthFetchConfig
|
|
1215
|
-
) {
|
|
1216
|
-
return super.onTrace("0xb4b577ad", handler, fetchConfig);
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
onCallInitial_A_time(
|
|
1220
|
-
handler: (call: Initial_A_timeCallTrace, ctx: TokenExchangeContext) => void,
|
|
1221
|
-
fetchConfig?: EthFetchConfig
|
|
1222
|
-
) {
|
|
1223
|
-
return super.onTrace("0x2081066c", handler, fetchConfig);
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
onCallFuture_A_time(
|
|
1227
|
-
handler: (call: Future_A_timeCallTrace, ctx: TokenExchangeContext) => void,
|
|
1228
|
-
fetchConfig?: EthFetchConfig
|
|
1229
|
-
) {
|
|
1230
|
-
return super.onTrace("0x14052288", handler, fetchConfig);
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
onCallAdmin_actions_deadline(
|
|
1234
|
-
handler: (
|
|
1235
|
-
call: Admin_actions_deadlineCallTrace,
|
|
1236
|
-
ctx: TokenExchangeContext
|
|
1237
|
-
) => void,
|
|
1238
|
-
fetchConfig?: EthFetchConfig
|
|
1239
|
-
) {
|
|
1240
|
-
return super.onTrace("0x405e28f8", handler, fetchConfig);
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
onCallTransfer_ownership_deadline(
|
|
1244
|
-
handler: (
|
|
1245
|
-
call: Transfer_ownership_deadlineCallTrace,
|
|
1246
|
-
ctx: TokenExchangeContext
|
|
1247
|
-
) => void,
|
|
1248
|
-
fetchConfig?: EthFetchConfig
|
|
1249
|
-
) {
|
|
1250
|
-
return super.onTrace("0xe0a0b586", handler, fetchConfig);
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
onCallFuture_fee(
|
|
1254
|
-
handler: (call: Future_feeCallTrace, ctx: TokenExchangeContext) => void,
|
|
1255
|
-
fetchConfig?: EthFetchConfig
|
|
1256
|
-
) {
|
|
1257
|
-
return super.onTrace("0x58680d0b", handler, fetchConfig);
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
onCallFuture_admin_fee(
|
|
1261
|
-
handler: (
|
|
1262
|
-
call: Future_admin_feeCallTrace,
|
|
1263
|
-
ctx: TokenExchangeContext
|
|
1264
|
-
) => void,
|
|
1265
|
-
fetchConfig?: EthFetchConfig
|
|
1266
|
-
) {
|
|
1267
|
-
return super.onTrace("0xe3824462", handler, fetchConfig);
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
onCallFuture_owner(
|
|
1271
|
-
handler: (call: Future_ownerCallTrace, ctx: TokenExchangeContext) => void,
|
|
1272
|
-
fetchConfig?: EthFetchConfig
|
|
1273
|
-
) {
|
|
1274
|
-
return super.onTrace("0x1ec0cdc1", handler, fetchConfig);
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
public static filters = {
|
|
1278
|
-
TokenExchange(
|
|
1279
|
-
buyer?: string | null,
|
|
1280
|
-
sold_id?: null,
|
|
1281
|
-
tokens_sold?: null,
|
|
1282
|
-
bought_id?: null,
|
|
1283
|
-
tokens_bought?: null
|
|
1284
|
-
) {
|
|
1285
|
-
return templateContract.filters[
|
|
1286
|
-
"TokenExchange(address,int128,uint256,int128,uint256)"
|
|
1287
|
-
](buyer, sold_id, tokens_sold, bought_id, tokens_bought);
|
|
1288
|
-
},
|
|
1289
|
-
AddLiquidity(
|
|
1290
|
-
provider?: string | null,
|
|
1291
|
-
token_amounts?: null,
|
|
1292
|
-
fees?: null,
|
|
1293
|
-
invariant?: null,
|
|
1294
|
-
token_supply?: null
|
|
1295
|
-
) {
|
|
1296
|
-
return templateContract.filters[
|
|
1297
|
-
"AddLiquidity(address,uint256[],uint256[],uint256,uint256)"
|
|
1298
|
-
](provider, token_amounts, fees, invariant, token_supply);
|
|
1299
|
-
},
|
|
1300
|
-
RemoveLiquidity(
|
|
1301
|
-
provider?: string | null,
|
|
1302
|
-
token_amounts?: null,
|
|
1303
|
-
fees?: null,
|
|
1304
|
-
token_supply?: null
|
|
1305
|
-
) {
|
|
1306
|
-
return templateContract.filters[
|
|
1307
|
-
"RemoveLiquidity(address,uint256[],uint256[],uint256)"
|
|
1308
|
-
](provider, token_amounts, fees, token_supply);
|
|
1309
|
-
},
|
|
1310
|
-
RemoveLiquidityOne(
|
|
1311
|
-
provider?: string | null,
|
|
1312
|
-
token_amount?: null,
|
|
1313
|
-
coin_amount?: null
|
|
1314
|
-
) {
|
|
1315
|
-
return templateContract.filters[
|
|
1316
|
-
"RemoveLiquidityOne(address,uint256,uint256)"
|
|
1317
|
-
](provider, token_amount, coin_amount);
|
|
1318
|
-
},
|
|
1319
|
-
RemoveLiquidityImbalance(
|
|
1320
|
-
provider?: string | null,
|
|
1321
|
-
token_amounts?: null,
|
|
1322
|
-
fees?: null,
|
|
1323
|
-
invariant?: null,
|
|
1324
|
-
token_supply?: null
|
|
1325
|
-
) {
|
|
1326
|
-
return templateContract.filters[
|
|
1327
|
-
"RemoveLiquidityImbalance(address,uint256[],uint256[],uint256,uint256)"
|
|
1328
|
-
](provider, token_amounts, fees, invariant, token_supply);
|
|
1329
|
-
},
|
|
1330
|
-
CommitNewAdmin(deadline?: BigNumberish | null, admin?: string | null) {
|
|
1331
|
-
return templateContract.filters["CommitNewAdmin(uint256,address)"](
|
|
1332
|
-
deadline,
|
|
1333
|
-
admin
|
|
1334
|
-
);
|
|
1335
|
-
},
|
|
1336
|
-
NewAdmin(admin?: string | null) {
|
|
1337
|
-
return templateContract.filters["NewAdmin(address)"](admin);
|
|
1338
|
-
},
|
|
1339
|
-
CommitNewFee(deadline?: BigNumberish | null, fee?: null, admin_fee?: null) {
|
|
1340
|
-
return templateContract.filters["CommitNewFee(uint256,uint256,uint256)"](
|
|
1341
|
-
deadline,
|
|
1342
|
-
fee,
|
|
1343
|
-
admin_fee
|
|
1344
|
-
);
|
|
1345
|
-
},
|
|
1346
|
-
NewFee(fee?: null, admin_fee?: null) {
|
|
1347
|
-
return templateContract.filters["NewFee(uint256,uint256)"](
|
|
1348
|
-
fee,
|
|
1349
|
-
admin_fee
|
|
1350
|
-
);
|
|
1351
|
-
},
|
|
1352
|
-
RampA(old_A?: null, new_A?: null, initial_time?: null, future_time?: null) {
|
|
1353
|
-
return templateContract.filters["RampA(uint256,uint256,uint256,uint256)"](
|
|
1354
|
-
old_A,
|
|
1355
|
-
new_A,
|
|
1356
|
-
initial_time,
|
|
1357
|
-
future_time
|
|
1358
|
-
);
|
|
1359
|
-
},
|
|
1360
|
-
StopRampA(A?: null, t?: null) {
|
|
1361
|
-
return templateContract.filters["StopRampA(uint256,uint256)"](A, t);
|
|
1362
|
-
},
|
|
1363
|
-
};
|
|
1364
|
-
|
|
1365
|
-
protected CreateBoundContractView(): TokenExchangeBoundContractView {
|
|
1366
|
-
const view = getTokenExchangeContract(
|
|
1367
|
-
this.config.address,
|
|
1368
|
-
this.config.network
|
|
1369
|
-
);
|
|
1370
|
-
return new TokenExchangeBoundContractView(this.config.address, view);
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
public static bind(options: BindOptions): TokenExchangeProcessor {
|
|
1374
|
-
if (!options.name) {
|
|
1375
|
-
options.name = "TokenExchange";
|
|
1376
|
-
}
|
|
1377
|
-
let processor = getProcessor(options) as TokenExchangeProcessor;
|
|
1378
|
-
if (!processor) {
|
|
1379
|
-
processor = new TokenExchangeProcessor(options);
|
|
1380
|
-
addProcessor(options, processor);
|
|
1381
|
-
}
|
|
1382
|
-
return processor;
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
export class TokenExchangeProcessorTemplate extends BaseProcessorTemplate<
|
|
1387
|
-
TokenExchange,
|
|
1388
|
-
TokenExchangeBoundContractView
|
|
1389
|
-
> {
|
|
1390
|
-
bindInternal(options: BindOptions) {
|
|
1391
|
-
if (!options.name) {
|
|
1392
|
-
options.name = "TokenExchange";
|
|
1393
|
-
}
|
|
1394
|
-
let processor = getProcessor(options) as TokenExchangeProcessor;
|
|
1395
|
-
if (!processor) {
|
|
1396
|
-
processor = new TokenExchangeProcessor(options);
|
|
1397
|
-
addProcessor(options, processor);
|
|
1398
|
-
}
|
|
1399
|
-
return processor;
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
onEventTokenExchange(
|
|
1403
|
-
handler: (event: TokenExchangeEvent, ctx: TokenExchangeContext) => void,
|
|
1404
|
-
filter?: TokenExchangeEventFilter | TokenExchangeEventFilter[],
|
|
1405
|
-
fetchConfig?: EthFetchConfig
|
|
1406
|
-
) {
|
|
1407
|
-
if (!filter) {
|
|
1408
|
-
filter = templateContract.filters[
|
|
1409
|
-
"TokenExchange(address,int128,uint256,int128,uint256)"
|
|
1410
|
-
](null, null, null, null, null);
|
|
1411
|
-
}
|
|
1412
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
onEventAddLiquidity(
|
|
1416
|
-
handler: (event: AddLiquidityEvent, ctx: TokenExchangeContext) => void,
|
|
1417
|
-
filter?: AddLiquidityEventFilter | AddLiquidityEventFilter[],
|
|
1418
|
-
fetchConfig?: EthFetchConfig
|
|
1419
|
-
) {
|
|
1420
|
-
if (!filter) {
|
|
1421
|
-
filter = templateContract.filters[
|
|
1422
|
-
"AddLiquidity(address,uint256[],uint256[],uint256,uint256)"
|
|
1423
|
-
](null, null, null, null, null);
|
|
1424
|
-
}
|
|
1425
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
onEventRemoveLiquidity(
|
|
1429
|
-
handler: (event: RemoveLiquidityEvent, ctx: TokenExchangeContext) => void,
|
|
1430
|
-
filter?: RemoveLiquidityEventFilter | RemoveLiquidityEventFilter[],
|
|
1431
|
-
fetchConfig?: EthFetchConfig
|
|
1432
|
-
) {
|
|
1433
|
-
if (!filter) {
|
|
1434
|
-
filter = templateContract.filters[
|
|
1435
|
-
"RemoveLiquidity(address,uint256[],uint256[],uint256)"
|
|
1436
|
-
](null, null, null, null);
|
|
1437
|
-
}
|
|
1438
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
onEventRemoveLiquidityOne(
|
|
1442
|
-
handler: (
|
|
1443
|
-
event: RemoveLiquidityOneEvent,
|
|
1444
|
-
ctx: TokenExchangeContext
|
|
1445
|
-
) => void,
|
|
1446
|
-
filter?: RemoveLiquidityOneEventFilter | RemoveLiquidityOneEventFilter[],
|
|
1447
|
-
fetchConfig?: EthFetchConfig
|
|
1448
|
-
) {
|
|
1449
|
-
if (!filter) {
|
|
1450
|
-
filter = templateContract.filters[
|
|
1451
|
-
"RemoveLiquidityOne(address,uint256,uint256)"
|
|
1452
|
-
](null, null, null);
|
|
1453
|
-
}
|
|
1454
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
onEventRemoveLiquidityImbalance(
|
|
1458
|
-
handler: (
|
|
1459
|
-
event: RemoveLiquidityImbalanceEvent,
|
|
1460
|
-
ctx: TokenExchangeContext
|
|
1461
|
-
) => void,
|
|
1462
|
-
filter?:
|
|
1463
|
-
| RemoveLiquidityImbalanceEventFilter
|
|
1464
|
-
| RemoveLiquidityImbalanceEventFilter[],
|
|
1465
|
-
fetchConfig?: EthFetchConfig
|
|
1466
|
-
) {
|
|
1467
|
-
if (!filter) {
|
|
1468
|
-
filter = templateContract.filters[
|
|
1469
|
-
"RemoveLiquidityImbalance(address,uint256[],uint256[],uint256,uint256)"
|
|
1470
|
-
](null, null, null, null, null);
|
|
1471
|
-
}
|
|
1472
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
onEventCommitNewAdmin(
|
|
1476
|
-
handler: (event: CommitNewAdminEvent, ctx: TokenExchangeContext) => void,
|
|
1477
|
-
filter?: CommitNewAdminEventFilter | CommitNewAdminEventFilter[],
|
|
1478
|
-
fetchConfig?: EthFetchConfig
|
|
1479
|
-
) {
|
|
1480
|
-
if (!filter) {
|
|
1481
|
-
filter = templateContract.filters["CommitNewAdmin(uint256,address)"](
|
|
1482
|
-
null,
|
|
1483
|
-
null
|
|
1484
|
-
);
|
|
1485
|
-
}
|
|
1486
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
onEventNewAdmin(
|
|
1490
|
-
handler: (event: NewAdminEvent, ctx: TokenExchangeContext) => void,
|
|
1491
|
-
filter?: NewAdminEventFilter | NewAdminEventFilter[],
|
|
1492
|
-
fetchConfig?: EthFetchConfig
|
|
1493
|
-
) {
|
|
1494
|
-
if (!filter) {
|
|
1495
|
-
filter = templateContract.filters["NewAdmin(address)"](null);
|
|
1496
|
-
}
|
|
1497
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
onEventCommitNewFee(
|
|
1501
|
-
handler: (event: CommitNewFeeEvent, ctx: TokenExchangeContext) => void,
|
|
1502
|
-
filter?: CommitNewFeeEventFilter | CommitNewFeeEventFilter[],
|
|
1503
|
-
fetchConfig?: EthFetchConfig
|
|
1504
|
-
) {
|
|
1505
|
-
if (!filter) {
|
|
1506
|
-
filter = templateContract.filters[
|
|
1507
|
-
"CommitNewFee(uint256,uint256,uint256)"
|
|
1508
|
-
](null, null, null);
|
|
1509
|
-
}
|
|
1510
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
onEventNewFee(
|
|
1514
|
-
handler: (event: NewFeeEvent, ctx: TokenExchangeContext) => void,
|
|
1515
|
-
filter?: NewFeeEventFilter | NewFeeEventFilter[],
|
|
1516
|
-
fetchConfig?: EthFetchConfig
|
|
1517
|
-
) {
|
|
1518
|
-
if (!filter) {
|
|
1519
|
-
filter = templateContract.filters["NewFee(uint256,uint256)"](null, null);
|
|
1520
|
-
}
|
|
1521
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
onEventRampA(
|
|
1525
|
-
handler: (event: RampAEvent, ctx: TokenExchangeContext) => void,
|
|
1526
|
-
filter?: RampAEventFilter | RampAEventFilter[],
|
|
1527
|
-
fetchConfig?: EthFetchConfig
|
|
1528
|
-
) {
|
|
1529
|
-
if (!filter) {
|
|
1530
|
-
filter = templateContract.filters[
|
|
1531
|
-
"RampA(uint256,uint256,uint256,uint256)"
|
|
1532
|
-
](null, null, null, null);
|
|
1533
|
-
}
|
|
1534
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
onEventStopRampA(
|
|
1538
|
-
handler: (event: StopRampAEvent, ctx: TokenExchangeContext) => void,
|
|
1539
|
-
filter?: StopRampAEventFilter | StopRampAEventFilter[],
|
|
1540
|
-
fetchConfig?: EthFetchConfig
|
|
1541
|
-
) {
|
|
1542
|
-
if (!filter) {
|
|
1543
|
-
filter = templateContract.filters["StopRampA(uint256,uint256)"](
|
|
1544
|
-
null,
|
|
1545
|
-
null
|
|
1546
|
-
);
|
|
1547
|
-
}
|
|
1548
|
-
return super.onEvent(handler, filter!, fetchConfig);
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
export function getTokenExchangeContract(
|
|
1553
|
-
address: string,
|
|
1554
|
-
network: Networkish = 1
|
|
1555
|
-
): TokenExchangeContractView {
|
|
1556
|
-
let contract = getContractByABI(
|
|
1557
|
-
"TokenExchange",
|
|
1558
|
-
address,
|
|
1559
|
-
network
|
|
1560
|
-
) as TokenExchangeContractView;
|
|
1561
|
-
if (!contract) {
|
|
1562
|
-
const rawContract = TokenExchange__factory.connect(
|
|
1563
|
-
address,
|
|
1564
|
-
getProvider(network)
|
|
1565
|
-
);
|
|
1566
|
-
contract = new TokenExchangeContractView(rawContract);
|
|
1567
|
-
addContractByABI("TokenExchange", address, network, contract);
|
|
1568
|
-
}
|
|
1569
|
-
return contract;
|
|
1570
|
-
}
|