Skip to content

Commit 46ed3a5

Browse files
committed
update permit2 adapter
1 parent 0b56354 commit 46ed3a5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/swapService/strategies/balmySDK/okuQuoteSource.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
const CHAINS: Record<ChainId, Record<string, string>> = {
3737
[60808]: {
3838
key: "bob",
39-
permit2Adapter: "0xcBF002A9eB906F35eA35aD0634CC5f3d85a10426",
39+
permit2Adapter: "0x7435E8351A54e75ebd7429008c74c810016123df",
4040
},
4141
}
4242

@@ -188,16 +188,17 @@ export class CustomOkuQuoteSource extends AlwaysValidConfigAndContextSource<
188188
}: BuildTxParams<OkuConfig, OkuData>): Promise<SourceQuoteTransaction> {
189189
if (this.market === "usor") {
190190
const adapterAbi = parseAbi([
191-
"function swap(address target, address token, uint256 amount, uint256 sweepAmountMin, bytes calldata data)",
191+
"function swap(address target, address tokenIn, address tokenOut, uint256 amount, address receiver, bytes calldata data)",
192192
])
193193
const calldata = encodeFunctionData({
194194
abi: adapterAbi,
195195
functionName: "swap",
196196
args: [
197197
request.customData.tx.to as Hex,
198198
request.sellToken as Hex,
199+
request.buyToken as Hex,
199200
request.maxSellAmount,
200-
5n,
201+
request.accounts.recipient as Hex,
201202
request.customData.tx.calldata as Hex,
202203
],
203204
})

0 commit comments

Comments
 (0)