@defisaver/sdk 1.0.21 → 1.0.23

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/esm/src/Action.js CHANGED
@@ -108,7 +108,8 @@ export class Action {
108
108
  return [AbiCoder.encodeParameter(_paramType, _arg)];
109
109
  }
110
110
  encodeForL2DsProxyCall() {
111
- return this._encodeForCall()[0];
111
+ const executeActionDirectAbi = (ActionAbi.find(({ name }) => name === 'executeActionDirect'));
112
+ return AbiCoder.encodeFunctionCall(executeActionDirectAbi, this._encodeForCall());
112
113
  }
113
114
  encodeForL2Recipe() {
114
115
  return this._encodeForCall()[0];
@@ -63,10 +63,10 @@ export const actionAddresses = {
63
63
  MorphoAaveV2Withdraw: '0x29a8b5a8889f465c85b778edccf984e44ad70f12',
64
64
  MorphoClaim: '0xa269C841E26EA8Ee1F0350a2E5905F71446998dC',
65
65
  // morpho aave v3
66
- MorphoAaveV3Borrow: '0x4a177af7640e087dc819c52b28eaa9f672bcd362',
67
- MorphoAaveV3Payback: '0x31d38b7ece8c68b0cbdc9f6db93a0251841c1ad6',
68
- MorphoAaveV3Supply: '0x5befc2b35721aafaccd3c63916e8dc99b8aeab53',
69
- MorphoAaveV3Withdraw: '0xb5305db14b7290266aa3790ffe828900c4cfb6a7',
66
+ MorphoAaveV3Borrow: '0x487719C57b88477F19423aB0652b3E26b96baA7F',
67
+ MorphoAaveV3Payback: '0x36b8b968c81D97cBfAa642e206b634A6f378d287',
68
+ MorphoAaveV3Supply: '0x51fA8FBc6F0aDEfe2FBA06104FCA39f5beD69291',
69
+ MorphoAaveV3Withdraw: '0xdc3e74C4cD577275296ceFE36A3D082223AfF206',
70
70
  // compound
71
71
  CompBorrow: '0x8495579BF6Ae848f7E59686536F834f1d2CCd79C',
72
72
  CompClaim: '0x81F488cF7A0128A9DB5e7207042cCAB1CB0ac902',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
package/src/Action.ts CHANGED
@@ -146,7 +146,8 @@ export class Action {
146
146
  }
147
147
 
148
148
  encodeForL2DsProxyCall() {
149
- return this._encodeForCall()[0];
149
+ const executeActionDirectAbi : any = (ActionAbi.find(({ name }:{ name: string }) => name === 'executeActionDirect'))!;
150
+ return AbiCoder.encodeFunctionCall(executeActionDirectAbi, this._encodeForCall());
150
151
  }
151
152
 
152
153
  encodeForL2Recipe() {
package/src/addresses.ts CHANGED
@@ -72,10 +72,10 @@ export const actionAddresses = {
72
72
  MorphoClaim: '0xa269C841E26EA8Ee1F0350a2E5905F71446998dC',
73
73
 
74
74
  // morpho aave v3
75
- MorphoAaveV3Borrow: '0x4a177af7640e087dc819c52b28eaa9f672bcd362',
76
- MorphoAaveV3Payback: '0x31d38b7ece8c68b0cbdc9f6db93a0251841c1ad6',
77
- MorphoAaveV3Supply: '0x5befc2b35721aafaccd3c63916e8dc99b8aeab53',
78
- MorphoAaveV3Withdraw: '0xb5305db14b7290266aa3790ffe828900c4cfb6a7',
75
+ MorphoAaveV3Borrow: '0x487719C57b88477F19423aB0652b3E26b96baA7F',
76
+ MorphoAaveV3Payback: '0x36b8b968c81D97cBfAa642e206b634A6f378d287',
77
+ MorphoAaveV3Supply: '0x51fA8FBc6F0aDEfe2FBA06104FCA39f5beD69291',
78
+ MorphoAaveV3Withdraw: '0xdc3e74C4cD577275296ceFE36A3D082223AfF206',
79
79
 
80
80
  // compound
81
81
  CompBorrow: '0x8495579BF6Ae848f7E59686536F834f1d2CCd79C',
package/umd/index.js CHANGED
@@ -143,7 +143,13 @@ class Action {
143
143
  return [web3_eth_abi__WEBPACK_IMPORTED_MODULE_0___default().encodeParameter(_paramType, _arg)];
144
144
  }
145
145
  encodeForL2DsProxyCall() {
146
- return this._encodeForCall()[0];
146
+ var executeActionDirectAbi = _abis_Action_json__WEBPACK_IMPORTED_MODULE_3__.find(_ref => {
147
+ var {
148
+ name
149
+ } = _ref;
150
+ return name === 'executeActionDirect';
151
+ });
152
+ return web3_eth_abi__WEBPACK_IMPORTED_MODULE_0___default().encodeFunctionCall(executeActionDirectAbi, this._encodeForCall());
147
153
  }
148
154
  encodeForL2Recipe() {
149
155
  return this._encodeForCall()[0];
@@ -155,10 +161,10 @@ class Action {
155
161
  */
156
162
  encodeForDsProxyCall() {
157
163
  if (_config__WEBPACK_IMPORTED_MODULE_2__.CONFIG.chainId === 1) {
158
- var executeActionDirectAbi = _abis_Action_json__WEBPACK_IMPORTED_MODULE_3__.find(_ref => {
164
+ var executeActionDirectAbi = _abis_Action_json__WEBPACK_IMPORTED_MODULE_3__.find(_ref2 => {
159
165
  var {
160
166
  name
161
- } = _ref;
167
+ } = _ref2;
162
168
  return name === 'executeActionDirect';
163
169
  });
164
170
  return [this.contractAddress, web3_eth_abi__WEBPACK_IMPORTED_MODULE_0___default().encodeFunctionCall(executeActionDirectAbi, this._encodeForCall())];
@@ -210,8 +216,8 @@ class Action {
210
216
  */
211
217
  getAccessList(chainId) {
212
218
  if (chainId !== 1) return [];
213
- return [[this.contractAddress, []], ...(_AccessLists__WEBPACK_IMPORTED_MODULE_4__.AccessLists[this.name] || [])].map(_ref2 => {
214
- var [address, storageKeys] = _ref2;
219
+ return [[this.contractAddress, []], ...(_AccessLists__WEBPACK_IMPORTED_MODULE_4__.AccessLists[this.name] || [])].map(_ref3 => {
220
+ var [address, storageKeys] = _ref3;
215
221
  return {
216
222
  address,
217
223
  storageKeys: storageKeys.map(num => (0,web3_utils__WEBPACK_IMPORTED_MODULE_1__.padLeft)((0,web3_utils__WEBPACK_IMPORTED_MODULE_1__.toHex)(num), 64))
@@ -1301,10 +1307,10 @@ var actionAddresses = {
1301
1307
  MorphoAaveV2Withdraw: '0x29a8b5a8889f465c85b778edccf984e44ad70f12',
1302
1308
  MorphoClaim: '0xa269C841E26EA8Ee1F0350a2E5905F71446998dC',
1303
1309
  // morpho aave v3
1304
- MorphoAaveV3Borrow: '0x4a177af7640e087dc819c52b28eaa9f672bcd362',
1305
- MorphoAaveV3Payback: '0x31d38b7ece8c68b0cbdc9f6db93a0251841c1ad6',
1306
- MorphoAaveV3Supply: '0x5befc2b35721aafaccd3c63916e8dc99b8aeab53',
1307
- MorphoAaveV3Withdraw: '0xb5305db14b7290266aa3790ffe828900c4cfb6a7',
1310
+ MorphoAaveV3Borrow: '0x487719C57b88477F19423aB0652b3E26b96baA7F',
1311
+ MorphoAaveV3Payback: '0x36b8b968c81D97cBfAa642e206b634A6f378d287',
1312
+ MorphoAaveV3Supply: '0x51fA8FBc6F0aDEfe2FBA06104FCA39f5beD69291',
1313
+ MorphoAaveV3Withdraw: '0xdc3e74C4cD577275296ceFE36A3D082223AfF206',
1308
1314
  // compound
1309
1315
  CompBorrow: '0x8495579BF6Ae848f7E59686536F834f1d2CCd79C',
1310
1316
  CompClaim: '0x81F488cF7A0128A9DB5e7207042cCAB1CB0ac902',