@augustdigital/sdk 4.2.3-alpha → 4.2.3
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/README.md +20 -0
- package/lib/abis/PoolAdapter.d.ts +36 -76
- package/lib/abis/PoolAdapter.js +18 -379
- package/lib/abis/PoolAdapter.js.map +1 -1
- package/lib/abis/WrapperAdapter.d.ts +71 -60
- package/lib/abis/WrapperAdapter.js +41 -114
- package/lib/abis/WrapperAdapter.js.map +1 -1
- package/lib/abis/index.d.ts +3 -0
- package/lib/abis/index.js +3 -0
- package/lib/abis/index.js.map +1 -1
- package/lib/adapters/evm/getters.d.ts +1 -1
- package/lib/adapters/evm/getters.js +21 -22
- package/lib/adapters/evm/getters.js.map +1 -1
- package/lib/adapters/evm/index.d.ts +5 -3
- package/lib/adapters/evm/index.js +24 -17
- package/lib/adapters/evm/index.js.map +1 -1
- package/lib/adapters/solana/getters.js +10 -12
- package/lib/adapters/solana/getters.js.map +1 -1
- package/lib/adapters/solana/index.d.ts +27 -2
- package/lib/adapters/solana/utils.d.ts +15 -2
- package/lib/adapters/solana/utils.js +96 -21
- package/lib/adapters/solana/utils.js.map +1 -1
- package/lib/adapters/solana/vault.actions.js +11 -2
- package/lib/adapters/solana/vault.actions.js.map +1 -1
- package/lib/adapters/sui/constants.d.ts +13 -0
- package/lib/adapters/sui/constants.js +17 -0
- package/lib/adapters/sui/constants.js.map +1 -0
- package/lib/adapters/sui/getters.d.ts +3 -0
- package/lib/adapters/sui/getters.js +53 -0
- package/lib/adapters/sui/getters.js.map +1 -0
- package/lib/adapters/sui/index.d.ts +30 -0
- package/lib/adapters/sui/index.js +83 -0
- package/lib/adapters/sui/index.js.map +1 -1
- package/lib/adapters/sui/transformer.d.ts +4 -0
- package/lib/adapters/sui/transformer.js +87 -0
- package/lib/adapters/sui/transformer.js.map +1 -0
- package/lib/adapters/sui/types.d.ts +62 -0
- package/lib/adapters/sui/types.js +3 -0
- package/lib/adapters/sui/types.js.map +1 -0
- package/lib/adapters/sui/utils.d.ts +4 -0
- package/lib/adapters/sui/utils.js +27 -0
- package/lib/adapters/sui/utils.js.map +1 -0
- package/lib/core/auth/verify.js +2 -2
- package/lib/core/auth/verify.js.map +1 -1
- package/lib/core/constants.adapters.d.ts +89 -0
- package/lib/core/constants.adapters.js +160 -0
- package/lib/core/constants.adapters.js.map +1 -0
- package/lib/core/{constants.d.ts → constants.core.d.ts} +11 -28
- package/lib/core/constants.core.js +75 -0
- package/lib/core/constants.core.js.map +1 -0
- package/lib/core/constants.vaults.d.ts +19 -0
- package/lib/{modules/vaults/constants.js → core/constants.vaults.js} +42 -85
- package/lib/core/constants.vaults.js.map +1 -0
- package/lib/core/constants.web3.d.ts +30 -0
- package/lib/core/constants.web3.js +95 -0
- package/lib/core/constants.web3.js.map +1 -0
- package/lib/core/fetcher.d.ts +1 -1
- package/lib/core/fetcher.js +93 -25
- package/lib/core/fetcher.js.map +1 -1
- package/lib/core/helpers.adapters.d.ts +4 -0
- package/lib/core/helpers.adapters.js +28 -0
- package/lib/core/helpers.adapters.js.map +1 -0
- package/lib/core/{core.helpers.js → helpers.core.js} +4 -4
- package/lib/core/{core.helpers.js.map → helpers.core.js.map} +1 -1
- package/lib/core/helpers.signer.d.ts +5 -0
- package/lib/core/helpers.signer.js +54 -0
- package/lib/core/helpers.signer.js.map +1 -0
- package/lib/core/helpers.vaults.d.ts +15 -0
- package/lib/core/helpers.vaults.js +123 -0
- package/lib/core/helpers.vaults.js.map +1 -0
- package/lib/core/{web3.helpers.d.ts → helpers.web3.d.ts} +1 -0
- package/lib/core/{web3.helpers.js → helpers.web3.js} +44 -7
- package/lib/core/helpers.web3.js.map +1 -0
- package/lib/core/index.d.ts +9 -3
- package/lib/core/index.js +9 -3
- package/lib/core/index.js.map +1 -1
- package/lib/core/logger/slack.js +3 -3
- package/lib/index.d.ts +2 -1
- package/lib/index.js +10 -2
- package/lib/index.js.map +1 -1
- package/lib/main.d.ts +10 -0
- package/lib/main.js +12 -1
- package/lib/main.js.map +1 -1
- package/lib/modules/vaults/adapter.helpers.d.ts +46 -0
- package/lib/modules/vaults/adapter.helpers.js +149 -0
- package/lib/modules/vaults/adapter.helpers.js.map +1 -0
- package/lib/modules/vaults/fetcher.js +1 -1
- package/lib/modules/vaults/fetcher.js.map +1 -1
- package/lib/modules/vaults/getters.d.ts +17 -0
- package/lib/modules/vaults/getters.js +260 -68
- package/lib/modules/vaults/getters.js.map +1 -1
- package/lib/modules/vaults/index.d.ts +3 -1
- package/lib/modules/vaults/index.js +8 -1
- package/lib/modules/vaults/index.js.map +1 -1
- package/lib/modules/vaults/main.d.ts +10 -2
- package/lib/modules/vaults/main.js +81 -13
- package/lib/modules/vaults/main.js.map +1 -1
- package/lib/modules/vaults/utils.d.ts +2 -4
- package/lib/modules/vaults/utils.js +69 -52
- package/lib/modules/vaults/utils.js.map +1 -1
- package/lib/modules/vaults/write.actions.d.ts +3 -0
- package/lib/modules/vaults/write.actions.js +184 -26
- package/lib/modules/vaults/write.actions.js.map +1 -1
- package/lib/services/debank/utils.js +4 -4
- package/lib/services/subgraph/fetcher.js +1 -1
- package/lib/services/subgraph/fetcher.js.map +1 -1
- package/lib/services/subgraph/vaults.js +25 -27
- package/lib/services/subgraph/vaults.js.map +1 -1
- package/lib/types/vaults.d.ts +15 -1
- package/package.json +10 -1
- package/lib/core/constants.js +0 -148
- package/lib/core/constants.js.map +0 -1
- package/lib/core/read.actions.d.ts +0 -3
- package/lib/core/read.actions.js +0 -39
- package/lib/core/read.actions.js.map +0 -1
- package/lib/core/web3.helpers.js.map +0 -1
- package/lib/core/write.actions.d.ts +0 -9
- package/lib/core/write.actions.js +0 -51
- package/lib/core/write.actions.js.map +0 -1
- package/lib/modules/vaults/constants.d.ts +0 -63
- package/lib/modules/vaults/constants.js.map +0 -1
- package/lib/modules/vaults/vault.actions.d.ts +0 -10
- package/lib/modules/vaults/vault.actions.js +0 -95
- package/lib/modules/vaults/vault.actions.js.map +0 -1
- /package/lib/core/{core.helpers.d.ts → helpers.core.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
TypeScript SDK for interacting with August Digital vaults across EVM and Solana chains.
|
|
4
4
|
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @augustdigital/sdk ethers
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @augustdigital/sdk ethers
|
|
11
|
+
# or
|
|
12
|
+
yarn add @augustdigital/sdk ethers
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Wagmi/Viem Support
|
|
16
|
+
|
|
17
|
+
The SDK supports both ethers and wagmi/viem signers. If you're using wagmi in your React app, also install viem:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install viem
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The SDK will automatically detect and convert viem WalletClient to ethers-compatible signers.
|
|
24
|
+
|
|
5
25
|
## Quick Start
|
|
6
26
|
|
|
7
27
|
```typescript
|
|
@@ -1,76 +1,36 @@
|
|
|
1
|
-
export declare const ABI_POOL_ADAPTER:
|
|
2
|
-
inputs:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
name: string;
|
|
38
|
-
type: string;
|
|
39
|
-
stateMutability?: undefined;
|
|
40
|
-
outputs?: undefined;
|
|
41
|
-
} | {
|
|
42
|
-
inputs: {
|
|
43
|
-
internalType: string;
|
|
44
|
-
name: string;
|
|
45
|
-
type: string;
|
|
46
|
-
}[];
|
|
47
|
-
name: string;
|
|
48
|
-
outputs: {
|
|
49
|
-
internalType: string;
|
|
50
|
-
name: string;
|
|
51
|
-
type: string;
|
|
52
|
-
}[];
|
|
53
|
-
stateMutability: string;
|
|
54
|
-
type: string;
|
|
55
|
-
anonymous?: undefined;
|
|
56
|
-
} | {
|
|
57
|
-
inputs: {
|
|
58
|
-
components: {
|
|
59
|
-
internalType: string;
|
|
60
|
-
name: string;
|
|
61
|
-
type: string;
|
|
62
|
-
}[];
|
|
63
|
-
internalType: string;
|
|
64
|
-
name: string;
|
|
65
|
-
type: string;
|
|
66
|
-
}[];
|
|
67
|
-
name: string;
|
|
68
|
-
outputs: {
|
|
69
|
-
internalType: string;
|
|
70
|
-
name: string;
|
|
71
|
-
type: string;
|
|
72
|
-
}[];
|
|
73
|
-
stateMutability: string;
|
|
74
|
-
type: string;
|
|
75
|
-
anonymous?: undefined;
|
|
76
|
-
})[];
|
|
1
|
+
export declare const ABI_POOL_ADAPTER: readonly [{
|
|
2
|
+
readonly inputs: readonly [{
|
|
3
|
+
readonly components: readonly [{
|
|
4
|
+
readonly internalType: "uint256";
|
|
5
|
+
readonly name: "amountIn";
|
|
6
|
+
readonly type: "uint256";
|
|
7
|
+
}, {
|
|
8
|
+
readonly internalType: "uint256";
|
|
9
|
+
readonly name: "minAmountOut";
|
|
10
|
+
readonly type: "uint256";
|
|
11
|
+
}, {
|
|
12
|
+
readonly internalType: "address";
|
|
13
|
+
readonly name: "srcToken";
|
|
14
|
+
readonly type: "address";
|
|
15
|
+
}, {
|
|
16
|
+
readonly internalType: "address";
|
|
17
|
+
readonly name: "dstToken";
|
|
18
|
+
readonly type: "address";
|
|
19
|
+
}, {
|
|
20
|
+
readonly internalType: "uint256";
|
|
21
|
+
readonly name: "bridgeId";
|
|
22
|
+
readonly type: "uint256";
|
|
23
|
+
}, {
|
|
24
|
+
readonly internalType: "bytes";
|
|
25
|
+
readonly name: "quoteData";
|
|
26
|
+
readonly type: "bytes";
|
|
27
|
+
}];
|
|
28
|
+
readonly internalType: "struct PoolAdapter.SwapAndDepositParams";
|
|
29
|
+
readonly name: "params";
|
|
30
|
+
readonly type: "tuple";
|
|
31
|
+
}];
|
|
32
|
+
readonly name: "swapAndDeposit";
|
|
33
|
+
readonly outputs: readonly [];
|
|
34
|
+
readonly stateMutability: "nonpayable";
|
|
35
|
+
readonly type: "function";
|
|
36
|
+
}];
|
package/lib/abis/PoolAdapter.js
CHANGED
|
@@ -2,408 +2,47 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ABI_POOL_ADAPTER = void 0;
|
|
4
4
|
exports.ABI_POOL_ADAPTER = [
|
|
5
|
-
{
|
|
6
|
-
inputs: [
|
|
7
|
-
{ internalType: 'uint256', name: 'newSwapFee', type: 'uint256' },
|
|
8
|
-
{ internalType: 'address', name: 'ownerAddr', type: 'address' },
|
|
9
|
-
{
|
|
10
|
-
internalType: 'address',
|
|
11
|
-
name: 'newFeesCollectorAddr',
|
|
12
|
-
type: 'address',
|
|
13
|
-
},
|
|
14
|
-
{ internalType: 'address', name: 'routerAddr', type: 'address' },
|
|
15
|
-
{
|
|
16
|
-
components: [
|
|
17
|
-
{ internalType: 'uint8', name: 'id', type: 'uint8' },
|
|
18
|
-
{ internalType: 'bool', name: 'enabled', type: 'bool' },
|
|
19
|
-
{ internalType: 'address', name: 'routerAddress', type: 'address' },
|
|
20
|
-
{
|
|
21
|
-
internalType: 'address',
|
|
22
|
-
name: 'tokenTransferProxy',
|
|
23
|
-
type: 'address',
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
internalType: 'struct BasePoolSwapper.SwapProvider[]',
|
|
27
|
-
name: 'newSwapProviders',
|
|
28
|
-
type: 'tuple[]',
|
|
29
|
-
},
|
|
30
|
-
{ internalType: 'contract IERC4626', name: 'newPool', type: 'address' },
|
|
31
|
-
],
|
|
32
|
-
stateMutability: 'nonpayable',
|
|
33
|
-
type: 'constructor',
|
|
34
|
-
},
|
|
35
|
-
{ inputs: [], name: 'InputTokenNotAllowed', type: 'error' },
|
|
36
|
-
{ inputs: [], name: 'OwnerOnly', type: 'error' },
|
|
37
|
-
{ inputs: [], name: 'ReentrantCall', type: 'error' },
|
|
38
|
-
{ inputs: [], name: 'RouterNotSet', type: 'error' },
|
|
39
|
-
{ inputs: [], name: 'TokenNotWhitelisted', type: 'error' },
|
|
40
|
-
{
|
|
41
|
-
anonymous: false,
|
|
42
|
-
inputs: [
|
|
43
|
-
{
|
|
44
|
-
indexed: false,
|
|
45
|
-
internalType: 'address',
|
|
46
|
-
name: 'addr',
|
|
47
|
-
type: 'address',
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
name: 'OnTokenDisabled',
|
|
51
|
-
type: 'event',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
anonymous: false,
|
|
55
|
-
inputs: [
|
|
56
|
-
{
|
|
57
|
-
indexed: false,
|
|
58
|
-
internalType: 'address',
|
|
59
|
-
name: 'addr',
|
|
60
|
-
type: 'address',
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
name: 'OnTokenEnabled',
|
|
64
|
-
type: 'event',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
anonymous: false,
|
|
68
|
-
inputs: [
|
|
69
|
-
{
|
|
70
|
-
indexed: true,
|
|
71
|
-
internalType: 'address',
|
|
72
|
-
name: 'previousOwner',
|
|
73
|
-
type: 'address',
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
indexed: true,
|
|
77
|
-
internalType: 'address',
|
|
78
|
-
name: 'newOwner',
|
|
79
|
-
type: 'address',
|
|
80
|
-
},
|
|
81
|
-
],
|
|
82
|
-
name: 'OwnershipTransferred',
|
|
83
|
-
type: 'event',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
anonymous: false,
|
|
87
|
-
inputs: [
|
|
88
|
-
{
|
|
89
|
-
indexed: false,
|
|
90
|
-
internalType: 'uint256',
|
|
91
|
-
name: 'swapAmount',
|
|
92
|
-
type: 'uint256',
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
indexed: false,
|
|
96
|
-
internalType: 'uint256',
|
|
97
|
-
name: 'applicableFee',
|
|
98
|
-
type: 'uint256',
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
indexed: false,
|
|
102
|
-
internalType: 'address',
|
|
103
|
-
name: 'tokenAddr',
|
|
104
|
-
type: 'address',
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
name: 'SwapFeeApplied',
|
|
108
|
-
type: 'event',
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
anonymous: false,
|
|
112
|
-
inputs: [
|
|
113
|
-
{
|
|
114
|
-
indexed: false,
|
|
115
|
-
internalType: 'address',
|
|
116
|
-
name: 'srcToken',
|
|
117
|
-
type: 'address',
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
indexed: false,
|
|
121
|
-
internalType: 'address',
|
|
122
|
-
name: 'dstToken',
|
|
123
|
-
type: 'address',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
indexed: false,
|
|
127
|
-
internalType: 'uint256',
|
|
128
|
-
name: 'srcAmount',
|
|
129
|
-
type: 'uint256',
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
indexed: false,
|
|
133
|
-
internalType: 'uint256',
|
|
134
|
-
name: 'dstAmount',
|
|
135
|
-
type: 'uint256',
|
|
136
|
-
},
|
|
137
|
-
],
|
|
138
|
-
name: 'SwapProcessed',
|
|
139
|
-
type: 'event',
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
inputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
143
|
-
name: '_whitelistedTokens',
|
|
144
|
-
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
|
145
|
-
stateMutability: 'view',
|
|
146
|
-
type: 'function',
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
inputs: [{ internalType: 'address', name: 'addr', type: 'address' }],
|
|
150
|
-
name: 'addToBlacklist',
|
|
151
|
-
outputs: [],
|
|
152
|
-
stateMutability: 'nonpayable',
|
|
153
|
-
type: 'function',
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
inputs: [{ internalType: 'address', name: 'addr', type: 'address' }],
|
|
157
|
-
name: 'disableToken',
|
|
158
|
-
outputs: [],
|
|
159
|
-
stateMutability: 'nonpayable',
|
|
160
|
-
type: 'function',
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
inputs: [{ internalType: 'address[]', name: 'arr', type: 'address[]' }],
|
|
164
|
-
name: 'disableTokens',
|
|
165
|
-
outputs: [],
|
|
166
|
-
stateMutability: 'nonpayable',
|
|
167
|
-
type: 'function',
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
inputs: [{ internalType: 'address', name: 'addr', type: 'address' }],
|
|
171
|
-
name: 'enableToken',
|
|
172
|
-
outputs: [],
|
|
173
|
-
stateMutability: 'nonpayable',
|
|
174
|
-
type: 'function',
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
inputs: [{ internalType: 'address[]', name: 'arr', type: 'address[]' }],
|
|
178
|
-
name: 'enableTokens',
|
|
179
|
-
outputs: [],
|
|
180
|
-
stateMutability: 'nonpayable',
|
|
181
|
-
type: 'function',
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
inputs: [],
|
|
185
|
-
name: 'feesCollector',
|
|
186
|
-
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
187
|
-
stateMutability: 'view',
|
|
188
|
-
type: 'function',
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
inputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
192
|
-
name: 'isBlacklisted',
|
|
193
|
-
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
|
194
|
-
stateMutability: 'view',
|
|
195
|
-
type: 'function',
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
inputs: [],
|
|
199
|
-
name: 'isPaused',
|
|
200
|
-
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
|
201
|
-
stateMutability: 'view',
|
|
202
|
-
type: 'function',
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
inputs: [{ internalType: 'address', name: 'addr', type: 'address' }],
|
|
206
|
-
name: 'isWhitelistedToken',
|
|
207
|
-
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
|
208
|
-
stateMutability: 'view',
|
|
209
|
-
type: 'function',
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
inputs: [],
|
|
213
|
-
name: 'owner',
|
|
214
|
-
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
215
|
-
stateMutability: 'view',
|
|
216
|
-
type: 'function',
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
inputs: [],
|
|
220
|
-
name: 'pause',
|
|
221
|
-
outputs: [],
|
|
222
|
-
stateMutability: 'nonpayable',
|
|
223
|
-
type: 'function',
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
inputs: [],
|
|
227
|
-
name: 'pool',
|
|
228
|
-
outputs: [{ internalType: 'contract IERC4626', name: '', type: 'address' }],
|
|
229
|
-
stateMutability: 'view',
|
|
230
|
-
type: 'function',
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
inputs: [],
|
|
234
|
-
name: 'poolAsset',
|
|
235
|
-
outputs: [{ internalType: 'contract IERC20', name: '', type: 'address' }],
|
|
236
|
-
stateMutability: 'view',
|
|
237
|
-
type: 'function',
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
inputs: [{ internalType: 'address', name: 'addr', type: 'address' }],
|
|
241
|
-
name: 'removeFromBlacklist',
|
|
242
|
-
outputs: [],
|
|
243
|
-
stateMutability: 'nonpayable',
|
|
244
|
-
type: 'function',
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
inputs: [],
|
|
248
|
-
name: 'resume',
|
|
249
|
-
outputs: [],
|
|
250
|
-
stateMutability: 'nonpayable',
|
|
251
|
-
type: 'function',
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
inputs: [],
|
|
255
|
-
name: 'routerAddress',
|
|
256
|
-
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
257
|
-
stateMutability: 'view',
|
|
258
|
-
type: 'function',
|
|
259
|
-
},
|
|
260
5
|
{
|
|
261
6
|
inputs: [
|
|
262
7
|
{
|
|
263
8
|
components: [
|
|
264
|
-
{ internalType: 'uint256', name: 'amountIn', type: 'uint256' },
|
|
265
|
-
{ internalType: 'uint256', name: 'minAmountOut', type: 'uint256' },
|
|
266
9
|
{
|
|
267
|
-
internalType: '
|
|
268
|
-
name: '
|
|
269
|
-
type: '
|
|
10
|
+
internalType: 'uint256',
|
|
11
|
+
name: 'amountIn',
|
|
12
|
+
type: 'uint256',
|
|
270
13
|
},
|
|
271
14
|
{
|
|
272
|
-
internalType: '
|
|
273
|
-
name: '
|
|
274
|
-
type: '
|
|
15
|
+
internalType: 'uint256',
|
|
16
|
+
name: 'minAmountOut',
|
|
17
|
+
type: 'uint256',
|
|
275
18
|
},
|
|
276
|
-
{ internalType: 'uint8', name: 'bridgeId', type: 'uint8' },
|
|
277
|
-
{ internalType: 'bytes', name: 'quoteData', type: 'bytes' },
|
|
278
|
-
],
|
|
279
|
-
internalType: 'struct BasePoolSwapper.SwapInfo[]',
|
|
280
|
-
name: 'items',
|
|
281
|
-
type: 'tuple[]',
|
|
282
|
-
},
|
|
283
|
-
],
|
|
284
|
-
name: 'swapAndDeposit',
|
|
285
|
-
outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],
|
|
286
|
-
stateMutability: 'nonpayable',
|
|
287
|
-
type: 'function',
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
inputs: [
|
|
291
|
-
{
|
|
292
|
-
components: [
|
|
293
|
-
{ internalType: 'uint256', name: 'amountIn', type: 'uint256' },
|
|
294
|
-
{ internalType: 'uint256', name: 'minAmountOut', type: 'uint256' },
|
|
295
19
|
{
|
|
296
|
-
internalType: '
|
|
20
|
+
internalType: 'address',
|
|
297
21
|
name: 'srcToken',
|
|
298
22
|
type: 'address',
|
|
299
23
|
},
|
|
300
24
|
{
|
|
301
|
-
internalType: '
|
|
25
|
+
internalType: 'address',
|
|
302
26
|
name: 'dstToken',
|
|
303
27
|
type: 'address',
|
|
304
28
|
},
|
|
305
|
-
{ internalType: 'uint8', name: 'bridgeId', type: 'uint8' },
|
|
306
|
-
{ internalType: 'bytes', name: 'quoteData', type: 'bytes' },
|
|
307
|
-
],
|
|
308
|
-
internalType: 'struct BasePoolSwapper.SwapInfo',
|
|
309
|
-
name: 'item',
|
|
310
|
-
type: 'tuple',
|
|
311
|
-
},
|
|
312
|
-
],
|
|
313
|
-
name: 'swapAndDeposit',
|
|
314
|
-
outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],
|
|
315
|
-
stateMutability: 'nonpayable',
|
|
316
|
-
type: 'function',
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
inputs: [
|
|
320
|
-
{
|
|
321
|
-
components: [
|
|
322
|
-
{ internalType: 'uint256', name: 'amountIn', type: 'uint256' },
|
|
323
|
-
{ internalType: 'uint256', name: 'minAmountOut', type: 'uint256' },
|
|
324
|
-
{ internalType: 'address', name: 'tokenIn', type: 'address' },
|
|
325
|
-
{ internalType: 'uint24', name: 'fee', type: 'uint24' },
|
|
326
29
|
{
|
|
327
|
-
internalType: '
|
|
328
|
-
name: '
|
|
329
|
-
type: '
|
|
30
|
+
internalType: 'uint256',
|
|
31
|
+
name: 'bridgeId',
|
|
32
|
+
type: 'uint256',
|
|
330
33
|
},
|
|
331
|
-
],
|
|
332
|
-
internalType: 'struct BasePoolSwapper.SingleHopItem[]',
|
|
333
|
-
name: 'items',
|
|
334
|
-
type: 'tuple[]',
|
|
335
|
-
},
|
|
336
|
-
],
|
|
337
|
-
name: 'swapAndDeposit',
|
|
338
|
-
outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],
|
|
339
|
-
stateMutability: 'nonpayable',
|
|
340
|
-
type: 'function',
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
inputs: [],
|
|
344
|
-
name: 'swapFee',
|
|
345
|
-
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
|
346
|
-
stateMutability: 'view',
|
|
347
|
-
type: 'function',
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
inputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
|
|
351
|
-
name: 'swapProviders',
|
|
352
|
-
outputs: [
|
|
353
|
-
{ internalType: 'uint8', name: 'id', type: 'uint8' },
|
|
354
|
-
{ internalType: 'bool', name: 'enabled', type: 'bool' },
|
|
355
|
-
{ internalType: 'address', name: 'routerAddress', type: 'address' },
|
|
356
|
-
{ internalType: 'address', name: 'tokenTransferProxy', type: 'address' },
|
|
357
|
-
],
|
|
358
|
-
stateMutability: 'view',
|
|
359
|
-
type: 'function',
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
|
|
363
|
-
name: 'transferOwnership',
|
|
364
|
-
outputs: [],
|
|
365
|
-
stateMutability: 'nonpayable',
|
|
366
|
-
type: 'function',
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
inputs: [
|
|
370
|
-
{
|
|
371
|
-
internalType: 'address',
|
|
372
|
-
name: 'newFeesCollectorAddr',
|
|
373
|
-
type: 'address',
|
|
374
|
-
},
|
|
375
|
-
],
|
|
376
|
-
name: 'updateFeesCollector',
|
|
377
|
-
outputs: [],
|
|
378
|
-
stateMutability: 'nonpayable',
|
|
379
|
-
type: 'function',
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
inputs: [{ internalType: 'uint256', name: 'newSwapFee', type: 'uint256' }],
|
|
383
|
-
name: 'updateSwapFee',
|
|
384
|
-
outputs: [],
|
|
385
|
-
stateMutability: 'nonpayable',
|
|
386
|
-
type: 'function',
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
inputs: [
|
|
390
|
-
{
|
|
391
|
-
components: [
|
|
392
|
-
{ internalType: 'uint8', name: 'id', type: 'uint8' },
|
|
393
|
-
{ internalType: 'bool', name: 'enabled', type: 'bool' },
|
|
394
|
-
{ internalType: 'address', name: 'routerAddress', type: 'address' },
|
|
395
34
|
{
|
|
396
|
-
internalType: '
|
|
397
|
-
name: '
|
|
398
|
-
type: '
|
|
35
|
+
internalType: 'bytes',
|
|
36
|
+
name: 'quoteData',
|
|
37
|
+
type: 'bytes',
|
|
399
38
|
},
|
|
400
39
|
],
|
|
401
|
-
internalType: 'struct
|
|
402
|
-
name: '
|
|
403
|
-
type: 'tuple
|
|
40
|
+
internalType: 'struct PoolAdapter.SwapAndDepositParams',
|
|
41
|
+
name: 'params',
|
|
42
|
+
type: 'tuple',
|
|
404
43
|
},
|
|
405
44
|
],
|
|
406
|
-
name: '
|
|
45
|
+
name: 'swapAndDeposit',
|
|
407
46
|
outputs: [],
|
|
408
47
|
stateMutability: 'nonpayable',
|
|
409
48
|
type: 'function',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PoolAdapter.js","sourceRoot":"","sources":["../../src.ts/abis/PoolAdapter.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B;QACE,MAAM,EAAE;YACN
|
|
1
|
+
{"version":3,"file":"PoolAdapter.js","sourceRoot":"","sources":["../../src.ts/abis/PoolAdapter.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B;QACE,MAAM,EAAE;YACN;gBACE,UAAU,EAAE;oBACV;wBACE,YAAY,EAAE,SAAS;wBACvB,IAAI,EAAE,UAAU;wBAChB,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,YAAY,EAAE,SAAS;wBACvB,IAAI,EAAE,cAAc;wBACpB,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,YAAY,EAAE,SAAS;wBACvB,IAAI,EAAE,UAAU;wBAChB,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,YAAY,EAAE,SAAS;wBACvB,IAAI,EAAE,UAAU;wBAChB,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,YAAY,EAAE,SAAS;wBACvB,IAAI,EAAE,UAAU;wBAChB,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,YAAY,EAAE,OAAO;wBACrB,IAAI,EAAE,WAAW;wBACjB,IAAI,EAAE,OAAO;qBACd;iBACF;gBACD,YAAY,EAAE,yCAAyC;gBACvD,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,OAAO;aACd;SACF;QACD,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,YAAY;QAC7B,IAAI,EAAE,UAAU;KACjB;CACO,CAAC"}
|