@reyaxyz/sdk 0.106.10 → 0.106.11
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/dist/services/conditional-orders/grant-trade-permission/encode.js +1 -3
- package/dist/services/conditional-orders/grant-trade-permission/encode.js.map +1 -1
- package/dist/types/services/conditional-orders/grant-trade-permission/encode.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/services/conditional-orders/grant-trade-permission/encode.ts +1 -3
|
@@ -53,9 +53,7 @@ var encodeGrantTradePermission = function (signer, chainId, coreSigNonce, accoun
|
|
|
53
53
|
eip712Signature = _a.sent();
|
|
54
54
|
value = BigInt(0);
|
|
55
55
|
functionSignature = 'grantAccountPermissionBySig';
|
|
56
|
-
parameters = [
|
|
57
|
-
{ accountId: accountId, permission: permission, user: user, sig: eip712Signature },
|
|
58
|
-
];
|
|
56
|
+
parameters = [accountId, permission, user, eip712Signature];
|
|
59
57
|
INTERFACE = new ethers_1.Interface(common_1.CoreAbi);
|
|
60
58
|
calldata = INTERFACE.encodeFunctionData(functionSignature, parameters);
|
|
61
59
|
return [2 /*return*/, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode.js","sourceRoot":"/","sources":["services/conditional-orders/grant-trade-permission/encode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAmE;AACnE,0CAOyB;AACzB,0CAA2D;AAC3D,iCAA2C;AAEpC,IAAM,0BAA0B,GAAG,UACxC,MAAc,EACd,OAAe,EACf,YAAoB,EACpB,SAAiB;;;;;gBAEX,UAAU,GAAG,IAAA,sBAAa,EAAC,mCAA0B,CAAC,WAAW,CAAC,CAAC;gBACnE,IAAI,GAAG,IAAA,mBAAU,EAAC,OAAO,EAAE,qBAAY,CAAC,wBAAwB,CAAC,CAAC;gBAEhD,qBAAM,IAAA,4BAAmB,EAC/C,MAAM,EACN,OAAO,EACP,SAAS,EACT,UAAU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,CAAC,QAAQ,CAAC,EAAE,CAAC;qBAClC,EAAC;;;KACH,CAAC;AA9BW,QAAA,0BAA0B,8BA8BrC","sourcesContent":["import { MethodParameters, CoreAbi as abi } from '@reyaxyz/common';\nimport {\n getCurrentTimestampInSeconds,\n ContractType,\n getAddress,\n CoreAccountPermissionTypes,\n getPermission,\n signGrantPermission,\n} from '@reyaxyz/common';\nimport { CORE_DEADLINE_IN_SECONDS } from '@reyaxyz/common';\nimport { Interface, Signer } from 'ethers';\n\nexport const encodeGrantTradePermission = async (\n signer: Signer,\n chainId: number,\n coreSigNonce: number,\n accountId: number,\n): Promise<MethodParameters> => {\n const permission = getPermission(CoreAccountPermissionTypes.MATCH_ORDER);\n const user = getAddress(chainId, ContractType.CONDITIONAL_ORDERS_PROXY);\n\n const eip712Signature = await signGrantPermission(\n signer,\n chainId,\n accountId,\n permission,\n user,\n coreSigNonce + 1,\n getCurrentTimestampInSeconds() + CORE_DEADLINE_IN_SECONDS,\n );\n\n const value = BigInt(0);\n\n const functionSignature = 'grantAccountPermissionBySig';\n const parameters = [accountId, permission, user, eip712Signature];\n\n const INTERFACE = new Interface(abi);\n const calldata = INTERFACE.encodeFunctionData(functionSignature, parameters);\n return {\n calldata: calldata,\n value: BigInt(value).toString(10),\n };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode.d.ts","sourceRoot":"/","sources":["services/conditional-orders/grant-trade-permission/encode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAkB,MAAM,iBAAiB,CAAC;AAUnE,OAAO,EAAa,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3C,eAAO,MAAM,0BAA0B,WAC7B,MAAM,WACL,MAAM,gBACD,MAAM,aACT,MAAM,KAChB,QAAQ,gBAAgB,
|
|
1
|
+
{"version":3,"file":"encode.d.ts","sourceRoot":"/","sources":["services/conditional-orders/grant-trade-permission/encode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAkB,MAAM,iBAAiB,CAAC;AAUnE,OAAO,EAAa,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3C,eAAO,MAAM,0BAA0B,WAC7B,MAAM,WACL,MAAM,gBACD,MAAM,aACT,MAAM,KAChB,QAAQ,gBAAgB,CAyB1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/sdk",
|
|
3
|
-
"version": "0.106.
|
|
3
|
+
"version": "0.106.11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"ethers": "6.9.0"
|
|
35
35
|
},
|
|
36
36
|
"packageManager": "pnpm@8.3.1",
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "9b2e609e3c7f1ea61167c9adb17d437b9becc820"
|
|
38
38
|
}
|
|
@@ -32,9 +32,7 @@ export const encodeGrantTradePermission = async (
|
|
|
32
32
|
const value = BigInt(0);
|
|
33
33
|
|
|
34
34
|
const functionSignature = 'grantAccountPermissionBySig';
|
|
35
|
-
const parameters = [
|
|
36
|
-
{ accountId: accountId, permission, user, sig: eip712Signature },
|
|
37
|
-
];
|
|
35
|
+
const parameters = [accountId, permission, user, eip712Signature];
|
|
38
36
|
|
|
39
37
|
const INTERFACE = new Interface(abi);
|
|
40
38
|
const calldata = INTERFACE.encodeFunctionData(functionSignature, parameters);
|