@safe-global/relay-kit 3.4.1-alpha.0 → 3.4.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.
Files changed (76) hide show
  1. package/dist/src/RelayKitBasePack.d.ts +0 -1
  2. package/dist/src/RelayKitBasePack.js +26 -0
  3. package/dist/src/RelayKitBasePack.js.map +1 -0
  4. package/dist/src/constants.d.ts +0 -1
  5. package/dist/src/constants.js +12 -0
  6. package/dist/src/constants.js.map +1 -0
  7. package/dist/src/deprecated.d.ts +0 -1
  8. package/dist/src/deprecated.js +3 -0
  9. package/dist/src/deprecated.js.map +1 -0
  10. package/dist/src/index.d.ts +0 -2
  11. package/dist/src/index.js +30 -0
  12. package/dist/src/index.js.map +1 -0
  13. package/dist/src/packs/gelato/GelatoRelayPack.d.ts +0 -1
  14. package/dist/src/packs/gelato/GelatoRelayPack.js +327 -0
  15. package/dist/src/packs/gelato/GelatoRelayPack.js.map +1 -0
  16. package/dist/src/packs/gelato/types.d.ts +0 -1
  17. package/dist/src/packs/gelato/types.js +3 -0
  18. package/dist/src/packs/gelato/types.js.map +1 -0
  19. package/dist/src/packs/safe-4337/Safe4337Pack.d.ts +0 -1
  20. package/dist/src/packs/safe-4337/Safe4337Pack.js +644 -0
  21. package/dist/src/packs/safe-4337/Safe4337Pack.js.map +1 -0
  22. package/dist/src/packs/safe-4337/SafeOperation.d.ts +0 -1
  23. package/dist/src/packs/safe-4337/SafeOperation.js +68 -0
  24. package/dist/src/packs/safe-4337/SafeOperation.js.map +1 -0
  25. package/dist/src/packs/safe-4337/constants.d.ts +0 -1
  26. package/dist/src/packs/safe-4337/constants.js +55 -0
  27. package/dist/src/packs/safe-4337/constants.js.map +1 -0
  28. package/dist/src/packs/safe-4337/estimators/PimlicoFeeEstimator.d.ts +0 -1
  29. package/dist/src/packs/safe-4337/estimators/PimlicoFeeEstimator.js +49 -0
  30. package/dist/src/packs/safe-4337/estimators/PimlicoFeeEstimator.js.map +1 -0
  31. package/dist/src/packs/safe-4337/estimators/index.d.ts +0 -1
  32. package/dist/src/packs/safe-4337/estimators/index.js +6 -0
  33. package/dist/src/packs/safe-4337/estimators/index.js.map +1 -0
  34. package/dist/{test-utils → src/packs/safe-4337/testing-utils}/fixtures.d.ts +6 -7
  35. package/dist/src/packs/safe-4337/testing-utils/fixtures.js +128 -0
  36. package/dist/src/packs/safe-4337/testing-utils/fixtures.js.map +1 -0
  37. package/dist/{test-utils → src/packs/safe-4337/testing-utils}/helpers.d.ts +2 -3
  38. package/dist/src/packs/safe-4337/testing-utils/helpers.js +58 -0
  39. package/dist/src/packs/safe-4337/testing-utils/helpers.js.map +1 -0
  40. package/dist/src/packs/safe-4337/types.d.ts +0 -1
  41. package/dist/src/packs/safe-4337/types.js +3 -0
  42. package/dist/src/packs/safe-4337/types.js.map +1 -0
  43. package/dist/src/packs/safe-4337/utils/entrypoint.d.ts +0 -1
  44. package/dist/src/packs/safe-4337/utils/entrypoint.js +23 -0
  45. package/dist/src/packs/safe-4337/utils/entrypoint.js.map +1 -0
  46. package/dist/src/packs/safe-4337/utils/getRelayKitVersion.d.ts +0 -1
  47. package/dist/src/packs/safe-4337/utils/getRelayKitVersion.js +6 -0
  48. package/dist/src/packs/safe-4337/utils/getRelayKitVersion.js.map +1 -0
  49. package/dist/src/packs/safe-4337/utils.d.ts +0 -1
  50. package/dist/src/packs/safe-4337/utils.js +190 -0
  51. package/dist/src/packs/safe-4337/utils.js.map +1 -0
  52. package/dist/tsconfig.build.tsbuildinfo +1 -1
  53. package/package.json +7 -23
  54. package/dist/cjs/src/index.cjs +0 -1323
  55. package/dist/cjs/test-utils/index.cjs +0 -1171
  56. package/dist/esm/src/index.mjs +0 -1326
  57. package/dist/esm/test-utils/index.mjs +0 -1172
  58. package/dist/src/RelayKitBasePack.d.ts.map +0 -1
  59. package/dist/src/constants.d.ts.map +0 -1
  60. package/dist/src/deprecated.d.ts.map +0 -1
  61. package/dist/src/index.d.ts.map +0 -1
  62. package/dist/src/packs/gelato/GelatoRelayPack.d.ts.map +0 -1
  63. package/dist/src/packs/gelato/types.d.ts.map +0 -1
  64. package/dist/src/packs/safe-4337/Safe4337Pack.d.ts.map +0 -1
  65. package/dist/src/packs/safe-4337/SafeOperation.d.ts.map +0 -1
  66. package/dist/src/packs/safe-4337/constants.d.ts.map +0 -1
  67. package/dist/src/packs/safe-4337/estimators/PimlicoFeeEstimator.d.ts.map +0 -1
  68. package/dist/src/packs/safe-4337/estimators/index.d.ts.map +0 -1
  69. package/dist/src/packs/safe-4337/types.d.ts.map +0 -1
  70. package/dist/src/packs/safe-4337/utils/entrypoint.d.ts.map +0 -1
  71. package/dist/src/packs/safe-4337/utils/getRelayKitVersion.d.ts.map +0 -1
  72. package/dist/src/packs/safe-4337/utils.d.ts.map +0 -1
  73. package/dist/test-utils/fixtures.d.ts.map +0 -1
  74. package/dist/test-utils/helpers.d.ts.map +0 -1
  75. package/dist/test-utils/index.d.ts +0 -4
  76. package/dist/test-utils/index.d.ts.map +0 -1
