@rhinestone/relayer-sdk 0.1.0 → 0.2.0
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/adapters.d.ts +296 -0
- package/dist/adapters.d.ts.map +1 -1
- package/dist/adapters.js +1 -0
- package/dist/rebalancing.d.ts.map +1 -1
- package/dist/rebalancing.js +2 -2
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +1 -0
- package/dist/standaloneExecutor.d.ts +16 -0
- package/dist/standaloneExecutor.d.ts.map +1 -0
- package/dist/standaloneExecutor.js +40 -0
- package/package.json +2 -2
package/dist/adapters.d.ts
CHANGED
|
@@ -3982,6 +3982,302 @@ export declare const adapters: {
|
|
|
3982
3982
|
readonly internalType: "uint256";
|
|
3983
3983
|
}];
|
|
3984
3984
|
}];
|
|
3985
|
+
readonly intentExecutorWithGasRefundAbi: readonly [{
|
|
3986
|
+
readonly type: "constructor";
|
|
3987
|
+
readonly inputs: readonly [{
|
|
3988
|
+
readonly name: "router";
|
|
3989
|
+
readonly type: "address";
|
|
3990
|
+
readonly internalType: "address";
|
|
3991
|
+
}, {
|
|
3992
|
+
readonly name: "executor";
|
|
3993
|
+
readonly type: "address";
|
|
3994
|
+
readonly internalType: "address";
|
|
3995
|
+
}];
|
|
3996
|
+
readonly stateMutability: "nonpayable";
|
|
3997
|
+
}, {
|
|
3998
|
+
readonly type: "function";
|
|
3999
|
+
readonly name: "ADAPTER_TAG";
|
|
4000
|
+
readonly inputs: readonly [];
|
|
4001
|
+
readonly outputs: readonly [{
|
|
4002
|
+
readonly name: "";
|
|
4003
|
+
readonly type: "bytes12";
|
|
4004
|
+
readonly internalType: "bytes12";
|
|
4005
|
+
}];
|
|
4006
|
+
readonly stateMutability: "pure";
|
|
4007
|
+
}, {
|
|
4008
|
+
readonly type: "function";
|
|
4009
|
+
readonly name: "ARBITER";
|
|
4010
|
+
readonly inputs: readonly [];
|
|
4011
|
+
readonly outputs: readonly [{
|
|
4012
|
+
readonly name: "";
|
|
4013
|
+
readonly type: "address";
|
|
4014
|
+
readonly internalType: "address";
|
|
4015
|
+
}];
|
|
4016
|
+
readonly stateMutability: "view";
|
|
4017
|
+
}, {
|
|
4018
|
+
readonly type: "function";
|
|
4019
|
+
readonly name: "_ROUTER";
|
|
4020
|
+
readonly inputs: readonly [];
|
|
4021
|
+
readonly outputs: readonly [{
|
|
4022
|
+
readonly name: "";
|
|
4023
|
+
readonly type: "address";
|
|
4024
|
+
readonly internalType: "address";
|
|
4025
|
+
}];
|
|
4026
|
+
readonly stateMutability: "view";
|
|
4027
|
+
}, {
|
|
4028
|
+
readonly type: "function";
|
|
4029
|
+
readonly name: "handleFill_intentExecutor_executeMultichainOps_gasRefund";
|
|
4030
|
+
readonly inputs: readonly [{
|
|
4031
|
+
readonly name: "ops";
|
|
4032
|
+
readonly type: "tuple";
|
|
4033
|
+
readonly internalType: "struct IStandaloneIntentExecutor.MultiChainOps";
|
|
4034
|
+
readonly components: readonly [{
|
|
4035
|
+
readonly name: "account";
|
|
4036
|
+
readonly type: "address";
|
|
4037
|
+
readonly internalType: "address";
|
|
4038
|
+
}, {
|
|
4039
|
+
readonly name: "chainIndex";
|
|
4040
|
+
readonly type: "uint256";
|
|
4041
|
+
readonly internalType: "uint256";
|
|
4042
|
+
}, {
|
|
4043
|
+
readonly name: "otherChains";
|
|
4044
|
+
readonly type: "bytes32[]";
|
|
4045
|
+
readonly internalType: "bytes32[]";
|
|
4046
|
+
}, {
|
|
4047
|
+
readonly name: "nonce";
|
|
4048
|
+
readonly type: "uint256";
|
|
4049
|
+
readonly internalType: "uint256";
|
|
4050
|
+
}, {
|
|
4051
|
+
readonly name: "ops";
|
|
4052
|
+
readonly type: "tuple";
|
|
4053
|
+
readonly internalType: "struct Types.Operation";
|
|
4054
|
+
readonly components: readonly [{
|
|
4055
|
+
readonly name: "data";
|
|
4056
|
+
readonly type: "bytes";
|
|
4057
|
+
readonly internalType: "bytes";
|
|
4058
|
+
}];
|
|
4059
|
+
}, {
|
|
4060
|
+
readonly name: "signature";
|
|
4061
|
+
readonly type: "bytes";
|
|
4062
|
+
readonly internalType: "bytes";
|
|
4063
|
+
}];
|
|
4064
|
+
}, {
|
|
4065
|
+
readonly name: "gasRefund";
|
|
4066
|
+
readonly type: "tuple";
|
|
4067
|
+
readonly internalType: "struct IStandaloneIntentExecutor.GasRefund";
|
|
4068
|
+
readonly components: readonly [{
|
|
4069
|
+
readonly name: "token";
|
|
4070
|
+
readonly type: "address";
|
|
4071
|
+
readonly internalType: "address";
|
|
4072
|
+
}, {
|
|
4073
|
+
readonly name: "exchangeRate";
|
|
4074
|
+
readonly type: "uint256";
|
|
4075
|
+
readonly internalType: "uint256";
|
|
4076
|
+
}, {
|
|
4077
|
+
readonly name: "overhead";
|
|
4078
|
+
readonly type: "uint256";
|
|
4079
|
+
readonly internalType: "uint256";
|
|
4080
|
+
}];
|
|
4081
|
+
}];
|
|
4082
|
+
readonly outputs: readonly [{
|
|
4083
|
+
readonly name: "";
|
|
4084
|
+
readonly type: "bytes4";
|
|
4085
|
+
readonly internalType: "bytes4";
|
|
4086
|
+
}];
|
|
4087
|
+
readonly stateMutability: "payable";
|
|
4088
|
+
}, {
|
|
4089
|
+
readonly type: "function";
|
|
4090
|
+
readonly name: "handleFill_intentExecutor_executeSinglechainOps_gasRefund";
|
|
4091
|
+
readonly inputs: readonly [{
|
|
4092
|
+
readonly name: "ops";
|
|
4093
|
+
readonly type: "tuple";
|
|
4094
|
+
readonly internalType: "struct IStandaloneIntentExecutor.SingleChainOps";
|
|
4095
|
+
readonly components: readonly [{
|
|
4096
|
+
readonly name: "account";
|
|
4097
|
+
readonly type: "address";
|
|
4098
|
+
readonly internalType: "address";
|
|
4099
|
+
}, {
|
|
4100
|
+
readonly name: "nonce";
|
|
4101
|
+
readonly type: "uint256";
|
|
4102
|
+
readonly internalType: "uint256";
|
|
4103
|
+
}, {
|
|
4104
|
+
readonly name: "ops";
|
|
4105
|
+
readonly type: "tuple";
|
|
4106
|
+
readonly internalType: "struct Types.Operation";
|
|
4107
|
+
readonly components: readonly [{
|
|
4108
|
+
readonly name: "data";
|
|
4109
|
+
readonly type: "bytes";
|
|
4110
|
+
readonly internalType: "bytes";
|
|
4111
|
+
}];
|
|
4112
|
+
}, {
|
|
4113
|
+
readonly name: "signature";
|
|
4114
|
+
readonly type: "bytes";
|
|
4115
|
+
readonly internalType: "bytes";
|
|
4116
|
+
}];
|
|
4117
|
+
}, {
|
|
4118
|
+
readonly name: "gasRefund";
|
|
4119
|
+
readonly type: "tuple";
|
|
4120
|
+
readonly internalType: "struct IStandaloneIntentExecutor.GasRefund";
|
|
4121
|
+
readonly components: readonly [{
|
|
4122
|
+
readonly name: "token";
|
|
4123
|
+
readonly type: "address";
|
|
4124
|
+
readonly internalType: "address";
|
|
4125
|
+
}, {
|
|
4126
|
+
readonly name: "exchangeRate";
|
|
4127
|
+
readonly type: "uint256";
|
|
4128
|
+
readonly internalType: "uint256";
|
|
4129
|
+
}, {
|
|
4130
|
+
readonly name: "overhead";
|
|
4131
|
+
readonly type: "uint256";
|
|
4132
|
+
readonly internalType: "uint256";
|
|
4133
|
+
}];
|
|
4134
|
+
}];
|
|
4135
|
+
readonly outputs: readonly [{
|
|
4136
|
+
readonly name: "";
|
|
4137
|
+
readonly type: "bytes4";
|
|
4138
|
+
readonly internalType: "bytes4";
|
|
4139
|
+
}];
|
|
4140
|
+
readonly stateMutability: "payable";
|
|
4141
|
+
}, {
|
|
4142
|
+
readonly type: "function";
|
|
4143
|
+
readonly name: "semVer";
|
|
4144
|
+
readonly inputs: readonly [];
|
|
4145
|
+
readonly outputs: readonly [{
|
|
4146
|
+
readonly name: "packedVersion";
|
|
4147
|
+
readonly type: "bytes6";
|
|
4148
|
+
readonly internalType: "bytes6";
|
|
4149
|
+
}];
|
|
4150
|
+
readonly stateMutability: "view";
|
|
4151
|
+
}, {
|
|
4152
|
+
readonly type: "function";
|
|
4153
|
+
readonly name: "semVerUnpacked";
|
|
4154
|
+
readonly inputs: readonly [];
|
|
4155
|
+
readonly outputs: readonly [{
|
|
4156
|
+
readonly name: "major";
|
|
4157
|
+
readonly type: "uint256";
|
|
4158
|
+
readonly internalType: "uint256";
|
|
4159
|
+
}, {
|
|
4160
|
+
readonly name: "minor";
|
|
4161
|
+
readonly type: "uint256";
|
|
4162
|
+
readonly internalType: "uint256";
|
|
4163
|
+
}, {
|
|
4164
|
+
readonly name: "patch";
|
|
4165
|
+
readonly type: "uint256";
|
|
4166
|
+
readonly internalType: "uint256";
|
|
4167
|
+
}];
|
|
4168
|
+
readonly stateMutability: "view";
|
|
4169
|
+
}, {
|
|
4170
|
+
readonly type: "function";
|
|
4171
|
+
readonly name: "settlementLayerSpender";
|
|
4172
|
+
readonly inputs: readonly [];
|
|
4173
|
+
readonly outputs: readonly [{
|
|
4174
|
+
readonly name: "tokenSpender";
|
|
4175
|
+
readonly type: "address";
|
|
4176
|
+
readonly internalType: "address";
|
|
4177
|
+
}];
|
|
4178
|
+
readonly stateMutability: "view";
|
|
4179
|
+
}, {
|
|
4180
|
+
readonly type: "function";
|
|
4181
|
+
readonly name: "supportsInterface";
|
|
4182
|
+
readonly inputs: readonly [{
|
|
4183
|
+
readonly name: "selector";
|
|
4184
|
+
readonly type: "bytes4";
|
|
4185
|
+
readonly internalType: "bytes4";
|
|
4186
|
+
}];
|
|
4187
|
+
readonly outputs: readonly [{
|
|
4188
|
+
readonly name: "supported";
|
|
4189
|
+
readonly type: "bool";
|
|
4190
|
+
readonly internalType: "bool";
|
|
4191
|
+
}];
|
|
4192
|
+
readonly stateMutability: "pure";
|
|
4193
|
+
}, {
|
|
4194
|
+
readonly type: "function";
|
|
4195
|
+
readonly name: "version";
|
|
4196
|
+
readonly inputs: readonly [];
|
|
4197
|
+
readonly outputs: readonly [{
|
|
4198
|
+
readonly name: "";
|
|
4199
|
+
readonly type: "bytes";
|
|
4200
|
+
readonly internalType: "bytes";
|
|
4201
|
+
}];
|
|
4202
|
+
readonly stateMutability: "view";
|
|
4203
|
+
}, {
|
|
4204
|
+
readonly type: "event";
|
|
4205
|
+
readonly name: "RouterClaimed_Compact";
|
|
4206
|
+
readonly inputs: readonly [{
|
|
4207
|
+
readonly name: "sponsor";
|
|
4208
|
+
readonly type: "address";
|
|
4209
|
+
readonly indexed: false;
|
|
4210
|
+
readonly internalType: "address";
|
|
4211
|
+
}, {
|
|
4212
|
+
readonly name: "nonce";
|
|
4213
|
+
readonly type: "uint256";
|
|
4214
|
+
readonly indexed: false;
|
|
4215
|
+
readonly internalType: "uint256";
|
|
4216
|
+
}];
|
|
4217
|
+
readonly anonymous: false;
|
|
4218
|
+
}, {
|
|
4219
|
+
readonly type: "event";
|
|
4220
|
+
readonly name: "RouterClaimed_Permit2";
|
|
4221
|
+
readonly inputs: readonly [{
|
|
4222
|
+
readonly name: "sponsor";
|
|
4223
|
+
readonly type: "address";
|
|
4224
|
+
readonly indexed: false;
|
|
4225
|
+
readonly internalType: "address";
|
|
4226
|
+
}, {
|
|
4227
|
+
readonly name: "nonce";
|
|
4228
|
+
readonly type: "uint256";
|
|
4229
|
+
readonly indexed: false;
|
|
4230
|
+
readonly internalType: "uint256";
|
|
4231
|
+
}];
|
|
4232
|
+
readonly anonymous: false;
|
|
4233
|
+
}, {
|
|
4234
|
+
readonly type: "event";
|
|
4235
|
+
readonly name: "RouterFilled";
|
|
4236
|
+
readonly inputs: readonly [{
|
|
4237
|
+
readonly name: "recipient";
|
|
4238
|
+
readonly type: "address";
|
|
4239
|
+
readonly indexed: false;
|
|
4240
|
+
readonly internalType: "address";
|
|
4241
|
+
}, {
|
|
4242
|
+
readonly name: "nonce";
|
|
4243
|
+
readonly type: "uint256";
|
|
4244
|
+
readonly indexed: false;
|
|
4245
|
+
readonly internalType: "uint256";
|
|
4246
|
+
}];
|
|
4247
|
+
readonly anonymous: false;
|
|
4248
|
+
}, {
|
|
4249
|
+
readonly type: "error";
|
|
4250
|
+
readonly name: "InvalidRelayerContext";
|
|
4251
|
+
readonly inputs: readonly [];
|
|
4252
|
+
}, {
|
|
4253
|
+
readonly type: "error";
|
|
4254
|
+
readonly name: "MajorVersionTooLarge";
|
|
4255
|
+
readonly inputs: readonly [{
|
|
4256
|
+
readonly name: "major";
|
|
4257
|
+
readonly type: "uint256";
|
|
4258
|
+
readonly internalType: "uint256";
|
|
4259
|
+
}];
|
|
4260
|
+
}, {
|
|
4261
|
+
readonly type: "error";
|
|
4262
|
+
readonly name: "MinorVersionTooLarge";
|
|
4263
|
+
readonly inputs: readonly [{
|
|
4264
|
+
readonly name: "minor";
|
|
4265
|
+
readonly type: "uint256";
|
|
4266
|
+
readonly internalType: "uint256";
|
|
4267
|
+
}];
|
|
4268
|
+
}, {
|
|
4269
|
+
readonly type: "error";
|
|
4270
|
+
readonly name: "OnlyDelegateCall";
|
|
4271
|
+
readonly inputs: readonly [];
|
|
4272
|
+
}, {
|
|
4273
|
+
readonly type: "error";
|
|
4274
|
+
readonly name: "PatchVersionTooLarge";
|
|
4275
|
+
readonly inputs: readonly [{
|
|
4276
|
+
readonly name: "patch";
|
|
4277
|
+
readonly type: "uint256";
|
|
4278
|
+
readonly internalType: "uint256";
|
|
4279
|
+
}];
|
|
4280
|
+
}];
|
|
3985
4281
|
readonly relayAbi: readonly [{
|
|
3986
4282
|
readonly type: "constructor";
|
|
3987
4283
|
readonly inputs: readonly [{
|
package/dist/adapters.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../adapters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../adapters.ts"],"names":[],"mappings":"AAYA;;;GAGG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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bi: shared_configs_1.sameChainAdapterAbi,
|
|
15
15
|
acrossAbi: shared_configs_1.acrossAdapterAbi,
|
|
16
16
|
intentExecutorAbi: shared_configs_1.intentExecutorAdapterAbi,
|
|
17
|
+
intentExecutorWithGasRefundAbi: shared_configs_1.intentExecutorAdapterGasRefundAbi,
|
|
17
18
|
relayAbi: shared_configs_1.relayAdapterAbi,
|
|
18
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rebalancing.d.ts","sourceRoot":"","sources":["../rebalancing.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EAGZ,KAAK,GAAG,EAET,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"rebalancing.d.ts","sourceRoot":"","sources":["../rebalancing.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EAGZ,KAAK,GAAG,EAET,MAAM,MAAM,CAAA;AAab,OAAO,KAAK,EAEV,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAOhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,4BAA4B,CAC1C,EAAE,EAAE,OAAO,EACX,IAAI,EAAE,GAAG,EACT,WAAW,EAAE,oBAAoB,EACjC,MAAM,CAAC,EAAE,iBAAiB,GACzB,GAAG,CAyFL"}
|
package/dist/rebalancing.js
CHANGED
|
@@ -6,6 +6,7 @@ const viem_1 = require("viem");
|
|
|
6
6
|
const address_1 = require("./address");
|
|
7
7
|
const errors_1 = require("./errors");
|
|
8
8
|
const router_1 = require("./router");
|
|
9
|
+
const standaloneExecutor_1 = require("./standaloneExecutor");
|
|
9
10
|
const DEFAULT_ROUTER_ADDRESS = (0, address_1.parseAddress)(shared_configs_1.contractAddresses['*'].router);
|
|
10
11
|
const DEFAULT_INTENT_EXECUTOR_ADDRESS = (0, address_1.parseAddress)(shared_configs_1.contractAddresses['*'].intentExecutor);
|
|
11
12
|
/**
|
|
@@ -59,8 +60,7 @@ function replaceRepaymentDestinations(to, data, destination, config) {
|
|
|
59
60
|
chain: destination.chain,
|
|
60
61
|
};
|
|
61
62
|
if (normalizedTo === intentExecutorAddress) {
|
|
62
|
-
|
|
63
|
-
return data;
|
|
63
|
+
return (0, standaloneExecutor_1.rewriteStandaloneExecutorCall)(data, normalizedDestination);
|
|
64
64
|
}
|
|
65
65
|
if (normalizedTo === routerAddress) {
|
|
66
66
|
const { functionName: routerFunctionName, args: routerCallArgs, isOptimizedRouteCall, } = (0, router_1.decodeRouterCall)(data);
|
package/dist/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,KAAK,EAAe,4BAA4B,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAU1E,OAAO,KAAK,EAAc,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAQvE;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,4BAA4B,CACnE,OAAO,SAAS,CACjB,GAAG;IACF,oBAAoB,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,GAAG,GAAG,0BAA0B,CAetE;AAED;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE,4BAA4B,KACpC,GAAG,CAAA;AAER;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,qBAAqB,EAAE,qBAAqB,CAAA;CAC7C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,qBAK9B,CAAA;AAYD;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,EAAE,qBAkB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|
package/dist/router.js
CHANGED
|
@@ -112,6 +112,7 @@ const adapterRelayerContextMap = {
|
|
|
112
112
|
ecoAbi: lookup(exports.EcoRepaymentsRelayerContext),
|
|
113
113
|
acrossAbi: lookup(exports.AcrossRepaymentsRelayerContext),
|
|
114
114
|
intentExecutorAbi: lookup(exports.NoRelayerContext),
|
|
115
|
+
intentExecutorWithGasRefundAbi: lookup(exports.SameChainRepaymentsRelayerContext),
|
|
115
116
|
relayAbi: lookup(exports.NoRelayerContext),
|
|
116
117
|
};
|
|
117
118
|
function buildSelectorToAdapterCallMap() {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Hex } from 'viem';
|
|
2
|
+
import type { InternalRepaymentDestination } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Rewrites the gasRefundRecipient address in standalone intent executor calls.
|
|
5
|
+
*
|
|
6
|
+
* For functions with "WithGasRefund" in the name, the last parameter is
|
|
7
|
+
* the gasRefundRecipient address which gets replaced with the destination address.
|
|
8
|
+
*
|
|
9
|
+
* Non-gas-refund functions are returned unchanged.
|
|
10
|
+
*
|
|
11
|
+
* @param data - ABI-encoded intent executor calldata
|
|
12
|
+
* @param destination - The repayment destination to write
|
|
13
|
+
* @returns The calldata with rewritten gasRefundRecipient (or unchanged if not a gas refund function)
|
|
14
|
+
*/
|
|
15
|
+
export declare function rewriteStandaloneExecutorCall(data: Hex, destination: InternalRepaymentDestination): Hex;
|
|
16
|
+
//# sourceMappingURL=standaloneExecutor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standaloneExecutor.d.ts","sourceRoot":"","sources":["../standaloneExecutor.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,GAAG,EAET,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAc3D;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,GAAG,EACT,WAAW,EAAE,4BAA4B,GACxC,GAAG,CAsBL"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rewriteStandaloneExecutorCall = rewriteStandaloneExecutorCall;
|
|
4
|
+
const shared_configs_1 = require("@rhinestone/shared-configs");
|
|
5
|
+
const viem_1 = require("viem");
|
|
6
|
+
// Build selector set for gas refund functions
|
|
7
|
+
const gasRefundSelectors = new Set(shared_configs_1.intentExecutorAbi
|
|
8
|
+
.filter((item) => item.type === 'function' && item.name.includes('WithGasRefund'))
|
|
9
|
+
.map((item) => (0, viem_1.toFunctionSelector)(item)));
|
|
10
|
+
/**
|
|
11
|
+
* Rewrites the gasRefundRecipient address in standalone intent executor calls.
|
|
12
|
+
*
|
|
13
|
+
* For functions with "WithGasRefund" in the name, the last parameter is
|
|
14
|
+
* the gasRefundRecipient address which gets replaced with the destination address.
|
|
15
|
+
*
|
|
16
|
+
* Non-gas-refund functions are returned unchanged.
|
|
17
|
+
*
|
|
18
|
+
* @param data - ABI-encoded intent executor calldata
|
|
19
|
+
* @param destination - The repayment destination to write
|
|
20
|
+
* @returns The calldata with rewritten gasRefundRecipient (or unchanged if not a gas refund function)
|
|
21
|
+
*/
|
|
22
|
+
function rewriteStandaloneExecutorCall(data, destination) {
|
|
23
|
+
const selector = data.slice(0, 10);
|
|
24
|
+
if (!gasRefundSelectors.has(selector)) {
|
|
25
|
+
// Not a gas refund function, return unchanged
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
const decoded = (0, viem_1.decodeFunctionData)({
|
|
29
|
+
abi: shared_configs_1.intentExecutorAbi,
|
|
30
|
+
data,
|
|
31
|
+
});
|
|
32
|
+
// Last arg is gasRefundRecipient - replace it
|
|
33
|
+
const args = [...decoded.args];
|
|
34
|
+
args[args.length - 1] = destination.address;
|
|
35
|
+
return (0, viem_1.encodeFunctionData)({
|
|
36
|
+
abi: shared_configs_1.intentExecutorAbi,
|
|
37
|
+
functionName: decoded.functionName,
|
|
38
|
+
args: args,
|
|
39
|
+
});
|
|
40
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinestone/relayer-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "SDK for rewriting repayment destinations in router-encoded intent calldata",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rhinestone",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@rhinestone/shared-configs": "1.4.
|
|
41
|
+
"@rhinestone/shared-configs": "1.4.90"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"viem": "^2.38.0"
|