@mantleio/viem 0.0.1-alpha.0 → 0.0.1-alpha.1
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/cjs/actions/estimateInitiateERC20WithdrawalGas.js +1 -1
- package/dist/cjs/actions/estimateInitiateERC20WithdrawalGas.js.map +1 -1
- package/dist/cjs/actions/estimateInitiateETHWithdrawalGas.js +1 -1
- package/dist/cjs/actions/estimateInitiateETHWithdrawalGas.js.map +1 -1
- package/dist/cjs/actions/estimateInitiateMNTWithdrawalGas.js +1 -1
- package/dist/cjs/actions/estimateInitiateMNTWithdrawalGas.js.map +1 -1
- package/dist/cjs/actions/initiateERC20Withdrawal.js +3 -3
- package/dist/cjs/actions/initiateERC20Withdrawal.js.map +1 -1
- package/dist/cjs/actions/initiateETHWithdrawal.js +1 -1
- package/dist/cjs/actions/initiateETHWithdrawal.js.map +1 -1
- package/dist/cjs/actions/initiateMNTWithdrawal.js +1 -1
- package/dist/cjs/actions/initiateMNTWithdrawal.js.map +1 -1
- package/dist/cjs/utils/parseInitWithdrawRequest.js +3 -3
- package/dist/cjs/utils/parseInitWithdrawRequest.js.map +1 -1
- package/dist/esm/actions/estimateInitiateERC20WithdrawalGas.js +2 -2
- package/dist/esm/actions/estimateInitiateERC20WithdrawalGas.js.map +1 -1
- package/dist/esm/actions/estimateInitiateETHWithdrawalGas.js +2 -2
- package/dist/esm/actions/estimateInitiateETHWithdrawalGas.js.map +1 -1
- package/dist/esm/actions/estimateInitiateMNTWithdrawalGas.js +2 -2
- package/dist/esm/actions/estimateInitiateMNTWithdrawalGas.js.map +1 -1
- package/dist/esm/actions/initiateERC20Withdrawal.js +4 -4
- package/dist/esm/actions/initiateERC20Withdrawal.js.map +1 -1
- package/dist/esm/actions/initiateETHWithdrawal.js +2 -2
- package/dist/esm/actions/initiateETHWithdrawal.js.map +1 -1
- package/dist/esm/actions/initiateMNTWithdrawal.js +2 -2
- package/dist/esm/actions/initiateMNTWithdrawal.js.map +1 -1
- package/dist/esm/utils/parseInitWithdrawRequest.js +1 -1
- package/dist/esm/utils/parseInitWithdrawRequest.js.map +1 -1
- package/dist/types/utils/parseInitWithdrawRequest.d.ts +1 -1
- package/dist/types/utils/parseInitWithdrawRequest.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/mantle/actions/estimateInitiateERC20WithdrawalGas.ts +2 -2
- package/src/mantle/actions/estimateInitiateETHWithdrawalGas.ts +2 -2
- package/src/mantle/actions/estimateInitiateMNTWithdrawalGas.ts +2 -2
- package/src/mantle/actions/initiateERC20Withdrawal.ts +4 -4
- package/src/mantle/actions/initiateETHWithdrawal.ts +2 -2
- package/src/mantle/actions/initiateMNTWithdrawal.ts +2 -2
- package/src/mantle/utils/parseInitWithdrawRequest.ts +1 -1
@@ -7,7 +7,7 @@ const contracts_js_1 = require("../contracts.js");
|
|
7
7
|
const parseInitWithdrawRequest_js_1 = require("../utils/parseInitWithdrawRequest.js");
|
8
8
|
async function estimateInitiateERC20Withdrawal(client, parameters) {
|
9
9
|
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, l2Token, to }, } = parameters;
|
10
|
-
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.
|
10
|
+
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.parseInitWithdrawRequest)({
|
11
11
|
type: "erc20",
|
12
12
|
l2Token,
|
13
13
|
amount,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"estimateInitiateERC20WithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateERC20WithdrawalGas.ts"],"names":[],"mappings":";;AAyDA,0EAgDC;AAnGD,0CAIsB;AAEtB,wCAA8C;AAC9C,kDAA4C;AAI5C,
|
1
|
+
{"version":3,"file":"estimateInitiateERC20WithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateERC20WithdrawalGas.ts"],"names":[],"mappings":";;AAyDA,0EAgDC;AAnGD,0CAIsB;AAEtB,wCAA8C;AAC9C,kDAA4C;AAI5C,sFAAgF;AAwCzE,KAAK,UAAU,+BAA+B,CAKpD,MAAyC,EACzC,UAIC;IAED,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAChC,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,IAAA,sDAAwB,EAAC;QACvD,IAAI,EAAE,OAAO;QACb,OAAO;QACP,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG;QACd,OAAO;QACP,GAAG,EAAE,0BAAgB;QACrB,OAAO,EAAE,wBAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;QAIL,KAAK;KAIL,CAAC;IACF,OAAO,IAAA,6BAAmB,EAAC,MAAM,EAAE,MAAa,CAAC,CAAC;AACnD,CAAC"}
|
@@ -7,7 +7,7 @@ const contracts_js_1 = require("../contracts.js");
|
|
7
7
|
const parseInitWithdrawRequest_js_1 = require("../utils/parseInitWithdrawRequest.js");
|
8
8
|
async function estimateInitiateETHWithdrawalGas(client, parameters) {
|
9
9
|
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to }, } = parameters;
|
10
|
-
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.
|
10
|
+
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.parseInitWithdrawRequest)({
|
11
11
|
type: "eth",
|
12
12
|
amount,
|
13
13
|
to,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"estimateInitiateETHWithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateETHWithdrawalGas.ts"],"names":[],"mappings":";;AAyDA,4EA+CC;AAlGD,0CAIsB;AAEtB,wCAA8C;AAC9C,kDAA4C;AAI5C,
|
1
|
+
{"version":3,"file":"estimateInitiateETHWithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateETHWithdrawalGas.ts"],"names":[],"mappings":";;AAyDA,4EA+CC;AAlGD,0CAIsB;AAEtB,wCAA8C;AAC9C,kDAA4C;AAI5C,sFAAgF;AAwCzE,KAAK,UAAU,gCAAgC,CAKrD,MAAyC,EACzC,UAIC;IAED,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GACvB,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,IAAA,sDAAwB,EAAC;QACvD,IAAI,EAAE,KAAK;QACX,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG;QACd,OAAO;QACP,GAAG,EAAE,0BAAgB;QACrB,OAAO,EAAE,wBAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;QAIL,KAAK;KAIL,CAAC;IACF,OAAO,IAAA,6BAAmB,EAAC,MAAM,EAAE,MAAa,CAAC,CAAC;AACnD,CAAC"}
|
@@ -7,7 +7,7 @@ const contracts_js_1 = require("../contracts.js");
|
|
7
7
|
const parseInitWithdrawRequest_js_1 = require("../utils/parseInitWithdrawRequest.js");
|
8
8
|
async function estimateInitiateMNTWithdrawalGas(client, parameters) {
|
9
9
|
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to }, } = parameters;
|
10
|
-
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.
|
10
|
+
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.parseInitWithdrawRequest)({
|
11
11
|
type: "mnt",
|
12
12
|
amount,
|
13
13
|
to,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"estimateInitiateMNTWithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateMNTWithdrawalGas.ts"],"names":[],"mappings":";;AAyDA,4EAgDC;AAnGD,0CAIsB;AAEtB,wCAA8C;AAC9C,kDAA4C;AAI5C,
|
1
|
+
{"version":3,"file":"estimateInitiateMNTWithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateMNTWithdrawalGas.ts"],"names":[],"mappings":";;AAyDA,4EAgDC;AAnGD,0CAIsB;AAEtB,wCAA8C;AAC9C,kDAA4C;AAI5C,sFAAgF;AAwCzE,KAAK,UAAU,gCAAgC,CAKrD,MAAyC,EACzC,UAIC;IAED,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GACvB,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,IAAA,sDAAwB,EAAC;QACvD,IAAI,EAAE,KAAK;QACX,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG;QACd,OAAO;QACP,GAAG,EAAE,0BAAgB;QACrB,OAAO,EAAE,wBAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;QAIL,KAAK;QACL,KAAK,EAAE,MAAM;KAIb,CAAC;IACF,OAAO,IAAA,6BAAmB,EAAC,MAAM,EAAE,MAAa,CAAC,CAAC;AACnD,CAAC"}
|
@@ -6,10 +6,10 @@ const abis_js_1 = require("../abis.js");
|
|
6
6
|
const contracts_js_1 = require("../contracts.js");
|
7
7
|
const parseInitWithdrawRequest_js_1 = require("../utils/parseInitWithdrawRequest.js");
|
8
8
|
async function initiateERC20Withdrawal(client, parameters) {
|
9
|
-
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to }, } = parameters;
|
10
|
-
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.
|
9
|
+
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to, l2Token }, } = parameters;
|
10
|
+
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.parseInitWithdrawRequest)({
|
11
11
|
type: "erc20",
|
12
|
-
l2Token
|
12
|
+
l2Token,
|
13
13
|
amount,
|
14
14
|
to,
|
15
15
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"initiateERC20Withdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateERC20Withdrawal.ts"],"names":[],"mappings":";;AAuDA,0DAqCC;AAtFD,0CAIsB;AACtB,wCAA8C;AAC9C,kDAA4C;AAI5C,
|
1
|
+
{"version":3,"file":"initiateERC20Withdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateERC20Withdrawal.ts"],"names":[],"mappings":";;AAuDA,0DAqCC;AAtFD,0CAIsB;AACtB,wCAA8C;AAC9C,kDAA4C;AAI5C,sFAAgF;AAuCzE,KAAK,UAAU,uBAAuB,CAK5C,MAAyC,EACzC,UAA4E;IAE5E,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,GAChC,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,IAAA,sDAAwB,EAAC;QACvD,IAAI,EAAE,OAAO;QACb,OAAO;QACP,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,OAAO,IAAA,uBAAa,EAAC,MAAM,EAAE;QAC5B,OAAO,EAAE,OAAQ;QACjB,GAAG,EAAE,0BAAgB;QACrB,OAAO,EAAE,wBAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,KAAK;QACL,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;KACoC,CAAC,CAAC;AAC7C,CAAC"}
|
@@ -7,7 +7,7 @@ const contracts_js_1 = require("../contracts.js");
|
|
7
7
|
const parseInitWithdrawRequest_js_1 = require("../utils/parseInitWithdrawRequest.js");
|
8
8
|
async function initiateETHWithdrawal(client, parameters) {
|
9
9
|
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to }, } = parameters;
|
10
|
-
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.
|
10
|
+
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.parseInitWithdrawRequest)({
|
11
11
|
type: "eth",
|
12
12
|
amount,
|
13
13
|
to,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"initiateETHWithdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateETHWithdrawal.ts"],"names":[],"mappings":";;AAqDA,sDAoCC;AAnFD,0CAIsB;AACtB,wCAA8C;AAC9C,kDAA4C;AAI5C,
|
1
|
+
{"version":3,"file":"initiateETHWithdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateETHWithdrawal.ts"],"names":[],"mappings":";;AAqDA,sDAoCC;AAnFD,0CAIsB;AACtB,wCAA8C;AAC9C,kDAA4C;AAI5C,sFAAgF;AAqCzE,KAAK,UAAU,qBAAqB,CAK1C,MAAyC,EACzC,UAA0E;IAE1E,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GACvB,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,IAAA,sDAAwB,EAAC;QACvD,IAAI,EAAE,KAAK;QACX,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,OAAO,IAAA,uBAAa,EAAC,MAAM,EAAE;QAC5B,OAAO,EAAE,OAAQ;QACjB,GAAG,EAAE,0BAAgB;QACrB,OAAO,EAAE,wBAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,KAAK;QACL,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;KACoC,CAAC,CAAC;AAC7C,CAAC"}
|
@@ -7,7 +7,7 @@ const contracts_js_1 = require("../contracts.js");
|
|
7
7
|
const parseInitWithdrawRequest_js_1 = require("../utils/parseInitWithdrawRequest.js");
|
8
8
|
async function initiateMNTWithdrawal(client, parameters) {
|
9
9
|
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to }, } = parameters;
|
10
|
-
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.
|
10
|
+
const { functionName, args } = (0, parseInitWithdrawRequest_js_1.parseInitWithdrawRequest)({
|
11
11
|
type: "mnt",
|
12
12
|
amount,
|
13
13
|
to,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"initiateMNTWithdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateMNTWithdrawal.ts"],"names":[],"mappings":";;AAqDA,sDAqCC;AApFD,0CAIsB;AACtB,wCAA8C;AAC9C,kDAA4C;AAI5C,
|
1
|
+
{"version":3,"file":"initiateMNTWithdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateMNTWithdrawal.ts"],"names":[],"mappings":";;AAqDA,sDAqCC;AApFD,0CAIsB;AACtB,wCAA8C;AAC9C,kDAA4C;AAI5C,sFAAgF;AAqCzE,KAAK,UAAU,qBAAqB,CAK1C,MAAyC,EACzC,UAA0E;IAE1E,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GACvB,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,IAAA,sDAAwB,EAAC;QACvD,IAAI,EAAE,KAAK;QACX,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,OAAO,IAAA,uBAAa,EAAC,MAAM,EAAE;QAC5B,OAAO,EAAE,OAAQ;QACjB,GAAG,EAAE,0BAAgB;QACrB,OAAO,EAAE,wBAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,KAAK;QACL,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,KAAK,EAAE,MAAM;KAC4B,CAAC,CAAC;AAC7C,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
const
|
3
|
+
exports.parseInitWithdrawRequest = void 0;
|
4
|
+
const parseInitWithdrawRequest = ({ type, l2Token, amount, to, }) => {
|
5
5
|
if (to) {
|
6
6
|
switch (type) {
|
7
7
|
case "eth":
|
@@ -51,5 +51,5 @@ const parseInitWithdrawequest = ({ type, l2Token, amount, to, }) => {
|
|
51
51
|
};
|
52
52
|
}
|
53
53
|
};
|
54
|
-
exports.
|
54
|
+
exports.parseInitWithdrawRequest = parseInitWithdrawRequest;
|
55
55
|
//# sourceMappingURL=parseInitWithdrawRequest.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parseInitWithdrawRequest.js","sourceRoot":"","sources":["../../../src/mantle/utils/parseInitWithdrawRequest.ts"],"names":[],"mappings":";;;AAYO,MAAM,
|
1
|
+
{"version":3,"file":"parseInitWithdrawRequest.js","sourceRoot":"","sources":["../../../src/mantle/utils/parseInitWithdrawRequest.ts"],"names":[],"mappings":";;;AAYO,MAAM,wBAAwB,GAAG,CAAC,EACxC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,EAAE,GAC0B,EAAkC,EAAE;IAChE,IAAI,EAAE,EAAE,CAAC;QACR,QAAQ,IAAI,EAAE,CAAC;YACd,KAAK,KAAK;gBACT,OAAO;oBACN,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE;wBACL,4CAA4C;wBAC5C,EAAE;wBACF,MAAM;wBACN,CAAC;wBACD,IAAI;qBACJ;iBACD,CAAC;YACH,KAAK,OAAO;gBACX,OAAO;oBACN,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC;iBACpC,CAAC;YACH;gBACC,OAAO;oBACN,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE;wBACL,4CAA4C;wBAC5C,EAAE;wBACF,MAAM;wBACN,CAAC;wBACD,IAAI;qBACJ;iBACD,CAAC;QACJ,CAAC;IACF,CAAC;IAED,QAAQ,IAAI,EAAE,CAAC;QACd,KAAK,KAAK;YACT,OAAO;gBACN,YAAY,EAAE,UAAU;gBACxB,IAAI,EAAE,CAAC,4CAA4C,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC;aACrE,CAAC;QACH,KAAK,OAAO;YACX,OAAO;gBACN,YAAY,EAAE,UAAU;gBACxB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC;aAChC,CAAC;QACH;YACC,OAAO;gBACN,YAAY,EAAE,UAAU;gBACxB,IAAI,EAAE,CAAC,4CAA4C,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC;aACrE,CAAC;IACJ,CAAC;AACF,CAAC,CAAC;AAvDW,QAAA,wBAAwB,4BAuDnC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { estimateContractGas, } from "viem/actions";
|
2
2
|
import { l2StandardBridge } from "../abis.js";
|
3
3
|
import { contracts } from "../contracts.js";
|
4
|
-
import {
|
4
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
5
5
|
/**
|
6
6
|
* @param client - Client to use
|
7
7
|
* @param parameters - {@link EstimateInitiateERC20WithdrawalGasParameters}
|
@@ -9,7 +9,7 @@ import { parseInitWithdrawequest } from "../utils/parseInitWithdrawRequest.js";
|
|
9
9
|
*/
|
10
10
|
export async function estimateInitiateERC20Withdrawal(client, parameters) {
|
11
11
|
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, l2Token, to }, } = parameters;
|
12
|
-
const { functionName, args } =
|
12
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
13
13
|
type: "erc20",
|
14
14
|
l2Token,
|
15
15
|
amount,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"estimateInitiateERC20WithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateERC20WithdrawalGas.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,mBAAmB,GAGnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"estimateInitiateERC20WithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateERC20WithdrawalGas.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,mBAAmB,GAGnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAmChF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,+BAA+B,CAKpD,MAAyC,EACzC,UAIC;IAED,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAChC,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,wBAAwB,CAAC;QACvD,IAAI,EAAE,OAAO;QACb,OAAO;QACP,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG;QACd,OAAO;QACP,GAAG,EAAE,gBAAgB;QACrB,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,qEAAqE;QACrE,4CAA4C;QAC5C,aAAa;QACb,KAAK;KAIL,CAAC;IACF,OAAO,mBAAmB,CAAC,MAAM,EAAE,MAAa,CAAC,CAAC;AACnD,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { estimateContractGas, } from "viem/actions";
|
2
2
|
import { l2StandardBridge } from "../abis.js";
|
3
3
|
import { contracts } from "../contracts.js";
|
4
|
-
import {
|
4
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
5
5
|
/**
|
6
6
|
* @param client - Client to use
|
7
7
|
* @param parameters - {@link EstimateInitiateETHWithdrawalGasParameters}
|
@@ -9,7 +9,7 @@ import { parseInitWithdrawequest } from "../utils/parseInitWithdrawRequest.js";
|
|
9
9
|
*/
|
10
10
|
export async function estimateInitiateETHWithdrawalGas(client, parameters) {
|
11
11
|
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to }, } = parameters;
|
12
|
-
const { functionName, args } =
|
12
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
13
13
|
type: "eth",
|
14
14
|
amount,
|
15
15
|
to,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"estimateInitiateETHWithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateETHWithdrawalGas.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,mBAAmB,GAGnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"estimateInitiateETHWithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateETHWithdrawalGas.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,mBAAmB,GAGnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAmChF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC,CAKrD,MAAyC,EACzC,UAIC;IAED,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GACvB,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,wBAAwB,CAAC;QACvD,IAAI,EAAE,KAAK;QACX,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG;QACd,OAAO;QACP,GAAG,EAAE,gBAAgB;QACrB,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,qEAAqE;QACrE,4CAA4C;QAC5C,aAAa;QACb,KAAK;KAIL,CAAC;IACF,OAAO,mBAAmB,CAAC,MAAM,EAAE,MAAa,CAAC,CAAC;AACnD,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { estimateContractGas, } from "viem/actions";
|
2
2
|
import { l2StandardBridge } from "../abis.js";
|
3
3
|
import { contracts } from "../contracts.js";
|
4
|
-
import {
|
4
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
5
5
|
/**
|
6
6
|
* @param client - Client to use
|
7
7
|
* @param parameters - {@link EstimateInitiateMNTWithdrawalGasParameters}
|
@@ -9,7 +9,7 @@ import { parseInitWithdrawequest } from "../utils/parseInitWithdrawRequest.js";
|
|
9
9
|
*/
|
10
10
|
export async function estimateInitiateMNTWithdrawalGas(client, parameters) {
|
11
11
|
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to }, } = parameters;
|
12
|
-
const { functionName, args } =
|
12
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
13
13
|
type: "mnt",
|
14
14
|
amount,
|
15
15
|
to,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"estimateInitiateMNTWithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateMNTWithdrawalGas.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,mBAAmB,GAGnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"estimateInitiateMNTWithdrawalGas.js","sourceRoot":"","sources":["../../../src/mantle/actions/estimateInitiateMNTWithdrawalGas.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,mBAAmB,GAGnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAmChF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC,CAKrD,MAAyC,EACzC,UAIC;IAED,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GACvB,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,wBAAwB,CAAC;QACvD,IAAI,EAAE,KAAK;QACX,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG;QACd,OAAO;QACP,GAAG,EAAE,gBAAgB;QACrB,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,qEAAqE;QACrE,4CAA4C;QAC5C,aAAa;QACb,KAAK;QACL,KAAK,EAAE,MAAM;KAIb,CAAC;IACF,OAAO,mBAAmB,CAAC,MAAM,EAAE,MAAa,CAAC,CAAC;AACnD,CAAC"}
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import { writeContract, } from "viem/actions";
|
2
2
|
import { l2StandardBridge } from "../abis.js";
|
3
3
|
import { contracts } from "../contracts.js";
|
4
|
-
import {
|
4
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
5
5
|
/**
|
6
6
|
* @param client - Client to use
|
7
7
|
* @param parameters - {@link InitiateERC20WithdrawalParameters}
|
8
8
|
* @returns The L2 transaction hash. {@link InitiateERC20WithdrawalReturnType}
|
9
9
|
*/
|
10
10
|
export async function initiateERC20Withdrawal(client, parameters) {
|
11
|
-
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to }, } = parameters;
|
12
|
-
const { functionName, args } =
|
11
|
+
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to, l2Token }, } = parameters;
|
12
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
13
13
|
type: "erc20",
|
14
|
-
l2Token
|
14
|
+
l2Token,
|
15
15
|
amount,
|
16
16
|
to,
|
17
17
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"initiateERC20Withdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateERC20Withdrawal.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,aAAa,GAGb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"initiateERC20Withdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateERC20Withdrawal.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,aAAa,GAGb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAkChF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAK5C,MAAyC,EACzC,UAA4E;IAE5E,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,GAChC,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,wBAAwB,CAAC;QACvD,IAAI,EAAE,OAAO;QACb,OAAO;QACP,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,OAAO,aAAa,CAAC,MAAM,EAAE;QAC5B,OAAO,EAAE,OAAQ;QACjB,GAAG,EAAE,gBAAgB;QACrB,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,KAAK;QACL,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;KACoC,CAAC,CAAC;AAC7C,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { writeContract, } from "viem/actions";
|
2
2
|
import { l2StandardBridge } from "../abis.js";
|
3
3
|
import { contracts } from "../contracts.js";
|
4
|
-
import {
|
4
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
5
5
|
/**
|
6
6
|
* @param client - Client to use
|
7
7
|
* @param parameters - {@link InitiateETHWithdrawalParameters}
|
@@ -9,7 +9,7 @@ import { parseInitWithdrawequest } from "../utils/parseInitWithdrawRequest.js";
|
|
9
9
|
*/
|
10
10
|
export async function initiateETHWithdrawal(client, parameters) {
|
11
11
|
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to }, } = parameters;
|
12
|
-
const { functionName, args } =
|
12
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
13
13
|
type: "eth",
|
14
14
|
amount,
|
15
15
|
to,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"initiateETHWithdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateETHWithdrawal.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,aAAa,GAGb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"initiateETHWithdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateETHWithdrawal.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,aAAa,GAGb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAgChF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAK1C,MAAyC,EACzC,UAA0E;IAE1E,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GACvB,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,wBAAwB,CAAC;QACvD,IAAI,EAAE,KAAK;QACX,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,OAAO,aAAa,CAAC,MAAM,EAAE;QAC5B,OAAO,EAAE,OAAQ;QACjB,GAAG,EAAE,gBAAgB;QACrB,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,KAAK;QACL,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;KACoC,CAAC,CAAC;AAC7C,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { writeContract, } from "viem/actions";
|
2
2
|
import { l2StandardBridge } from "../abis.js";
|
3
3
|
import { contracts } from "../contracts.js";
|
4
|
-
import {
|
4
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
5
5
|
/**
|
6
6
|
* @param client - Client to use
|
7
7
|
* @param parameters - {@link InitiateMNTWithdrawalParameters}
|
@@ -9,7 +9,7 @@ import { parseInitWithdrawequest } from "../utils/parseInitWithdrawRequest.js";
|
|
9
9
|
*/
|
10
10
|
export async function initiateMNTWithdrawal(client, parameters) {
|
11
11
|
const { account, chain = client.chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce, request: { amount, to }, } = parameters;
|
12
|
-
const { functionName, args } =
|
12
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
13
13
|
type: "mnt",
|
14
14
|
amount,
|
15
15
|
to,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"initiateMNTWithdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateMNTWithdrawal.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,aAAa,GAGb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"initiateMNTWithdrawal.js","sourceRoot":"","sources":["../../../src/mantle/actions/initiateMNTWithdrawal.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,aAAa,GAGb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAgChF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAK1C,MAAyC,EACzC,UAA0E;IAE1E,MAAM,EACL,OAAO,EACP,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,GAAG,EACH,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GACvB,GAAG,UAAU,CAAC;IAEf,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,wBAAwB,CAAC;QACvD,IAAI,EAAE,KAAK;QACX,MAAM;QACN,EAAE;KACF,CAAC,CAAC;IAEH,OAAO,aAAa,CAAC,MAAM,EAAE;QAC5B,OAAO,EAAE,OAAQ;QACjB,GAAG,EAAE,gBAAgB;QACrB,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC,OAAO;QAC3C,KAAK;QACL,YAAY;QACZ,IAAI;QACJ,GAAG;QACH,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,KAAK,EAAE,MAAM;KAC4B,CAAC,CAAC;AAC7C,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parseInitWithdrawRequest.js","sourceRoot":"","sources":["../../../src/mantle/utils/parseInitWithdrawRequest.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,
|
1
|
+
{"version":3,"file":"parseInitWithdrawRequest.js","sourceRoot":"","sources":["../../../src/mantle/utils/parseInitWithdrawRequest.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACxC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,EAAE,GAC0B,EAAkC,EAAE;IAChE,IAAI,EAAE,EAAE,CAAC;QACR,QAAQ,IAAI,EAAE,CAAC;YACd,KAAK,KAAK;gBACT,OAAO;oBACN,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE;wBACL,4CAA4C;wBAC5C,EAAE;wBACF,MAAM;wBACN,CAAC;wBACD,IAAI;qBACJ;iBACD,CAAC;YACH,KAAK,OAAO;gBACX,OAAO;oBACN,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC;iBACpC,CAAC;YACH;gBACC,OAAO;oBACN,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE;wBACL,4CAA4C;wBAC5C,EAAE;wBACF,MAAM;wBACN,CAAC;wBACD,IAAI;qBACJ;iBACD,CAAC;QACJ,CAAC;IACF,CAAC;IAED,QAAQ,IAAI,EAAE,CAAC;QACd,KAAK,KAAK;YACT,OAAO;gBACN,YAAY,EAAE,UAAU;gBACxB,IAAI,EAAE,CAAC,4CAA4C,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC;aACrE,CAAC;QACH,KAAK,OAAO;YACX,OAAO;gBACN,YAAY,EAAE,UAAU;gBACxB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC;aAChC,CAAC;QACH;YACC,OAAO;gBACN,YAAY,EAAE,UAAU;gBACxB,IAAI,EAAE,CAAC,4CAA4C,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC;aACrE,CAAC;IACJ,CAAC;AACF,CAAC,CAAC"}
|
@@ -6,6 +6,6 @@ type ParseWithdrawRequestReturnType = {
|
|
6
6
|
functionName: InitWithdrawFunctionName;
|
7
7
|
args: WithdrawArgs;
|
8
8
|
};
|
9
|
-
export declare const
|
9
|
+
export declare const parseInitWithdrawRequest: ({ type, l2Token, amount, to, }: InitialteWithdrawalRequest) => ParseWithdrawRequestReturnType;
|
10
10
|
export {};
|
11
11
|
//# sourceMappingURL=parseInitWithdrawRequest.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parseInitWithdrawRequest.d.ts","sourceRoot":"","sources":["../../../src/mantle/utils/parseInitWithdrawRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEzE,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,YAAY,CAAC;AACjE,MAAM,MAAM,YAAY,GACrB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,GAC9B,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;AAC3C,KAAK,8BAA8B,GAAG;IACrC,YAAY,EAAE,wBAAwB,CAAC;IACvC,IAAI,EAAE,YAAY,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,
|
1
|
+
{"version":3,"file":"parseInitWithdrawRequest.d.ts","sourceRoot":"","sources":["../../../src/mantle/utils/parseInitWithdrawRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEzE,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,YAAY,CAAC;AACjE,MAAM,MAAM,YAAY,GACrB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,GAC9B,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;AAC3C,KAAK,8BAA8B,GAAG;IACrC,YAAY,EAAE,wBAAwB,CAAC;IACvC,IAAI,EAAE,YAAY,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,wBAAwB,mCAKlC,0BAA0B,KAAG,8BAkD/B,CAAC"}
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@ import { contracts } from "../contracts.js";
|
|
15
15
|
import type { ErrorType } from "../errors/utils.js";
|
16
16
|
import type { GetAccountParameter } from "../types/account.js";
|
17
17
|
import type { InitiateERC20WithdrawalRequest } from "../types/withdrawal.js";
|
18
|
-
import {
|
18
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
19
19
|
|
20
20
|
export type EstimateInitiateWithdrawalERC20GasParameters<
|
21
21
|
chain extends Chain | undefined = Chain | undefined,
|
@@ -77,7 +77,7 @@ export async function estimateInitiateERC20Withdrawal<
|
|
77
77
|
request: { amount, l2Token, to },
|
78
78
|
} = parameters;
|
79
79
|
|
80
|
-
const { functionName, args } =
|
80
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
81
81
|
type: "erc20",
|
82
82
|
l2Token,
|
83
83
|
amount,
|
@@ -15,7 +15,7 @@ import { contracts } from "../contracts.js";
|
|
15
15
|
import type { ErrorType } from "../errors/utils.js";
|
16
16
|
import type { GetAccountParameter } from "../types/account.js";
|
17
17
|
import type { InitiateETHWithdrawalRequest } from "../types/withdrawal.js";
|
18
|
-
import {
|
18
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
19
19
|
|
20
20
|
export type EstimateInitiateETHWithdrawalGasParameters<
|
21
21
|
chain extends Chain | undefined = Chain | undefined,
|
@@ -77,7 +77,7 @@ export async function estimateInitiateETHWithdrawalGas<
|
|
77
77
|
request: { amount, to },
|
78
78
|
} = parameters;
|
79
79
|
|
80
|
-
const { functionName, args } =
|
80
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
81
81
|
type: "eth",
|
82
82
|
amount,
|
83
83
|
to,
|
@@ -15,7 +15,7 @@ import { contracts } from "../contracts.js";
|
|
15
15
|
import type { ErrorType } from "../errors/utils.js";
|
16
16
|
import type { GetAccountParameter } from "../types/account.js";
|
17
17
|
import type { InitiateMNTWithdrawalRequest } from "../types/withdrawal.js";
|
18
|
-
import {
|
18
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
19
19
|
|
20
20
|
export type EstimateInitiateMNTWithdrawalGasParameters<
|
21
21
|
chain extends Chain | undefined = Chain | undefined,
|
@@ -77,7 +77,7 @@ export async function estimateInitiateMNTWithdrawalGas<
|
|
77
77
|
request: { amount, to },
|
78
78
|
} = parameters;
|
79
79
|
|
80
|
-
const { functionName, args } =
|
80
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
81
81
|
type: "mnt",
|
82
82
|
amount,
|
83
83
|
to,
|
@@ -14,7 +14,7 @@ import { contracts } from "../contracts.js";
|
|
14
14
|
import type { ErrorType } from "../errors/utils.js";
|
15
15
|
import type { GetAccountParameter } from "../types/account.js";
|
16
16
|
import type { InitiateERC20WithdrawalRequest } from "../types/withdrawal.js";
|
17
|
-
import {
|
17
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
18
18
|
|
19
19
|
export type InitiateERC20WithdrawalParameters<
|
20
20
|
chain extends Chain | undefined = Chain | undefined,
|
@@ -68,12 +68,12 @@ export async function initiateERC20Withdrawal<
|
|
68
68
|
maxFeePerGas,
|
69
69
|
maxPriorityFeePerGas,
|
70
70
|
nonce,
|
71
|
-
request: { amount, to },
|
71
|
+
request: { amount, to, l2Token },
|
72
72
|
} = parameters;
|
73
73
|
|
74
|
-
const { functionName, args } =
|
74
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
75
75
|
type: "erc20",
|
76
|
-
l2Token
|
76
|
+
l2Token,
|
77
77
|
amount,
|
78
78
|
to,
|
79
79
|
});
|
@@ -14,7 +14,7 @@ import { contracts } from "../contracts.js";
|
|
14
14
|
import type { ErrorType } from "../errors/utils.js";
|
15
15
|
import type { GetAccountParameter } from "../types/account.js";
|
16
16
|
import type { InitiateETHWithdrawalRequest } from "../types/withdrawal.js";
|
17
|
-
import {
|
17
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
18
18
|
|
19
19
|
export type InitiateETHWithdrawalParameters<
|
20
20
|
chain extends Chain | undefined = Chain | undefined,
|
@@ -69,7 +69,7 @@ export async function initiateETHWithdrawal<
|
|
69
69
|
request: { amount, to },
|
70
70
|
} = parameters;
|
71
71
|
|
72
|
-
const { functionName, args } =
|
72
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
73
73
|
type: "eth",
|
74
74
|
amount,
|
75
75
|
to,
|
@@ -14,7 +14,7 @@ import { contracts } from "../contracts.js";
|
|
14
14
|
import type { ErrorType } from "../errors/utils.js";
|
15
15
|
import type { GetAccountParameter } from "../types/account.js";
|
16
16
|
import type { InitiateMNTWithdrawalRequest } from "../types/withdrawal.js";
|
17
|
-
import {
|
17
|
+
import { parseInitWithdrawRequest } from "../utils/parseInitWithdrawRequest.js";
|
18
18
|
|
19
19
|
export type InitiateMNTWithdrawalParameters<
|
20
20
|
chain extends Chain | undefined = Chain | undefined,
|
@@ -69,7 +69,7 @@ export async function initiateMNTWithdrawal<
|
|
69
69
|
request: { amount, to },
|
70
70
|
} = parameters;
|
71
71
|
|
72
|
-
const { functionName, args } =
|
72
|
+
const { functionName, args } = parseInitWithdrawRequest({
|
73
73
|
type: "mnt",
|
74
74
|
amount,
|
75
75
|
to,
|