Skip to content

Commit

Permalink
upgrade msgport v2
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed Jun 3, 2024
1 parent 1e489a9 commit 16946e4
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/xtoken-indexer/apollo/.env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ XTOKEN_DARWINIA_CRAB_ISSUING=https://thegraph.darwinia.network/helix/subgraphs/n
XTOKEN_CRAB_DARWINIA_BACKING=https://thegraph.darwinia.network/helix/subgraphs/name/xtokentransfer/crab-darwinia-backing
XTOKEN_CRAB_DARWINIA_ISSUING=https://thegraph.darwinia.network/helix/subgraphs/name/xtokentransfer/crab-darwinia-issuing
XTOKEN_DARWINIA_ETHEREUM_BACKING=https://thegraph.darwinia.network/helix/subgraphs/name/xtokentransfer/darwinia-ethereum-backing
XTOKEN_DARWINIA_ETHEREUM_ISSUING=https://api.studio.thegraph.com/query/59403/xtoken-dar-ethereum-issuing/v1.0.2
XTOKEN_DARWINIA_ETHEREUM_ISSUING=https://api.studio.thegraph.com/query/59403/xtoken-dar-ethereum-issuing/v1.0.3
XTOKEN_CRAB=https://thegraph.darwinia.network/helix/subgraphs/name/xtokentransfer/crab
XTOKEN_DISPATCH_DARWINIA=https://thegraph.darwinia.network/helix/subgraphs/name/xtokendispatch/darwinia
XTOKEN_DISPATCH_CRAB=https://thegraph.darwinia.network/helix/subgraphs/name/xtokendispatch/crab
XTOKEN_DISPATCH_ETHEREUM=https://api.studio.thegraph.com/query/59403/xtoken-dispatch-ethereum/v1.0.0
XTOKEN_DISPATCH_ETHEREUM=https://api.studio.thegraph.com/query/59403/xtoken-dispatch-ethereum/v1.0.1

CHAIN_TYPE=formal
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"build-sepolia": "sh generate.sh dispatch sepolia 5537287 0x0000000005d961F950adA391C1511c92bbc64D9F 0xf7F461728DC89de5EF6615715678b5f5b12bb98A && sh generate.sh guard sepolia 0x4CA75992d2750BEC270731A72DfDedE6b9E71cC7 5537287 && graph codegen && graph build",
"build-sepolia-v2": "sh generate.sh dispatch sepolia 5805976 0x9BEc71b9C646653C6C73Af8D4B7E5f84a5420005 0x2f868b52407b6886214Eb21dF6456c0b308Cc4ce && graph codegen && graph build",
"build-pangoro-v2": "sh generate.sh dispatch pangorotanssi 50000 0xe46ed7594ffa6ad7c3b5232827ec2af8f94beb38 0x093652d52464B6E00d6D95abB7Dc16b4546D83Ca && graph codegen && graph build",
"build-darwinia": "sh generate.sh dispatch darwinia2 2358855 0x0000000005d961F950adA391C1511c92bbc64D9F 0x65Be094765731F394bc6d9DF53bDF3376F1Fc8B0 && sh generate.sh guard darwinia2 0x4CA75992d2750BEC270731A72DfDedE6b9E71cC7 2358855 && graph codegen && graph build",
"build-crab": "sh generate.sh dispatch crab2 2515876 0x0000000005d961F950adA391C1511c92bbc64D9F 0x65Be094765731F394bc6d9DF53bDF3376F1Fc8B0 && sh generate.sh guard crab2 0x4CA75992d2750BEC270731A72DfDedE6b9E71cC7 2613068 && graph codegen && graph build",
"build-ethereum": "sh generate.sh dispatch mainnet 19537485 0x0000000005d961F950adA391C1511c92bbc64D9F 0x65Be094765731F394bc6d9DF53bDF3376F1Fc8B0 && sh generate.sh guard mainnet 0x4CA75992d2750BEC270731A72DfDedE6b9E71cC7 19537485 && graph codegen && graph build",
"build-darwinia": "sh generate.sh dispatch darwinia2 2358855 0x2cd1867Fb8016f93710B6386f7f9F1D540A60812 0x65Be094765731F394bc6d9DF53bDF3376F1Fc8B0 && sh generate.sh guard darwinia2 0x4CA75992d2750BEC270731A72DfDedE6b9E71cC7 2358855 && graph codegen && graph build",
"build-crab": "sh generate.sh dispatch crab2 2515876 0x2cd1867Fb8016f93710B6386f7f9F1D540A60812 0x65Be094765731F394bc6d9DF53bDF3376F1Fc8B0 && sh generate.sh guard crab2 0x4CA75992d2750BEC270731A72DfDedE6b9E71cC7 2613068 && graph codegen && graph build",
"build-ethereum": "sh generate.sh dispatch mainnet 19537485 0x2cd1867Fb8016f93710B6386f7f9F1D540A60812 0x65Be094765731F394bc6d9DF53bDF3376F1Fc8B0 && sh generate.sh guard mainnet 0x4CA75992d2750BEC270731A72DfDedE6b9E71cC7 19537485 && graph codegen && graph build",
"create-remote-dev": "graph create --access-token ${KEY} --node https://thegraph-g2.darwinia.network/helix/deploy/ xtokendispatch/${NETWORK}",
"deploy-remote-dev": "graph deploy --access-token $KEY --node https://thegraph-g2.darwinia.network/helix/deploy/ --ipfs https://ipfs.network.thegraph.com xtokendispatch/$NETWORK",
"create-remote-pro": "graph create --access-token ${KEY} --node https://thegraph.darwinia.network/helix/deploy/ xtokendispatch/${NETWORK}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ function isMsglineContract(event: ethereum.Log): boolean {
return event.address.toHexString() == '0x0000000005d961f950ada391c1511c92bbc64d9f' ||
event.address.toHexString() == '0x00000000001523057a05d6293c1e5171ee33ee0a' ||
event.address.toHexString() == '0xe46ed7594ffa6ad7c3b5232827ec2af8f94beb38'||
event.address.toHexString() == '0x9bec71b9c646653c6c73af8d4b7e5f84a5420005';
event.address.toHexString() == '0x9bec71b9c646653c6c73af8d4b7e5f84a5420005' ||
event.address.toHexString() == '0x13b2211a7ca45db2808f6db05557ce5347e3634e';
}