@@ -62,4 +62,3 @@ export declare abstract class RelayKitBasePack<T extends RelayKitBasePackTypes =
62
62
  abstract executeTransaction(props: T['ExecuteTransactionProps']): Promise<T['ExecuteTransactionResult']>;
63
63
  }
64
64
  export {};
65
- //# sourceMappingURL=RelayKitBasePack.d.ts.map
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RelayKitBasePack = void 0;
4
+ /**
5
+ * Abstract class. The base class for all RelayKit packs.
6
+ * It provides the Safe SDK instance and the abstract methods to be implemented by the packs.
7
+ * @abstract
8
+ * @template EstimateFeeProps
9
+ * @template EstimateFeeResult
10
+ * @template CreateTransactionProps
11
+ * @template CreateTransactionResult,
12
+ * @template ExecuteTransactionProps
13
+ * @template ExecuteTransactionResult
14
+ */
15
+ class RelayKitBasePack {
16
+ /**
17
+ * Creates a new RelayKitBasePack instance.
18
+ * The packs implemented using our SDK should extend this class and therefore provide a Safe SDK instance
19
+ * @param {Safe} protocolKit - The Safe SDK instance
20
+ */
21
+ constructor(protocolKit) {
22
+ this.protocolKit = protocolKit;
23
+ }
24
+ }
25
+ exports.RelayKitBasePack = RelayKitBasePack;
26
+ //# sourceMappingURL=RelayKitBasePack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RelayKitBasePack.js","sourceRoot":"","sources":["../../src/RelayKitBasePack.ts"],"names":[],"mappings":";;;AAqBA;;;;;;;;;;GAUG;AACH,MAAsB,gBAAgB;IAQpC;;;;OAIG;IACH,YAAY,WAAiB;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAChC,CAAC;CA6BF;AA5CD,4CA4CC"}
@@ -4,4 +4,3 @@ export declare const GELATO_RELAY_URL = "https://relay.gelato.digital";
4
4
  export declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
