Skip to content

Commit

Permalink
add chains for owlto
Browse files Browse the repository at this point in the history
  • Loading branch information
gemeniteg committed Dec 20, 2024
1 parent 72a2a6e commit 080cff4
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/adapters/owlto/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,26 @@ const nativeTokens: Record<string, string> = {
btr: "0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",
};

const depositParams: PartialContractEventParams = {
target: "",
topic: "Deposit(address,address,address,string,uint256,uint256,uint256,uint256)",
abi: [
"event Deposit(address user, address token, address maker, string target, uint256 amount, uint256 destination, uint256 channel, uint256 timestamp)",
],
logKeys: {
blockNumber: "blockNumber",
txHash: "transactionHash",
},
argKeys: {
amount: "amount",
to: "maker",
from: "user",
token: "token",
},
isDeposit: true,
};


type SupportedChains = keyof typeof contractsAddress;

const constructParams = (chain: SupportedChains) => {
Expand All @@ -93,7 +113,7 @@ const constructParams = (chain: SupportedChains) => {
bridgeAddress.map((address: string) => {
const transferWithdrawalParams: PartialContractEventParams = constructTransferParams(address, false);
const transferDepositParams: PartialContractEventParams = constructTransferParams(address, true);
eventParams.push(transferWithdrawalParams, transferDepositParams);
eventParams.push(transferWithdrawalParams, transferDepositParams, depositParams);
});

if (nativeTokens.hasOwnProperty(chain)) {
Expand Down

0 comments on commit 080cff4

Please sign in to comment.