@defisaver/sdk 1.0.59 → 1.0.61

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.
@@ -10,7 +10,8 @@ export class CreateSubAction extends Action {
10
10
  * @param sub object that contains new sub information
11
11
  */
12
12
  constructor(sub) {
13
- super('CreateSub', getAddr('CreateSub'), ['(uint64,bool,bytes[],bytes32[])'], [sub]);
13
+ super('CreateSub', getAddr('CreateSub'), [['uint64', 'bool', 'bytes[]', 'bytes32[]']], [sub]);
14
+ this.mappableArgs = [];
14
15
  for (let i = 0; i < this.args[0][3].length; i++) {
15
16
  this.mappableArgs.push(this.args[0][3][i]);
16
17
  }
@@ -11,7 +11,7 @@ export class UpdateSubAction extends Action {
11
11
  * @param sub object that contains new sub information
12
12
  */
13
13
  constructor(subId, sub) {
14
- super('UpdateSub', getAddr('UpdateSub'), ['uint256', '(uint64,bool,bytes[],bytes32[])'], [subId, sub]);
14
+ super('UpdateSub', getAddr('UpdateSub'), ['uint256', ['uint64', 'bool', 'bytes[]', 'bytes32[]']], [subId, sub]);
15
15
  this.mappableArgs = [
16
16
  this.args[0],
17
17
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.0.59",
3
+ "version": "1.0.61",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
@@ -20,7 +20,7 @@
20
20
  "license": "ISC",
21
21
  "dependencies": {
22
22
  "@defisaver/eslint-config": "^1.0.0",
23
- "@defisaver/tokens": "^1.5.2",
23
+ "@defisaver/tokens": "^1.5.5",
24
24
  "@ethersproject/address": "^5.0.10",
25
25
  "@ethersproject/solidity": "^5.0.9",
26
26
  "@types/web3-eth-abi": "^1.2.2",
@@ -14,10 +14,10 @@ export class CreateSubAction extends Action {
14
14
  * @param sub object that contains new sub information
15
15
  */
16
16
  constructor(sub:[uint64, boolean, bytes[], bytes32[]]) {
17
- super('CreateSub', getAddr('CreateSub'), ['(uint64,bool,bytes[],bytes32[])'], [sub]);
18
-
17
+ super('CreateSub', getAddr('CreateSub'), [['uint64', 'bool', 'bytes[]', 'bytes32[]']], [sub]);
18
+ this.mappableArgs = [];
19
19
  for (let i = 0; i < this.args[0][3].length; i++) {
20
20
  this.mappableArgs.push(this.args[0][3][i]);
21
21
  }
22
22
  }
23
- }
23
+ }
@@ -15,7 +15,7 @@ export class UpdateSubAction extends Action {
15
15
  * @param sub object that contains new sub information
16
16
  */
17
17
  constructor(subId:uint256, sub:[uint64, boolean, bytes[], bytes32[]]) {
18
- super('UpdateSub', getAddr('UpdateSub'), ['uint256', '(uint64,bool,bytes[],bytes32[])'], [subId, sub]);
18
+ super('UpdateSub', getAddr('UpdateSub'), ['uint256', ['uint64', 'bool', 'bytes[]', 'bytes32[]']], [subId, sub]);
19
19
 
20
20
  this.mappableArgs = [
21
21
  this.args[0],
@@ -0,0 +1,29 @@
1
+ const dfs = require("../../../umd");
2
+ const {encodeForDsProxyCall, encodeForRecipe} = require("../../_actionUtils");
3
+
4
+ describe('Action: CreateSubAction', () => {
5
+ let action;
6
+
7
+ context('CreateSubAction', () => {
8
+ it('constructor', () => {
9
+ action = new dfs.actions.basic.CreateSubAction(
10
+ [24,
11
+ true,
12
+ ["0x0000000000000000000000009ccf93089cb14f94baeb8822f8ceffd91bd71649000000000000000000000000a920de414ea4ab66b97da1bfe9e6eca7d421963500000000000000000000000000000000000000000000000016e5fa42076500000000000000000000000000000000000000000000000000000000000000000001"],
13
+ [
14
+ "0x000000000000000000000000a920de414ea4ab66b97da1bfe9e6eca7d4219635",
15
+ "0x0000000000000000000000000000000000000000000000000000000000000001",
16
+ "0x00000000000000000000000000000000000000000000000018fae27693b40000",
17
+ "0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
18
+ "0x000000000000000000000000f939e0a03fb07f59a73314e73794be0e57ac1b4e"
19
+ ],
20
+ ]
21
+ );
22
+ console.log(action);
23
+ });
24
+
25
+ it('encodeForDsProxyCall', () => encodeForDsProxyCall(action));
26
+ it('encodeForRecipe', () => encodeForRecipe(action));
27
+ })
28
+
29
+ });
package/umd/index.js CHANGED
@@ -3652,7 +3652,7 @@ class UpdateSubAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
3652
3652
  * @param sub object that contains new sub information
3653
3653
  */
3654
3654
  constructor(subId, sub) {
3655
- super('UpdateSub', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('UpdateSub'), ['uint256', '(uint64,bool,bytes[],bytes32[])'], [subId, sub]);
3655
+ super('UpdateSub', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('UpdateSub'), ['uint256', ['uint64', 'bool', 'bytes[]', 'bytes32[]']], [subId, sub]);
3656
3656
  this.mappableArgs = [this.args[0]];
3657
3657
  for (var i = 0; i < this.args[1][3].length; i++) {
3658
3658
  this.mappableArgs.push(this.args[1][3][i]);
@@ -3803,7 +3803,8 @@ class CreateSubAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
3803
3803
  * @param sub object that contains new sub information
3804
3804
  */
3805
3805
  constructor(sub) {
3806
- super('CreateSub', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('CreateSub'), ['(uint64,bool,bytes[],bytes32[])'], [sub]);
3806
+ super('CreateSub', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('CreateSub'), [['uint64', 'bool', 'bytes[]', 'bytes32[]']], [sub]);
3807
+ this.mappableArgs = [];
3807
3808
  for (var i = 0; i < this.args[0][3].length; i++) {
3808
3809
  this.mappableArgs.push(this.args[0][3][i]);
3809
3810
  }