5
5
  export declare const GELATO_GAS_EXECUTION_OVERHEAD = 150000;
6
6
  export declare const GELATO_TRANSFER_GAS_COST = 15000;
7
- //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GELATO_TRANSFER_GAS_COST = exports.GELATO_GAS_EXECUTION_OVERHEAD = exports.ZERO_ADDRESS = exports.GELATO_RELAY_URL = exports.GELATO_FEE_COLLECTOR = exports.GELATO_NATIVE_TOKEN_ADDRESS = void 0;
4
+ exports.GELATO_NATIVE_TOKEN_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE';
5
+ exports.GELATO_FEE_COLLECTOR = '0x3AC05161b76a35c1c28dC99Aa01BEd7B24cEA3bf';
6
+ exports.GELATO_RELAY_URL = 'https://relay.gelato.digital';
7
+ exports.ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
8
+ // see: https://docs.gelato.network/developer-services/relay/quick-start/optional-parameters#optional-parameters
9
+ exports.GELATO_GAS_EXECUTION_OVERHEAD = 150000;
10
+ // gas cost of the separate ERC20 transfer to pay the fees to the Gelato relayer
11
+ exports.GELATO_TRANSFER_GAS_COST = 15000;
12
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,2BAA2B,GAAG,4CAA4C,CAAA;AAE1E,QAAA,oBAAoB,GAAG,4CAA4C,CAAA;AAEnE,QAAA,gBAAgB,GAAG,8BAA8B,CAAA;AAEjD,QAAA,YAAY,GAAG,4CAA4C,CAAA;AAExE,gHAAgH;AACnG,QAAA,6BAA6B,GAAG,MAAO,CAAA;AAEpD,gFAAgF;AACnE,QAAA,wBAAwB,GAAG,KAAM,CAAA"}
@@ -11,4 +11,3 @@ SafeUserOperation,
11
11
  * @deprecated Please import { UserOperation } from @safe-global/types-kit
12
12
  */
13
13
  UserOperation } from '@safe-global/types-kit';
14
- //# sourceMappingURL=deprecated.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=deprecated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../src/deprecated.ts"],"names":[],"mappings":""}
@@ -5,11 +5,9 @@ export * from './packs/safe-4337/Safe4337Pack';
5
5
  export { default as EthSafeOperation } from './packs/safe-4337/SafeOperation';
6
6
  export * from './packs/safe-4337/estimators';
7
7
  export * from './packs/safe-4337/types';
8
- export * from './packs/safe-4337/utils';
9
8
  export * from './RelayKitBasePack';
10
9
  declare module 'abitype' {
11
10
  interface Register {
12
11
  AddressType: string;
13
12
  }
14
13
  }
15
- //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.EthSafeOperation = void 0;
21
+ __exportStar(require("./deprecated"), exports);
22
+ __exportStar(require("./packs/gelato/GelatoRelayPack"), exports);
23
+ __exportStar(require("./packs/gelato/types"), exports);
24
+ __exportStar(require("./packs/safe-4337/Safe4337Pack"), exports);
25
+ var SafeOperation_1 = require("./packs/safe-4337/SafeOperation");
26
+ Object.defineProperty(exports, "EthSafeOperation", { enumerable: true, get: function () { return __importDefault(SafeOperation_1).default; } });
27
+ __exportStar(require("./packs/safe-4337/estimators"), exports);
28
+ __exportStar(require("./packs/safe-4337/types"), exports);
29
+ __exportStar(require("./RelayKitBasePack"), exports);
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,+CAA4B;AAE5B,iEAA8C;AAC9C,uDAAoC;AAEpC,iEAA8C;AAC9C,iEAA6E;AAApE,kIAAA,OAAO,OAAoB;AAEpC,+DAA4C;AAC5C,0DAAuC;AAEvC,qDAAkC"}
@@ -101,4 +101,3 @@ export declare class GelatoRelayPack extends RelayKitBasePack<{
101
101
  */
102
102
  executeTransaction({ executable: safeTransaction, options }: GelatoExecuteTransactionProps): Promise<RelayResponse>;
103
103
  }
