@boostxyz/sdk 0.0.0-alpha.7 → 0.0.0-alpha.9
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/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.js +1 -1
- package/dist/Actions/ContractAction.d.ts +46 -3
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +37 -10
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +257 -11
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +249 -82
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.d.ts +2 -2
- package/dist/AllowLists/AllowList.js +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +33 -4
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +52 -37
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +31 -2
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +41 -129
- package/dist/AllowLists/SimpleDenyList.js.map +1 -1
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.cjs.map +1 -1
- package/dist/Auth/PassthroughAuth.js +4 -4
- package/dist/Auth/PassthroughAuth.js.map +1 -1
- package/dist/Boost.cjs +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +93 -1
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +151 -5
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +45 -7
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +352 -305
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +18 -4
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +36 -25
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +40 -2
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +53 -36
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/SimpleBudget.d.ts +33 -2
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +54 -2
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.js +1 -1
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +8 -2
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js +6 -0
- package/dist/Deployable/Deployable.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +4 -3
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +31 -28
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +35 -5
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +33 -21
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +89 -5
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +44 -23
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +67 -6
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +49 -5
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +46 -27
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +42 -5
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.cjs.map +1 -1
- package/dist/Incentives/Incentive.js +48 -32
- package/dist/Incentives/Incentive.js.map +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +49 -5
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +38 -21
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +298 -5
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +151 -26
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +1 -1
- package/dist/claiming.cjs +2 -0
- package/dist/claiming.cjs.map +1 -0
- package/dist/claiming.d.ts +43 -0
- package/dist/claiming.d.ts.map +1 -0
- package/dist/claiming.js +17 -0
- package/dist/claiming.js.map +1 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +15 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +30 -21
- package/dist/errors.js.map +1 -1
- package/dist/{generated-DGpIVcv5.js → generated-57_Kffpz.js} +293 -282
- package/dist/generated-57_Kffpz.js.map +1 -0
- package/dist/{generated-Cd-Fe7W7.cjs → generated-wKBNvm48.cjs} +3 -3
- package/dist/generated-wKBNvm48.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +108 -124
- package/dist/transfers.cjs +2 -0
- package/dist/transfers.cjs.map +1 -0
- package/dist/transfers.d.ts +198 -0
- package/dist/transfers.d.ts.map +1 -0
- package/dist/transfers.js +84 -0
- package/dist/transfers.js.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +2 -1371
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +26 -653
- package/dist/utils.js.map +1 -1
- package/package.json +17 -3
- package/src/Actions/Action.test.ts +5 -4
- package/src/Actions/ContractAction.test.ts +4 -6
- package/src/Actions/ContractAction.ts +73 -10
- package/src/Actions/ERC721MintAction.test.ts +2 -2
- package/src/Actions/ERC721MintAction.ts +70 -16
- package/src/Actions/EventAction.test.ts +43 -17
- package/src/Actions/EventAction.ts +451 -26
- package/src/AllowLists/SimpleAllowList.ts +51 -7
- package/src/AllowLists/SimpleDenyList.ts +47 -109
- package/src/Auth/PassthroughAuth.ts +1 -1
- package/src/Boost.ts +136 -1
- package/src/BoostCore.test.ts +4 -11
- package/src/BoostCore.ts +114 -45
- package/src/BoostRegistry.ts +39 -21
- package/src/Budgets/ManagedBudget.ts +69 -16
- package/src/Budgets/SimpleBudget.ts +57 -14
- package/src/Budgets/VestingBudget.ts +79 -9
- package/src/Deployable/Contract.ts +1 -1
- package/src/Deployable/Deployable.ts +8 -2
- package/src/Deployable/DeployableTarget.ts +19 -6
- package/src/Incentives/AllowListIncentive.test.ts +2 -5
- package/src/Incentives/AllowListIncentive.ts +59 -15
- package/src/Incentives/CGDAIncentive.test.ts +3 -7
- package/src/Incentives/CGDAIncentive.ts +123 -19
- package/src/Incentives/ERC1155Incentive.test.ts +2 -13
- package/src/Incentives/ERC1155Incentive.ts +104 -22
- package/src/Incentives/ERC20Incentive.test.ts +6 -17
- package/src/Incentives/ERC20Incentive.ts +86 -21
- package/src/Incentives/ERC20VariableIncentive.test.ts +4 -24
- package/src/Incentives/ERC20VariableIncentive.ts +71 -19
- package/src/Incentives/Incentive.test.ts +1 -1
- package/src/Incentives/PointsIncentive.test.ts +3 -6
- package/src/Incentives/PointsIncentive.ts +79 -17
- package/src/Validators/SignerValidator.test.ts +3 -7
- package/src/Validators/SignerValidator.ts +422 -13
- package/src/claiming.ts +56 -0
- package/src/errors.ts +19 -1
- package/src/index.ts +10 -7
- package/src/transfers.ts +284 -0
- package/src/utils.ts +3 -2052
- package/dist/generated-Cd-Fe7W7.cjs.map +0 -1
- package/dist/generated-DGpIVcv5.js.map +0 -1
package/src/transfers.ts
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type Address,
|
|
3
|
+
type Hex,
|
|
4
|
+
encodeAbiParameters,
|
|
5
|
+
parseAbiParameters,
|
|
6
|
+
zeroAddress,
|
|
7
|
+
} from 'viem';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The various types of assets supported in Budgets and Incentives.
|
|
11
|
+
*
|
|
12
|
+
* @export
|
|
13
|
+
* @enum {number}
|
|
14
|
+
*/
|
|
15
|
+
export enum AssetType {
|
|
16
|
+
ETH,
|
|
17
|
+
ERC20,
|
|
18
|
+
ERC1155,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Object representation of a generic `Transfer` struct.
|
|
23
|
+
*
|
|
24
|
+
* @export
|
|
25
|
+
* @interface TransferPayload
|
|
26
|
+
* @typedef {TransferPayload}
|
|
27
|
+
*/
|
|
28
|
+
export interface TransferPayload {
|
|
29
|
+
/**
|
|
30
|
+
* The type of the asset being transferred.
|
|
31
|
+
*
|
|
32
|
+
* @type {AssetType}
|
|
33
|
+
*/
|
|
34
|
+
assetType: AssetType;
|
|
35
|
+
/**
|
|
36
|
+
* The address of the asset to transfer, zero address for ETH.
|
|
37
|
+
*
|
|
38
|
+
* @type {Address}
|
|
39
|
+
*/
|
|
40
|
+
address: Address;
|
|
41
|
+
/**
|
|
42
|
+
* The account from which to transfer the assets.
|
|
43
|
+
*
|
|
44
|
+
* @type {Address}
|
|
45
|
+
*/
|
|
46
|
+
target: Address;
|
|
47
|
+
/**
|
|
48
|
+
* An encoded {@link FungiblePayload}, use {@link prepareFungiblePayload} to construct.
|
|
49
|
+
*
|
|
50
|
+
* @type {Hex}
|
|
51
|
+
*/
|
|
52
|
+
data: Hex;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Encodes parameters for transferring the transfer of Fungible and ERC1155 assets, used for {@link Budget} operations.
|
|
57
|
+
* Typically you'd use {@link prepareFungibleTransfer} or {@link prepareERC1155Transfer}
|
|
58
|
+
*
|
|
59
|
+
* @param {TransferPayload} param0
|
|
60
|
+
* @param {AssetType} param0.assetType - The asset type being transferred.
|
|
61
|
+
* @param {Address} param0.address - The address of the asset, use zero address for ETH transfers.
|
|
62
|
+
* @param {Address} param0.target - The address of the account being transferred from
|
|
63
|
+
* @param {Hex} param0.data - Use {@link prepareFungiblePayload} to properly encode an amount to transfer
|
|
64
|
+
* @returns {Hex}
|
|
65
|
+
*/
|
|
66
|
+
export const prepareTransferPayload = ({
|
|
67
|
+
assetType,
|
|
68
|
+
address,
|
|
69
|
+
target,
|
|
70
|
+
data,
|
|
71
|
+
}: TransferPayload) => {
|
|
72
|
+
return encodeAbiParameters(
|
|
73
|
+
[
|
|
74
|
+
{ type: 'uint8', name: 'assetType' },
|
|
75
|
+
{ type: 'address', name: 'asset' },
|
|
76
|
+
{ type: 'address', name: 'target' },
|
|
77
|
+
{ type: 'bytes', name: 'data' },
|
|
78
|
+
],
|
|
79
|
+
[assetType, address, target, data],
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Object representation of
|
|
85
|
+
*
|
|
86
|
+
* @export
|
|
87
|
+
* @interface ERC1155Payload
|
|
88
|
+
* @typedef {ERC1155Payload}
|
|
89
|
+
*/
|
|
90
|
+
export interface ERC1155Payload {
|
|
91
|
+
/**
|
|
92
|
+
* The ERC1155 token ID for the incentive
|
|
93
|
+
*
|
|
94
|
+
* @type {bigint}
|
|
95
|
+
*/
|
|
96
|
+
tokenId: bigint;
|
|
97
|
+
/**
|
|
98
|
+
* The amount to transfer
|
|
99
|
+
*
|
|
100
|
+
* @type {bigint}
|
|
101
|
+
*/
|
|
102
|
+
amount: bigint;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Given a token ID and amount, properly encode a `ERC1155Incentive.ERC1155Payload` for use with {@link ERC1155Incentive} initialization.
|
|
107
|
+
*
|
|
108
|
+
* @export
|
|
109
|
+
* @param {ERC1155Payload} param0
|
|
110
|
+
* @param {bigint} param0.tokenId - The ERC1155 token ID for the incentive
|
|
111
|
+
* @param {bigint} param0.amount - The amount to transfer
|
|
112
|
+
* @returns {Hex}
|
|
113
|
+
*/
|
|
114
|
+
export function prepareERC1155Payload({ tokenId, amount }: ERC1155Payload) {
|
|
115
|
+
return encodeAbiParameters(
|
|
116
|
+
parseAbiParameters([
|
|
117
|
+
'ERC1155Payload payload',
|
|
118
|
+
'struct ERC1155Payload { uint256 tokenId; uint256 amount; bytes data; }',
|
|
119
|
+
]),
|
|
120
|
+
[{ tokenId, amount, data: '0x' }],
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* An object representation of the `Budget.Transfer` contract struct for transfers of ERC1155 assets.
|
|
126
|
+
*
|
|
127
|
+
* @export
|
|
128
|
+
* @interface ERC1155TransferPayload
|
|
129
|
+
* @typedef {ERC1155TransferPayload}
|
|
130
|
+
*/
|
|
131
|
+
export interface ERC1155TransferPayload {
|
|
132
|
+
/**
|
|
133
|
+
* The token ID to transfer
|
|
134
|
+
*
|
|
135
|
+
* @type {bigint}
|
|
136
|
+
*/
|
|
137
|
+
tokenId: bigint;
|
|
138
|
+
/**
|
|
139
|
+
* The amount to transfer
|
|
140
|
+
*
|
|
141
|
+
* @type {bigint}
|
|
142
|
+
*/
|
|
143
|
+
amount: bigint;
|
|
144
|
+
/**
|
|
145
|
+
* The address of the asset to target
|
|
146
|
+
*
|
|
147
|
+
* @type {Address}
|
|
148
|
+
*/
|
|
149
|
+
asset: Address;
|
|
150
|
+
/**
|
|
151
|
+
* The account to transfer from
|
|
152
|
+
*
|
|
153
|
+
* @type {Address}
|
|
154
|
+
*/
|
|
155
|
+
target: Address;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Encodes parameters for transferring the transfer of ERC1155 assets, used for {@link Budget} operations.
|
|
160
|
+
* The caller must have already approved the contract to transfer the asset.
|
|
161
|
+
*
|
|
162
|
+
* @export
|
|
163
|
+
* @param {ERC1155TransferPayload} param0
|
|
164
|
+
* @param {bigint} param0.tokenId - The token ID to transfer
|
|
165
|
+
* @param {bigint} param0.amount - The amount to transfer
|
|
166
|
+
* @param {Address} param0.asset - The address of the asset to target
|
|
167
|
+
* @param {Address} param0.target - The account to transfer from
|
|
168
|
+
* @returns {Hex}
|
|
169
|
+
*/
|
|
170
|
+
export function prepareERC1155Transfer({
|
|
171
|
+
tokenId,
|
|
172
|
+
amount,
|
|
173
|
+
asset,
|
|
174
|
+
target,
|
|
175
|
+
}: ERC1155TransferPayload) {
|
|
176
|
+
return encodeAbiParameters(
|
|
177
|
+
parseAbiParameters([
|
|
178
|
+
'Transfer request',
|
|
179
|
+
'struct Transfer { uint8 assetType; address asset; address target; bytes data; }',
|
|
180
|
+
]),
|
|
181
|
+
[
|
|
182
|
+
{
|
|
183
|
+
assetType: AssetType.ERC1155,
|
|
184
|
+
asset,
|
|
185
|
+
data: prepareERC1155Payload({ tokenId, amount }),
|
|
186
|
+
target,
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* An object representation of the `FungiblePayload` struct
|
|
194
|
+
*
|
|
195
|
+
* @export
|
|
196
|
+
* @interface FungiblePayload
|
|
197
|
+
* @typedef {FungiblePayload}
|
|
198
|
+
*/
|
|
199
|
+
export interface FungiblePayload {
|
|
200
|
+
/**
|
|
201
|
+
* The amount being transferred
|
|
202
|
+
*
|
|
203
|
+
* @type {bigint}
|
|
204
|
+
*/
|
|
205
|
+
amount: bigint;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Encodes an amount for the `FungiblePayload` struct
|
|
210
|
+
*
|
|
211
|
+
* @export
|
|
212
|
+
* @param {FungiblePayload} param0
|
|
213
|
+
* @param {bigint} param0.amount - The amount being transferred
|
|
214
|
+
* @returns {*}
|
|
215
|
+
*/
|
|
216
|
+
export function prepareFungiblePayload({ amount }: FungiblePayload) {
|
|
217
|
+
return encodeAbiParameters(
|
|
218
|
+
parseAbiParameters([
|
|
219
|
+
'FungiblePayload payload',
|
|
220
|
+
'struct FungiblePayload { uint256 amount; }',
|
|
221
|
+
]),
|
|
222
|
+
[{ amount }],
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* An object representation of the `Budget.Transfer` contract struct for transfers of fungible assets.
|
|
228
|
+
*
|
|
229
|
+
* @export
|
|
230
|
+
* @interface FungibleTransferPayload
|
|
231
|
+
* @typedef {FungibleTransferPayload}
|
|
232
|
+
*/
|
|
233
|
+
export interface FungibleTransferPayload {
|
|
234
|
+
/**
|
|
235
|
+
* The amount to transfer
|
|
236
|
+
*
|
|
237
|
+
* @type {bigint}
|
|
238
|
+
*/
|
|
239
|
+
amount: bigint;
|
|
240
|
+
/**
|
|
241
|
+
* The address of the asset. Use zero address for ETH transfers.
|
|
242
|
+
*
|
|
243
|
+
* @type {Address}
|
|
244
|
+
*/
|
|
245
|
+
asset: Address;
|
|
246
|
+
/**
|
|
247
|
+
* The account to transfer from
|
|
248
|
+
*
|
|
249
|
+
* @type {Address}
|
|
250
|
+
*/
|
|
251
|
+
target: Address;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Encodes parameters for a Fungible transfer, used for Budget allocations.
|
|
256
|
+
* The caller must have already approved the contract to transfer the asset.
|
|
257
|
+
*
|
|
258
|
+
* @export
|
|
259
|
+
* @param {FungibleTransferPayload} param0
|
|
260
|
+
* @param {bigint} param0.amount - The amount to transfer
|
|
261
|
+
* @param {Address} param0.asset - The address of the asset. Use zero address for ETH transfers.
|
|
262
|
+
* @param {Address} param0.target - The account to transfer from
|
|
263
|
+
* @returns {Hex}
|
|
264
|
+
*/
|
|
265
|
+
export function prepareFungibleTransfer({
|
|
266
|
+
amount,
|
|
267
|
+
asset,
|
|
268
|
+
target,
|
|
269
|
+
}: FungibleTransferPayload) {
|
|
270
|
+
return encodeAbiParameters(
|
|
271
|
+
parseAbiParameters([
|
|
272
|
+
'Transfer request',
|
|
273
|
+
'struct Transfer { uint8 assetType; address asset; address target; bytes data; }',
|
|
274
|
+
]),
|
|
275
|
+
[
|
|
276
|
+
{
|
|
277
|
+
assetType: asset == zeroAddress ? AssetType.ETH : AssetType.ERC20,
|
|
278
|
+
asset,
|
|
279
|
+
data: prepareFungiblePayload({ amount }),
|
|
280
|
+
target,
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
);
|
|
284
|
+
}
|