function isMsglineDispatchEvent(event: ethereum.Log): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const STATUS_CLAIMED = 4;

function isMsglineContract(event: ethereum.Log): boolean {
return event.address.toHexString() == '0x00000000001523057a05d6293c1e5171ee33ee0a' ||
event.address.toHexString() == '0x00000000046bc530804d66b6b64f7af69b4e4e81';
event.address.toHexString() == '0x00000000046bc530804d66b6b64f7af69b4e4e81' ||
event.address.toHexString() == '0x13b2211a7ca45db2808f6db05557ce5347e3634e';
}

function isMsglineDispatchEvent(event: ethereum.Log): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ const transferNonceId = "0x01";
function isMsglineContract(event: ethereum.Log): boolean {
return event.address.toHexString() == '0x0000000005d961f950ada391c1511c92bbc64d9f' ||
event.address.toHexString() == '0x00000000001523057a05d6293c1e5171ee33ee0a' ||
event.address.toHexString() == '0x9bec71b9c646653c6c73af8d4b7e5f84a5420005';
event.address.toHexString() == '0x9bec71b9c646653c6c73af8d4b7e5f84a5420005' ||
event.address.toHexString() == '0x2cd1867fb8016f93710b6386f7f9f1d540a60812';
}

function isMsglineAcceptEvent(event: ethereum.Log): boolean {
return (event.topics[0].toHexString() == '0x327110434bca326d1f70236295f59c8b472ebc683a6549ca9254697564fec4a5' ||
event.topics[0].toHexString() == '0xcfb9b3466878aff0c7df17da215fd57d59eb245a5d03f5a7b57294d54581eb18')&&
event.topics[0].toHexString() == '0xcfb9b3466878aff0c7df17da215fd57d59eb245a5d03f5a7b57294d54581eb18' ||
event.topics[0].toHexString() == '0x40195d26d027672e04e23e34282d68c3d43ea138415b24c54fcdb9c2573e5975')&&
isMsglineContract(event);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ const transferNonceId = "0x01";
function isMsglineContract(event: ethereum.Log): boolean {
return event.address.toHexString() == '0x0000000005d961f950ada391c1511c92bbc64d9f' ||
event.address.toHexString() == '0x00000000001523057a05d6293c1e5171ee33ee0a' ||
event.address.toHexString() == '0xe46ed7594ffa6ad7c3b5232827ec2af8f94beb38';
event.address.toHexString() == '0xe46ed7594ffa6ad7c3b5232827ec2af8f94beb38' ||
event.address.toHexString() == '0x2cd1867fb8016f93710b6386f7f9f1d540a60812';
}

function isMsglineAcceptEvent(event: ethereum.Log): boolean {
return (event.topics[0].toHexString() == '0x327110434bca326d1f70236295f59c8b472ebc683a6549ca9254697564fec4a5' ||
event.topics[0].toHexString() == '0x40195d26d027672e04e23e34282d68c3d43ea138415b24c54fcdb9c2573e5975' ||
event.topics[0].toHexString() == '0xcfb9b3466878aff0c7df17da215fd57d59eb245a5d03f5a7b57294d54581eb18') &&
isMsglineContract(event);
}
Expand Down

0 comments on commit 16946e4

Please sign in to comment.