104
- //# sourceMappingURL=GelatoRelayPack.d.ts.map
@@ -0,0 +1,327 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _GelatoRelayPack_gelatoRelay, _GelatoRelayPack_apiKey;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.GelatoRelayPack = void 0;
16
+ const relay_sdk_1 = require("@gelatonetwork/relay-sdk");
17
+ const protocol_kit_1 = require("@safe-global/protocol-kit");
18
+ const RelayKitBasePack_1 = require("../../RelayKitBasePack");
19
+ const constants_1 = require("../../constants");
20
+ class GelatoRelayPack extends RelayKitBasePack_1.RelayKitBasePack {
21
+ constructor({ apiKey, protocolKit }) {
22
+ super(protocolKit);
23
+ _GelatoRelayPack_gelatoRelay.set(this, void 0);
24
+ _GelatoRelayPack_apiKey.set(this, void 0);
25
+ __classPrivateFieldSet(this, _GelatoRelayPack_gelatoRelay, new relay_sdk_1.GelatoRelay(), "f");
26
+ __classPrivateFieldSet(this, _GelatoRelayPack_apiKey, apiKey, "f");
27
+ }
28
+ _getFeeToken(gasToken) {
29
+ return !gasToken || gasToken === constants_1.ZERO_ADDRESS ? constants_1.GELATO_NATIVE_TOKEN_ADDRESS : gasToken;
30
+ }
31
+ getFeeCollector() {
32
+ return constants_1.GELATO_FEE_COLLECTOR;
33
+ }
34
+ async getEstimateFee(propsOrChainId, inputGasLimit, inputGasToken) {
35
+ let chainId;
36
+ let gasLimit;
37
+ let gasToken;
38
+ if (typeof propsOrChainId === 'object') {
39
+ ;
40
+ ({ chainId, gasLimit, gasToken } = propsOrChainId);
41
+ }
42
+ else {
43
+ chainId = propsOrChainId;
44
+ gasLimit = inputGasLimit;
45
+ gasToken = inputGasToken;
46
+ }
47
+ const feeToken = this._getFeeToken(gasToken);
48
+ const estimation = await __classPrivateFieldGet(this, _GelatoRelayPack_gelatoRelay, "f").getEstimatedFee(chainId, feeToken, BigInt(gasLimit), false);
49
+ return estimation.toString();
50
+ }
51
+ async getTaskStatus(taskId) {
52
+ return __classPrivateFieldGet(this, _GelatoRelayPack_gelatoRelay, "f").getTaskStatus(taskId);
53
+ }
54
+ /**
55
+ * Creates a payment transaction to Gelato
56
+ *
57
+ * @private
58
+ * @async
59
+ * @function
60
+ * @param {string} gas - The gas amount for the payment.
61
+ * @param {MetaTransactionOptions} options - Options for the meta transaction.
62
+ * @returns {Promise<Transaction>} Promise object representing the created payment transaction.
63
+ *
64
+ */
65
+ async createPaymentToGelato(gas, options) {
66
+ const chainId = await this.protocolKit.getChainId();
67
+ const gelatoAddress = this.getFeeCollector();
68
+ const gasToken = options.gasToken ?? constants_1.ZERO_ADDRESS;
69
+ const paymentToGelato = await this.getEstimateFee({ chainId, gasLimit: gas, gasToken });
70
+ // The Gelato payment transaction
71
+ const transferToGelato = (0, protocol_kit_1.createERC20TokenTransferTransaction)(gasToken, gelatoAddress, paymentToGelato);
72
+ return transferToGelato;
73
+ }
74
+ /**
75
+ * @deprecated Use createTransaction instead
76
+ */
77
+ async createRelayedTransaction({ transactions, onlyCalls = false, options = {} }) {
78
+ return this.createTransaction({ transactions, onlyCalls, options });
79
+ }
80
+ /**
81
+ * Creates a Safe transaction designed to be executed using the Gelato Relayer.
82
+ *
83
+ * @param {GelatoCreateTransactionProps} options - Options for Gelato.
84
+ * @param {MetaTransactionData[]} [options.transactions] - The transactions batch.
85
+ * @param {boolean} [options.onlyCalls=false] - If true, MultiSendCallOnly contract should be used. Remember to not use delegate calls in the batch.
86
+ * @param {MetaTransactionOptions} [options.options={}] - Gas Options for the transaction batch.
87
+ * @returns {Promise<SafeTransaction>} Returns a Promise that resolves with a SafeTransaction object.
88
+ */
89
+ async createTransaction({ transactions, onlyCalls = false, options = {} }) {
90
+ const { isSponsored = false } = options;
91
+ if (isSponsored) {
92
+ const nonce = await this.protocolKit.getNonce();
93
+ const sponsoredTransaction = await this.protocolKit.createTransaction({
94
+ transactions,
95
+ onlyCalls,
96
+ options: {
97
+ nonce
98
+ }
99
+ });
100
+ return sponsoredTransaction;
101
+ }
102
+ // If the ERC20 gas token does not follow the standard 18 decimals, we cannot use handlePayment to pay Gelato fees.
103
+ const gasToken = options.gasToken ?? constants_1.ZERO_ADDRESS;
104
+ const isGasTokenCompatible = await (0, protocol_kit_1.isGasTokenCompatibleWithHandlePayment)(gasToken, this.protocolKit);
105
+ if (!isGasTokenCompatible) {
106
+ // if the ERC20 gas token is not compatible (less than 18 decimals like USDC), a separate transfer is required to pay Gelato fees.
107
+ return this.createTransactionWithTransfer({ transactions, onlyCalls, options });
108
+ }
109
+ // If the gas token is compatible (Native token or standard ERC20), we use handlePayment function present in the Safe contract to pay Gelato fees
110
+ return this.createTransactionWithHandlePayment({ transactions, onlyCalls, options });
111
+ }
112
+ /**
113
+ * Creates a Safe transaction designed to be executed using the Gelato Relayer and
114
+ * uses the handlePayment function defined in the Safe contract to pay the fees
115
+ * to the Gelato relayer.
116
+ *
117
+ * @async
118
+ * @function createTransactionWithHandlePayment
119
+ * @param {GelatoCreateTransactionProps} options - Options for Gelato.
120
+ * @param {MetaTransactionData[]} [options.transactions] - The transactions batch.
121
+ * @param {boolean} [options.onlyCalls=false] - If true, MultiSendCallOnly contract should be used. Remember to not use delegate calls in the batch.
122
+ * @param {MetaTransactionOptions} [options.options={}] - Gas Options for the transaction batch.
123
+ * @returns {Promise<SafeTransaction>} Returns a promise that resolves to the created SafeTransaction.
124
+ * @private
125
+ */
126
+ async createTransactionWithHandlePayment({ transactions, onlyCalls = false, options = {} }) {
127
+ const { gasLimit } = options;
128
+ const nonce = await this.protocolKit.getNonce();
129
+ // this transaction is only used for gas estimations
130
+ const transactionToEstimateGas = await this.protocolKit.createTransaction({
131
+ transactions,
132
+ onlyCalls,
133
+ options: {
134
+ nonce
135
+ }
136
+ });
137
+ // as we set gasPrice to 1, safeTxGas is set to a non-zero value to prevent transaction failure due to out-of-gas errors. value see: https://github.com/safe-global/safe-contracts/blob/main/contracts/Safe.sol#L203
138
+ const gasPrice = '1';
139
+ const safeTxGas = await (0, protocol_kit_1.estimateSafeTxGas)(this.protocolKit, transactionToEstimateGas);
140
+ const gasToken = options.gasToken ?? constants_1.ZERO_ADDRESS;
141
+ const refundReceiver = this.getFeeCollector();
142
+ const chainId = await this.protocolKit.getChainId();
143
+ // if a custom gasLimit is provided, we do not need to estimate the gas cost
144
+ if (gasLimit) {
145
+ const paymentToGelato = await this.getEstimateFee({ chainId, gasLimit, gasToken });
146
+ const syncTransaction = await this.protocolKit.createTransaction({
147
+ transactions,
148
+ onlyCalls,
149
+ options: {
150
+ baseGas: paymentToGelato,
151
+ gasPrice,
152
+ safeTxGas,
153
+ gasToken,
154
+ refundReceiver,
155
+ nonce
156
+ }
157
+ });
158
+ return syncTransaction;
159
+ }
160
+ // If gasLimit is not provided, we need to estimate the gas cost.
161
+ const baseGas = await (0, protocol_kit_1.estimateTxBaseGas)(this.protocolKit, transactionToEstimateGas);
162
+ const safeDeploymentGasCost = await (0, protocol_kit_1.estimateSafeDeploymentGas)(this.protocolKit);
163
+ const totalGas = Number(baseGas) + // baseGas
164
+ Number(safeTxGas) + // safeTxGas
165
+ Number(safeDeploymentGasCost) + // Safe deploymet gas cost if it is required
166
+ constants_1.GELATO_GAS_EXECUTION_OVERHEAD; // Gelato execution overhead
167
+ const paymentToGelato = await this.getEstimateFee({
168
+ chainId,
169
+ gasLimit: String(totalGas),
170
+ gasToken
171
+ });
172
+ const syncTransaction = await this.protocolKit.createTransaction({
173
+ transactions,
174
+ onlyCalls,
175
+ options: {
176
+ baseGas: paymentToGelato, // payment to Gelato
177
+ gasPrice,
178
+ safeTxGas,
179
+ gasToken,
180
+ refundReceiver,
181
+ nonce
182
+ }
183
+ });
184
+ return syncTransaction;
185
+ }
186
+ /**
187
+ * Creates a Safe transaction designed to be executed using the Gelato Relayer and
188
+ * uses a separate ERC20 transfer to pay the fees to the Gelato relayer.
189
+ *
190
+ * @async
191
+ * @function createTransactionWithTransfer
192
+ * @param {GelatoCreateTransactionProps} options - Options for Gelato.
193
+ * @param {MetaTransactionData[]} [options.transactions] - The transactions batch.
194
+ * @param {boolean} [options.onlyCalls=false] - If true, MultiSendCallOnly contract should be used. Remember to not use delegate calls in the batch.
195
+ * @param {MetaTransactionOptions} [options.options={}] - Gas Options for the transaction batch.
196
+ * @returns {Promise<SafeTransaction>} Returns a promise that resolves to the created SafeTransaction.
197
+ * @private
198
+ */
199
+ async createTransactionWithTransfer({ transactions, onlyCalls = false, options = {} }) {
200
+ const { gasLimit } = options;
201
+ const nonce = await this.protocolKit.getNonce();
202
+ const gasToken = options.gasToken ?? constants_1.ZERO_ADDRESS;
203
+ // if a custom gasLimit is provided, we do not need to estimate the gas cost
204
+ if (gasLimit) {
205
+ const transferToGelato = await this.createPaymentToGelato(gasLimit, options);
206
+ const syncTransaction = await this.protocolKit.createTransaction({
207
+ transactions: [...transactions, transferToGelato],
208
+ onlyCalls,
209
+ options: {
210
+ nonce,
211
+ gasToken
212
+ }
213
+ });
214
+ return syncTransaction;
215
+ }
216
+ // If gasLimit is not provided, we need to estimate the gas cost.
217
+ // this transaction is only used for gas estimations
218
+ const transactionToEstimateGas = await this.protocolKit.createTransaction({
219
+ transactions,
220
+ onlyCalls,
221
+ options: {
222
+ nonce
223
+ }
224
+ });
225
+ const safeTxGas = await (0, protocol_kit_1.estimateSafeTxGas)(this.protocolKit, transactionToEstimateGas);
226
+ const baseGas = await (0, protocol_kit_1.estimateTxBaseGas)(this.protocolKit, transactionToEstimateGas);
227
+ const safeDeploymentGasCost = await (0, protocol_kit_1.estimateSafeDeploymentGas)(this.protocolKit);
228
+ const totalGas = Number(baseGas) + // baseGas
229
+ Number(safeTxGas) + // safeTxGas without Gelato payment transfer
230
+ Number(safeDeploymentGasCost) + // Safe deploymet gas cost if it is required
231
+ constants_1.GELATO_TRANSFER_GAS_COST + // Gelato payment transfer
232
+ constants_1.GELATO_GAS_EXECUTION_OVERHEAD; // Gelato execution overhead
233
+ const transferToGelato = await this.createPaymentToGelato(String(totalGas), options);
234
+ const syncTransaction = await this.protocolKit.createTransaction({
235
+ transactions: [...transactions, transferToGelato],
236
+ onlyCalls,
237
+ options: {
238
+ nonce,
239
+ gasToken
240
+ }
241
+ });
242
+ return syncTransaction;
243
+ }
244
+ async sendSponsorTransaction(target, encodedTransaction, chainId) {
245
+ if (!__classPrivateFieldGet(this, _GelatoRelayPack_apiKey, "f")) {
246
+ throw new Error('API key not defined');
247
+ }
248
+ const request = {
249
+ chainId,
250
+ target,
251
+ data: encodedTransaction
252
+ };
253
+ const response = await __classPrivateFieldGet(this, _GelatoRelayPack_gelatoRelay, "f").sponsoredCall(request, __classPrivateFieldGet(this, _GelatoRelayPack_apiKey, "f"));
254
+ return response;
255
+ }
256
+ async sendSyncTransaction(target, encodedTransaction, chainId, options) {
257
+ const { gasLimit, gasToken } = options;
258
+ const feeToken = this._getFeeToken(gasToken);
259
+ const request = {
260
+ chainId,
261
+ target,
262
+ data: encodedTransaction,
263
+ feeToken,
264
+ isRelayContext: false
265
+ };
266
+ const relayRequestOptions = {
267
+ gasLimit: gasLimit ? BigInt(gasLimit) : undefined
268
+ };
269
+ const response = await __classPrivateFieldGet(this, _GelatoRelayPack_gelatoRelay, "f").callWithSyncFee(request, relayRequestOptions);
270
+ return response;
271
+ }
272
+ async relayTransaction({ target, encodedTransaction, chainId, options = {} }) {
273
+ const response = options.isSponsored
274
+ ? this.sendSponsorTransaction(target, encodedTransaction, chainId)
275
+ : this.sendSyncTransaction(target, encodedTransaction, chainId, options);
276
+ return response;
277
+ }
278
+ /**
279
+ * @deprecated Use executeTransaction instead
280
+ */
281
+ async executeRelayTransaction(safeTransaction, options) {
282
+ return this.executeTransaction({ executable: safeTransaction, options });
283
+ }
284
+ /**
285
+ * Sends the Safe transaction to the Gelato Relayer for execution.
286
+ * If the Safe is not deployed, it creates a batch of transactions including the Safe deployment transaction.
287
+ *
288
+ * @param {GelatoExecuteTransactionProps} props - Execution props
289
+ * @param {SafeTransaction} props.executable - The Safe transaction to be executed.
290
+ * @param {MetaTransactionOptions} props.options - Options for the transaction.
291
+ * @returns {Promise<RelayResponse>} Returns a Promise that resolves with a RelayResponse object.
292
+ */
293
+ async executeTransaction({ executable: safeTransaction, options }) {
294
+ const isSafeDeployed = await this.protocolKit.isSafeDeployed();
295
+ const chainId = await this.protocolKit.getChainId();
296
+ const safeAddress = await this.protocolKit.getAddress();
297
+ const safeTransactionEncodedData = await this.protocolKit.getEncodedTransaction(safeTransaction);
298
+ const gasToken = options?.gasToken || safeTransaction.data.gasToken;
299
+ if (isSafeDeployed) {
300
+ const relayTransaction = {
301
+ target: safeAddress,
302
+ encodedTransaction: safeTransactionEncodedData,
303
+ chainId,
304
+ options: {
305
+ ...options,
306
+ gasToken
307
+ }
308
+ };
309
+ return this.relayTransaction(relayTransaction);
310
+ }
311
+ // if the Safe is not deployed we create a batch with the Safe deployment transaction and the provided Safe transaction
312
+ const safeDeploymentBatch = await this.protocolKit.wrapSafeTransactionIntoDeploymentBatch(safeTransaction);
313
+ const relayTransaction = {
314
+ target: safeDeploymentBatch.to, // multiSend Contract address
315
+ encodedTransaction: safeDeploymentBatch.data,
316
+ chainId,
317
+ options: {
318
+ ...options,
319
+ gasToken
320
+ }
321
+ };
322
+ return this.relayTransaction(relayTransaction);
323
+ }
324
+ }
325
+ exports.GelatoRelayPack = GelatoRelayPack;
326
+ _GelatoRelayPack_gelatoRelay = new WeakMap(), _GelatoRelayPack_apiKey = new WeakMap();
327
+ //# sourceMappingURL=GelatoRelayPack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GelatoRelayPack.js","sourceRoot":"","sources":["../../../../src/packs/gelato/GelatoRelayPack.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wDAOiC;AACjC,4DAMkC;AAClC,8EAA0E;AAC1E,gEAMyC;AAgBzC,MAAa,eAAgB,SAAQ,mCAOnC;IAIA,YAAY,EAAE,MAAM,EAAE,WAAW,EAAiB;QAChD,KAAK,CAAC,WAAW,CAAC,CAAA;QAJpB,+CAAgC;QAChC,0CAAgB;QAId,uBAAA,IAAI,gCAAgB,IAAI,uBAAkB,EAAE,MAAA,CAAA;QAE5C,uBAAA,IAAI,2BAAW,MAAM,MAAA,CAAA;IACvB,CAAC;IAEO,YAAY,CAAC,QAAiB;QACpC,OAAO,CAAC,QAAQ,IAAI,QAAQ,KAAK,wBAAY,CAAC,CAAC,CAAC,uCAA2B,CAAC,CAAC,CAAC,QAAQ,CAAA;IACxF,CAAC;IAED,eAAe;QACb,OAAO,gCAAoB,CAAA;IAC7B,CAAC;IAeD,KAAK,CAAC,cAAc,CAClB,cAA+C,EAC/C,aAAsB,EACtB,aAAsB;QAEtB,IAAI,OAAe,CAAA;QACnB,IAAI,QAAgB,CAAA;QACpB,IAAI,QAA4B,CAAA;QAEhC,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE,CAAC;YACvC,CAAC;YAAA,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC,CAAA;QACrD,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,cAAc,CAAA;YACxB,QAAQ,GAAG,aAAuB,CAAA;YAClC,QAAQ,GAAG,aAAa,CAAA;QAC1B,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,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AC,cAAc,EAAE,CAAA;QAC9D,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAA;QACnD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAA;QACvD,MAAM,0BAA0B,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAA;QAEhG,MAAM,QAAQ,GAAG,OAAO,EAAE,QAAQ,IAAI,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAA;QAEnE,IAAI,cAAc,EAAE,CAAC;YACnB,MAAM,gBAAgB,GAAqB;gBACzC,MAAM,EAAE,WAAW;gBACnB,kBAAkB,EAAE,0BAA0B;gBAC9C,OAAO;gBACP,OAAO,EAAE;oBACP,GAAG,OAAO;oBACV,QAAQ;iBACT;aACF,CAAA;YAED,OAAO,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;QAChD,CAAC;QAED,uHAAuH;QACvH,MAAM,mBAAmB,GACvB,MAAM,IAAI,CAAC,WAAW,CAAC,sCAAsC,CAAC,eAAe,CAAC,CAAA;QAEhF,MAAM,gBAAgB,GAAqB;YACzC,MAAM,EAAE,mBAAmB,CAAC,EAAE,EAAE,6BAA6B;YAC7D,kBAAkB,EAAE,mBAAmB,CAAC,IAAI;YAC5C,OAAO;YACP,OAAO,EAAE;gBACP,GAAG,OAAO;gBACV,QAAQ;aACT;SACF,CAAA;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;IAChD,CAAC;CACF;AArbD,0CAqbC"}
@@ -21,4 +21,3 @@ export type GelatoExecuteTransactionProps = {
21
21
  executable: SafeTransaction;
22
22
  options?: MetaTransactionOptions;
23
23
  };
24
- //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/packs/gelato/types.ts"],"names":[],"mappings":""}
@@ -104,4 +104,3 @@ export declare class Safe4337Pack extends RelayKitBasePack<{
104
104
  getChainId(): Promise<string>;
105
105
  getOnchainIdentifier(): string;
106
106
  }
107
- //# sourceMappingURL=Safe4337Pack.d.ts.map