Skip to content

Commit 1a868f7

Browse files
0xanedi0xHarbs
andauthored
fixed Everclear deposit tracking (#375)
* Add Solana support to Everclear adapter and bridge network data * Updated to last event signature ABI format for deposit intent in Everclear adapter * Fix event sig --------- Co-authored-by: 0xHarbs <37656321+0xHarbs@users.noreply.github.com>
1 parent f1d0e03 commit 1a868f7

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/adapters/everclear/index.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const contractAddresses = {
2626
berachain: ["0xa05A3380889115bf313f1Db9d5f335157Be4D816"],
2727
mantle: ["0xe0F010e465f15dcD42098dF9b99F1038c11B3056"],
2828
ink: ["0xa05A3380889115bf313f1Db9d5f335157Be4D816"],
29+
solana: ["everUnMiUkvZG8EyXAtW8HfMavCBTVeMhQszbrtpUQm"],
2930
} as const;
3031

3132
// Helper function to convert bytes32 to address
@@ -36,9 +37,9 @@ function bytes32ToAddress(bytes32: string) {
3637
// Deposit event (IntentAdded)
3738
const depositIntent: PartialContractEventParams = {
3839
target: "",
39-
topic: "IntentAdded(bytes32,bytes32,(bytes32,bytes32,bytes32,bytes32,uint24,uint32,uint64,uint48,uint48,uint256,uint32[],bytes))",
40+
topic: "IntentAdded(bytes32,uint256,(bytes32,bytes32,bytes32,bytes32,uint24,uint32,uint64,uint48,uint48,uint256,uint32[],bytes))",
4041
abi: [
41-
"event IntentAdded(bytes32 indexed _intentId, bytes32 indexed _queueId, tuple(bytes32 initiator, bytes32 receiver, bytes32 inputAsset, bytes32 outputAsset, uint24 maxFee, uint32 origin, uint64 nonce, uint48 timestamp, uint48 ttl, uint256 amount, uint32[] destinations, bytes data) _intent)",
42+
"event IntentAdded(bytes32 indexed _intentId, uint256 _queueId, (bytes32 initiator, bytes32 receiver, bytes32 inputAsset, bytes32 outputAsset, uint24 maxFee, uint32 origin, uint64 nonce, uint48 timestamp, uint48 ttl, uint256 amount, uint32[] destinations, bytes data) _intent)",
4243
],
4344
logKeys: {
4445
blockNumber: "blockNumber",
@@ -47,6 +48,7 @@ const depositIntent: PartialContractEventParams = {
4748
argKeys: {
4849
amount: "_intent.amount",
4950
from: "_intent.initiator",
51+
to: "_intent.receiver",
5052
token: "_intent.inputAsset",
5153
},
5254
argGetters: {
@@ -81,12 +83,12 @@ const constructParams = (chain: Chain) => {
8183

8284
// Create event params for both deposit and withdrawal events for each contract address
8385
const eventParams: PartialContractEventParams[] = [];
84-
86+
8587
// Add deposit (IntentAdded) events
8688
chainConfig.forEach(address => {
8789
eventParams.push({...depositIntent, target: address});
8890
});
89-
91+
9092
// Add withdrawal (Settled) events
9193
chainConfig.forEach(address => {
9294
eventParams.push({...withdrawalIntent, target: address});
@@ -120,6 +122,7 @@ const adapter: BridgeAdapter = {
120122
berachain: constructParams("berachain"),
121123
mantle: constructParams("mantle"),
122124
ink: constructParams("ink"),
125+
solana: constructParams("solana"),
123126
};
124127

125-
export default adapter;
128+
export default adapter;

src/data/bridgeNetworkData.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,6 +2199,7 @@ export default [
21992199
"Berachain",
22002200
"Mantle",
22012201
"Ink",
2202+
"Solana",
22022203
],
22032204
chainMapping: {
22042205
"zksync era": "era",

0 commit comments

Comments
 (0)