@curvefi/api 2.68.34 → 2.68.35
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/bridge.js +4 -7
- package/lib/constants/abis/fastBridge.json +0 -46
- package/package.json +1 -1
package/lib/bridge.js
CHANGED
|
@@ -26,11 +26,8 @@ function _allowedToBridge() {
|
|
|
26
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
27
|
assertIsSupported.call(this);
|
|
28
28
|
const contract = this.contracts[this.constants.ALIASES.fast_bridge].contract;
|
|
29
|
-
const
|
|
30
|
-
return {
|
|
31
|
-
_min: result[0],
|
|
32
|
-
_max: result[1],
|
|
33
|
-
};
|
|
29
|
+
const [_min, _max] = yield contract.allowed_to_bridge();
|
|
30
|
+
return { _min, _max };
|
|
34
31
|
});
|
|
35
32
|
}
|
|
36
33
|
export function allowedToBridge() {
|
|
@@ -66,13 +63,13 @@ export function bridgeIsApproved(amount) {
|
|
|
66
63
|
export function bridgeApproveEstimateGas(amount) {
|
|
67
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
65
|
assertIsSupported.call(this);
|
|
69
|
-
return yield ensureAllowanceEstimateGas.call(this, [this.constants.ALIASES.crvusd], [amount], this.constants.ALIASES.fast_bridge);
|
|
66
|
+
return yield ensureAllowanceEstimateGas.call(this, [this.constants.ALIASES.crvusd], [amount], this.constants.ALIASES.fast_bridge, false);
|
|
70
67
|
});
|
|
71
68
|
}
|
|
72
69
|
export function bridgeApprove(amount) {
|
|
73
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
71
|
assertIsSupported.call(this);
|
|
75
|
-
return yield ensureAllowance.call(this, [this.constants.ALIASES.crvusd], [amount], this.constants.ALIASES.fast_bridge);
|
|
72
|
+
return yield ensureAllowance.call(this, [this.constants.ALIASES.crvusd], [amount], this.constants.ALIASES.fast_bridge, false);
|
|
76
73
|
});
|
|
77
74
|
}
|
|
78
75
|
function _bridge(amount_1, address_1) {
|
|
@@ -134,31 +134,6 @@
|
|
|
134
134
|
"stateMutability": "view",
|
|
135
135
|
"type": "function"
|
|
136
136
|
},
|
|
137
|
-
{
|
|
138
|
-
"inputs": [
|
|
139
|
-
{
|
|
140
|
-
"name": "_token",
|
|
141
|
-
"type": "address"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"name": "_to",
|
|
145
|
-
"type": "address"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"name": "_amount",
|
|
149
|
-
"type": "uint256"
|
|
150
|
-
}
|
|
151
|
-
],
|
|
152
|
-
"name": "bridge",
|
|
153
|
-
"outputs": [
|
|
154
|
-
{
|
|
155
|
-
"name": "",
|
|
156
|
-
"type": "uint256"
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
|
-
"stateMutability": "payable",
|
|
160
|
-
"type": "function"
|
|
161
|
-
},
|
|
162
137
|
{
|
|
163
138
|
"inputs": [
|
|
164
139
|
{
|
|
@@ -204,27 +179,6 @@
|
|
|
204
179
|
"stateMutability": "view",
|
|
205
180
|
"type": "function"
|
|
206
181
|
},
|
|
207
|
-
{
|
|
208
|
-
"inputs": [
|
|
209
|
-
{
|
|
210
|
-
"name": "_ts",
|
|
211
|
-
"type": "uint256"
|
|
212
|
-
}
|
|
213
|
-
],
|
|
214
|
-
"name": "allowed_to_bridge",
|
|
215
|
-
"outputs": [
|
|
216
|
-
{
|
|
217
|
-
"name": "",
|
|
218
|
-
"type": "uint256"
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"name": "",
|
|
222
|
-
"type": "uint256"
|
|
223
|
-
}
|
|
224
|
-
],
|
|
225
|
-
"stateMutability": "view",
|
|
226
|
-
"type": "function"
|
|
227
|
-
},
|
|
228
182
|
{
|
|
229
183
|
"inputs": [
|
|
230
184
|
{
|