Skip to content

Commit

Permalink
(feat) more zilbridge transition scripts
Browse files Browse the repository at this point in the history
(feat) don't try to trace history from zero
(feat) doc fixes
  • Loading branch information
rrw-zilliqa committed Dec 27, 2024
1 parent 80c8cc8 commit a293a5b
Show file tree
Hide file tree
Showing 22 changed files with 1,283 additions and 63 deletions.
8 changes: 8 additions & 0 deletions bridge-validators/src/bridge_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ impl BridgeNode {
}

pub async fn sync_historic_events(&mut self) -> Result<()> {
if self.chain_client.chain_gateway_block_deployed == 0 {
warn!(
"block_deployed=0 , so not synchronising historic events for chain id {}",
self.chain_client.chain_id
);
return Ok(());
}

let max_block_specifier = if self.chain_client.block_instant_finality {
BlockNumber::Latest
} else {
Expand Down
2 changes: 1 addition & 1 deletion docs/zilbridge_to_xbridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Now deploy the token managers
* for zq, this is `02_deployZilbridgeTokenManagers.s.sol` - fill in `mainnetConfig.s.sol` and once this is verified.

```
forge script script/zq/deploy/02_deployZilbridgeTokenManagers.s.sol --rpc-url https://api.zilliqa.com/ --broadcast --chain-id 32769 --verify --legacy --verifier sourcify
forge script script/zq/deploy/02_deployZilbridgeTokenManagers.s.sol --rpc-url https://api.zilliqa.com/ --broadcast --chain-id 32769 --verify --legacy --verifier sourcify --
```

* Now set up the lockproxy data
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"transactions": [
{
"hash": null,
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0xb4132e757345f0efd91af38cd824be441f34fe25",
"function": "registerToken(address,(address,address,uint256))",
"arguments": [
"0x4345472A0c6164F35808CDb7e7eCCd3d326CC50b",
"(0x0000000000000000000000000000000000000000, 0x7519550ae8b6f9d32E9c1A939Fb5C186f660BE5b, 137)"
],
"transaction": {
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0xb4132e757345f0efd91af38cd824be441f34fe25",
"gas": "0x1c109",
"value": "0x0",
"input": "0x8bc76f740000000000000000000000004345472a0c6164f35808cdb7e7eccd3d326cc50b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000007519550ae8b6f9d32e9c1a939fb5c186f660be5b0000000000000000000000000000000000000000000000000000000000000089",
"nonce": "0x17",
"chainId": "0x8001"
},
"additionalContracts": [],
"isFixedGasLimit": false
},
{
"hash": null,
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"function": "registerToken(address,(address,address,uint256))",
"arguments": [
"0x0000000000000000000000000000000000000000",
"(0xCc88D28f7d4B0D5AFACCC77F6102d88EE630fA17, 0x3faC7cb5b45A3B59d76b6926bc704Cf3cc522437, 137)"
],
"transaction": {
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"gas": "0x2329c",
"value": "0x0",
"input": "0x8bc76f740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc88d28f7d4b0d5afaccc77f6102d88ee630fa170000000000000000000000003fac7cb5b45a3b59d76b6926bc704cf3cc5224370000000000000000000000000000000000000000000000000000000000000089",
"nonce": "0x18",
"chainId": "0x8001"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1735305499,
"chain": 32769,
"commit": "80c8cc8"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"transactions": [
{
"hash": null,
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0xb4132e757345f0efd91af38cd824be441f34fe25",
"function": "registerToken(address,(address,address,uint256))",
"arguments": [
"0x4345472A0c6164F35808CDb7e7eCCd3d326CC50b",
"(0x0000000000000000000000000000000000000000, 0x7519550ae8b6f9d32E9c1A939Fb5C186f660BE5b, 137)"
],
"transaction": {
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0xb4132e757345f0efd91af38cd824be441f34fe25",
"gas": "0x1c109",
"value": "0x0",
"input": "0x8bc76f740000000000000000000000004345472a0c6164f35808cdb7e7eccd3d326cc50b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000007519550ae8b6f9d32e9c1a939fb5c186f660be5b0000000000000000000000000000000000000000000000000000000000000089",
"nonce": "0x17",
"chainId": "0x8001"
},
"additionalContracts": [],
"isFixedGasLimit": false
},
{
"hash": null,
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"function": "registerToken(address,(address,address,uint256))",
"arguments": [
"0x0000000000000000000000000000000000000000",
"(0xCc88D28f7d4B0D5AFACCC77F6102d88EE630fA17, 0x3faC7cb5b45A3B59d76b6926bc704Cf3cc522437, 137)"
],
"transaction": {
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"gas": "0x2329c",
"value": "0x0",
"input": "0x8bc76f740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc88d28f7d4b0d5afaccc77f6102d88ee630fa170000000000000000000000003fac7cb5b45a3b59d76b6926bc704cf3cc5224370000000000000000000000000000000000000000000000000000000000000089",
"nonce": "0x18",
"chainId": "0x8001"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1735305499,
"chain": 32769,
"commit": "80c8cc8"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"transactions": [
{
"hash": "0x86afb921ddeea78943ccfd5fcdf483074e5b045206945c4a830e0208734df77a",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0xb4132e757345f0efd91af38cd824be441f34fe25",
"function": "registerToken(address,(address,address,uint256))",
"arguments": [
"0x4345472A0c6164F35808CDb7e7eCCd3d326CC50b",
"(0x0000000000000000000000000000000000000000, 0x7519550ae8b6f9d32E9c1A939Fb5C186f660BE5b, 137)"
],
"transaction": {
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0xb4132e757345f0efd91af38cd824be441f34fe25",
"gas": "0x1c109",
"value": "0x0",
"input": "0x8bc76f740000000000000000000000004345472a0c6164f35808cdb7e7eccd3d326cc50b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000007519550ae8b6f9d32e9c1a939fb5c186f660be5b0000000000000000000000000000000000000000000000000000000000000089",
"nonce": "0x17",
"chainId": "0x8001"
},
"additionalContracts": [],
"isFixedGasLimit": false
},
{
"hash": "0xc4a7ccb0a724fc35894bf36a5a1455e050da279f3db01d944d61dfdec603213d",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"function": "registerToken(address,(address,address,uint256))",
"arguments": [
"0x0000000000000000000000000000000000000000",
"(0xCc88D28f7d4B0D5AFACCC77F6102d88EE630fA17, 0x3faC7cb5b45A3B59d76b6926bc704Cf3cc522437, 137)"
],
"transaction": {
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"gas": "0x2329c",
"value": "0x0",
"input": "0x8bc76f740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc88d28f7d4b0d5afaccc77f6102d88ee630fa170000000000000000000000003fac7cb5b45a3b59d76b6926bc704cf3cc5224370000000000000000000000000000000000000000000000000000000000000089",
"nonce": "0x18",
"chainId": "0x8001"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x12de0",
"logs": [
{
"address": "0xb4132e757345f0efd91af38cd824be441f34fe25",
"topics": [
"0xacee94c8a79111860852775471f35a102ad3dc32ff2716802bd1000ceb51f5a8",
"0x0000000000000000000000004345472a0c6164f35808cdb7e7eccd3d326cc50b"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000007519550ae8b6f9d32e9c1a939fb5c186f660be5b0000000000000000000000000000000000000000000000000000000000000089",
"blockHash": "0x565175af4ceae9eb8e1f2e9d7e76f2d1e3cbe30a9a6101272f9ae183ad6cc5ac",
"blockNumber": "0x422e40",
"transactionHash": "0x86afb921ddeea78943ccfd5fcdf483074e5b045206945c4a830e0208734df77a",
"transactionIndex": "0x0",
"logIndex": "0x0",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000040000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000240020000000000000000800000000000000000000",
"type": "0x0",
"transactionHash": "0x86afb921ddeea78943ccfd5fcdf483074e5b045206945c4a830e0208734df77a",
"transactionIndex": "0x0",
"blockHash": "0x565175af4ceae9eb8e1f2e9d7e76f2d1e3cbe30a9a6101272f9ae183ad6cc5ac",
"blockNumber": "0x422e40",
"gasUsed": "0x12de0",
"effectiveGasPrice": "0x454b7b38e70",
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0xb4132e757345f0efd91af38cd824be441f34fe25",
"contractAddress": null,
"r": "0x18228C4E8093091B74BB5C5318F41B9C77660E5D0B7092ED7E2AD1299EAAEB32",
"root": "0x0000000000000000000000000000000000000000000000000000000000001010",
"s": "0x79814A0F5114D5ED68D85761A25DBC2E3B722D4BB7AC157AF72688BE32420A1C",
"v": "0x10026"
},
{
"status": "0x1",
"cumulativeGasUsed": "0x17ca0",
"logs": [
{
"address": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"topics": [
"0xacee94c8a79111860852775471f35a102ad3dc32ff2716802bd1000ceb51f5a8",
"0x0000000000000000000000000000000000000000000000000000000000000000"
],
"data": "0x000000000000000000000000cc88d28f7d4b0d5afaccc77f6102d88ee630fa170000000000000000000000003fac7cb5b45a3b59d76b6926bc704cf3cc5224370000000000000000000000000000000000000000000000000000000000000089",
"blockHash": "0x565175af4ceae9eb8e1f2e9d7e76f2d1e3cbe30a9a6101272f9ae183ad6cc5ac",
"blockNumber": "0x422e40",
"transactionHash": "0xc4a7ccb0a724fc35894bf36a5a1455e050da279f3db01d944d61dfdec603213d",
"transactionIndex": "0x1",
"logIndex": "0x2",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000020000000000000000000800010000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000020000000000000000000000000000000000000000000040800000000000000000000",
"type": "0x0",
"transactionHash": "0xc4a7ccb0a724fc35894bf36a5a1455e050da279f3db01d944d61dfdec603213d",
"transactionIndex": "0x1",
"blockHash": "0x565175af4ceae9eb8e1f2e9d7e76f2d1e3cbe30a9a6101272f9ae183ad6cc5ac",
"blockNumber": "0x422e40",
"gasUsed": "0x17ca0",
"effectiveGasPrice": "0x454b7b38e70",
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"contractAddress": null,
"r": "0x6AC96A9389BDCD52658EB7D2118E43894F0B21BFBA01B6A4BEA2B42BF5EEB8FB",
"root": "0x0000000000000000000000000000000000000000000000000000000000001010",
"s": "0x1BDEE3E0CDE8A642C8D6262C325024B5FFBB2B327456790A007048C2DD8472BA",
"v": "0x10026"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1735305595,
"chain": 32769,
"commit": "80c8cc8"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"transactions": [
{
"hash": "0xa56bfa8fcd85ae546bd0e6035395d3276e7cb6eb685b3271368886b7b5f46315",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"function": "registerToken(address,(address,address,uint256))",
"arguments": [
"0x4345472A0c6164F35808CDb7e7eCCd3d326CC50b",
"(0x0000000000000000000000000000000000000000, 0x7519550ae8b6f9d32E9c1A939Fb5C186f660BE5b, 137)"
],
"transaction": {
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"gas": "0x1a7fb",
"value": "0x0",
"input": "0x8bc76f740000000000000000000000004345472a0c6164f35808cdb7e7eccd3d326cc50b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000007519550ae8b6f9d32e9c1a939fb5c186f660be5b0000000000000000000000000000000000000000000000000000000000000089",
"nonce": "0x1b",
"chainId": "0x8001"
},
"additionalContracts": [],
"isFixedGasLimit": false
},
{
"hash": "0x68ddfd4e449f5dec861359d9c3b0e90c860795ff02e743018fe1e94ffd65c76f",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"function": "registerToken(address,(address,address,uint256))",
"arguments": [
"0x0000000000000000000000000000000000000000",
"(0xCc88D28f7d4B0D5AFACCC77F6102d88EE630fA17, 0x3faC7cb5b45A3B59d76b6926bc704Cf3cc522437, 137)"
],
"transaction": {
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"gas": "0xd13d",
"value": "0x0",
"input": "0x8bc76f740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc88d28f7d4b0d5afaccc77f6102d88ee630fa170000000000000000000000003fac7cb5b45a3b59d76b6926bc704cf3cc5224370000000000000000000000000000000000000000000000000000000000000089",
"nonce": "0x1c",
"chainId": "0x8001"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x12f84",
"logs": [
{
"address": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"topics": [
"0xacee94c8a79111860852775471f35a102ad3dc32ff2716802bd1000ceb51f5a8",
"0x0000000000000000000000004345472a0c6164f35808cdb7e7eccd3d326cc50b"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000007519550ae8b6f9d32e9c1a939fb5c186f660be5b0000000000000000000000000000000000000000000000000000000000000089",
"blockHash": "0xb38b42028e8e03ba557403c8c3c7b9bc80c97ee58aeaf60ab8a579cedfd4a777",
"blockNumber": "0x423039",
"transactionHash": "0xa56bfa8fcd85ae546bd0e6035395d3276e7cb6eb685b3271368886b7b5f46315",
"transactionIndex": "0x0",
"logIndex": "0x0",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000010000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080400000000000000000000000000000000000200020000000000000040800000000000000000000",
"type": "0x0",
"transactionHash": "0xa56bfa8fcd85ae546bd0e6035395d3276e7cb6eb685b3271368886b7b5f46315",
"transactionIndex": "0x0",
"blockHash": "0xb38b42028e8e03ba557403c8c3c7b9bc80c97ee58aeaf60ab8a579cedfd4a777",
"blockNumber": "0x423039",
"gasUsed": "0x12f84",
"effectiveGasPrice": "0x454b7b38e70",
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"contractAddress": null,
"r": "0x35F42669928523444D9B116AD603DAF769B2F73D3747EE2E55DA5207B5F5E93A",
"root": "0x0000000000000000000000000000000000000000000000000000000000001010",
"s": "0x4C0EB64DCC304EFC0CDEA25FF3BE8B3F2244AF4F105C6243208210BB28A6CA05",
"v": "0x10025"
},
{
"status": "0x1",
"cumulativeGasUsed": "0x93a8",
"logs": [
{
"address": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"topics": [
"0xacee94c8a79111860852775471f35a102ad3dc32ff2716802bd1000ceb51f5a8",
"0x0000000000000000000000000000000000000000000000000000000000000000"
],
"data": "0x000000000000000000000000cc88d28f7d4b0d5afaccc77f6102d88ee630fa170000000000000000000000003fac7cb5b45a3b59d76b6926bc704cf3cc5224370000000000000000000000000000000000000000000000000000000000000089",
"blockHash": "0xb38b42028e8e03ba557403c8c3c7b9bc80c97ee58aeaf60ab8a579cedfd4a777",
"blockNumber": "0x423039",
"transactionHash": "0x68ddfd4e449f5dec861359d9c3b0e90c860795ff02e743018fe1e94ffd65c76f",
"transactionIndex": "0x1",
"logIndex": "0x2",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000020000000000000000000800010000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000020000000000000000000000000000000000000000000040800000000000000000000",
"type": "0x0",
"transactionHash": "0x68ddfd4e449f5dec861359d9c3b0e90c860795ff02e743018fe1e94ffd65c76f",
"transactionIndex": "0x1",
"blockHash": "0xb38b42028e8e03ba557403c8c3c7b9bc80c97ee58aeaf60ab8a579cedfd4a777",
"blockNumber": "0x423039",
"gasUsed": "0x93a8",
"effectiveGasPrice": "0x454b7b38e70",
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0x4fa6148c9dabc7a737422fb1b3ab9088c878d26c",
"contractAddress": null,
"r": "0xD893DAB3A322B1E06A9B3CA9D094266F28F75585A8B625A95A52319438FB2CE1",
"root": "0x0000000000000000000000000000000000000000000000000000000000001010",
"s": "0x163BB483E07EB6ED11579014E25F6743F3E003AE1EF4ADC59FD63A62D40EC567",
"v": "0x10025"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1735323932,
"chain": 32769,
"commit": "80c8cc8"
}
Loading

0 comments on commit a293a5b

Please sign in to comment.