-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: complete sync of cells and headers
- Loading branch information
liyukun
committed
Nov 6, 2023
1 parent
1a7b60c
commit c71f6e4
Showing
14 changed files
with
1,328 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
189 changes: 189 additions & 0 deletions
189
crates/relayer/src/chain/axon/contract/abi/ImageCellContract.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
{ | ||
"contractName": "image_cell_contract", | ||
"abi": [ | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "txHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint32", | ||
"name": "index", | ||
"type": "uint32" | ||
} | ||
], | ||
"internalType": "struct CkbType.OutPoint[]", | ||
"name": "txInputs", | ||
"type": "tuple[]" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "txHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint32", | ||
"name": "index", | ||
"type": "uint32" | ||
} | ||
], | ||
"internalType": "struct CkbType.OutPoint[]", | ||
"name": "txOutputs", | ||
"type": "tuple[]" | ||
} | ||
], | ||
"internalType": "struct ImageCell.BlockRollBlack[]", | ||
"name": "blocks", | ||
"type": "tuple[]" | ||
} | ||
], | ||
"name": "rollback", | ||
"outputs": [], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bool", | ||
"name": "allowRead", | ||
"type": "bool" | ||
} | ||
], | ||
"name": "setState", | ||
"outputs": [], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint64", | ||
"name": "blockNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "txHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint32", | ||
"name": "index", | ||
"type": "uint32" | ||
} | ||
], | ||
"internalType": "struct CkbType.OutPoint[]", | ||
"name": "txInputs", | ||
"type": "tuple[]" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "txHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint32", | ||
"name": "index", | ||
"type": "uint32" | ||
} | ||
], | ||
"internalType": "struct CkbType.OutPoint", | ||
"name": "outPoint", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint64", | ||
"name": "capacity", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "codeHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "enum CkbType.ScriptHashType", | ||
"name": "hashType", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "args", | ||
"type": "bytes" | ||
} | ||
], | ||
"internalType": "struct CkbType.Script", | ||
"name": "lock", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "codeHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "enum CkbType.ScriptHashType", | ||
"name": "hashType", | ||
"type": "uint8" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "args", | ||
"type": "bytes" | ||
} | ||
], | ||
"internalType": "struct CkbType.Script[]", | ||
"name": "type_", | ||
"type": "tuple[]" | ||
} | ||
], | ||
"internalType": "struct CkbType.CellOutput", | ||
"name": "output", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "data", | ||
"type": "bytes" | ||
} | ||
], | ||
"internalType": "struct CkbType.CellInfo[]", | ||
"name": "txOutputs", | ||
"type": "tuple[]" | ||
} | ||
], | ||
"internalType": "struct ImageCell.BlockUpdate[]", | ||
"name": "blocks", | ||
"type": "tuple[]" | ||
} | ||
], | ||
"name": "update", | ||
"outputs": [], | ||
"stateMutability": "view", | ||
"type": "function" | ||
} | ||
] | ||
} |
106 changes: 106 additions & 0 deletions
106
crates/relayer/src/chain/axon/contract/abi/LightClientContract.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{ | ||
"contractName": "ckb_light_client_contract", | ||
"abi": [ | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32[]", | ||
"name": "blockHashs", | ||
"type": "bytes32[]" | ||
} | ||
], | ||
"name": "rollback", | ||
"outputs": [], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bool", | ||
"name": "allowRead", | ||
"type": "bool" | ||
} | ||
], | ||
"name": "setState", | ||
"outputs": [], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "uint32", | ||
"name": "version", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"internalType": "uint32", | ||
"name": "compactTarget", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "timestamp", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "number", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "epoch", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "parentHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "transactionsRoot", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "proposalsHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "unclesHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "dao", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint128", | ||
"name": "nonce", | ||
"type": "uint128" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "blockHash", | ||
"type": "bytes32" | ||
} | ||
], | ||
"internalType": "struct CkbType.Header[]", | ||
"name": "headers", | ||
"type": "tuple[]" | ||
} | ||
], | ||
"name": "update", | ||
"outputs": [], | ||
"stateMutability": "view", | ||
"type": "function" | ||
} | ||
] | ||
} |
File renamed without changes.
Oops, something went wrong.