Conversation
1496f9e to
13051ca
Compare
e9a7836 to
2b3e86b
Compare
| log::info!("Received SUDT"); | ||
|
|
||
| // Sleep some time so the ack can be written to axon. | ||
| std::thread::sleep(Duration::from_secs(60)); |
There was a problem hiding this comment.
can here also run a Js script to listen and check the write-back of ack packet ?
There was a problem hiding this comment.
It's certainly possible. What function/event should be checked? Is it AcknowledgePacket?
There was a problem hiding this comment.
like using this method to emit a custom event which takes as a symbol of operation finished
There was a problem hiding this comment.
I think AcknowledgePacket is better because it doesn't require modifying the contract to emit an event just for testing. I'll try this.
There was a problem hiding this comment.
does it work, for listening AcknowledgePacket event from Axon?
There was a problem hiding this comment.
It seems like the acknowledge_packet function is never called on axon.
|
please check the CI output and figure out the new added test code was not impacted by the errors from Axon event monitor https://github.com/synapseweb3/forcerelay/actions/runs/6310730564/job/17133270135?pr=332 (move into |
|
The errors are probably from previous tests. |
15168316096
left a comment
There was a problem hiding this comment.
See if it is necessary to add lld dependency installation instructions in the readme to prevent errors when compiling axon,
ref:
| #[async_trait] | ||
| pub trait AxonRpc { | ||
| async fn get_block_by_id(&self, block_id: BlockId) -> Response<AxonBlock>; | ||
| async fn get_block_by_id(&self, block_id: BlockId) -> Response<Option<AxonBlock>>; |
There was a problem hiding this comment.
The addition of Option is to increase the robustness of rpc, but considering that the return type of the interface has also changed, compatibility needs to be considered.
There was a problem hiding this comment.
When you want to verify the integration test locally, you need to pay attention to the environment variables involved in the workflows and whether you need to supplement the local readme instructions. For example, in ubuntu, you can use the following command to carry out the integration test
$ export PATH=$PATH:/tmp/ckb_v0.110.0_x86_64-unknown-linux-gnu
@nikaJames95 ➜ /workspaces/forcerelay (ckb-axon-transfer-test) $ export PATH=$PATH:${SRC_DIR}/axon/target/release/
@nikaJames95 ➜ /workspaces/forcerelay (ckb-axon-transfer-test) $ export PATH=$PATH:${SRC_DIR}/ibc-solidity-contract
export CHAIN_COMMAND_PATHS="value1,value2"
export ACCOUNT_PREFIXES="prefix1,prefix2"
export AXON_SRC_PATH="/path/to/axon"
export IBC_CONTRACTS_SRC_PATH="/path/to/ibc-solidity-contract"
export RUST_LOG="info"
export RUST_BACKTRACE="1"
b255da8 to
a20e0be
Compare
|
|
||
| impl TestOverrides for SudtErc20TransferTest {} | ||
|
|
||
| impl BinaryConnectionTest for SudtErc20TransferTest { |
There was a problem hiding this comment.
Is it possible to encapsule these code into this trait?
We can use this contract to replace the default transfer module - the 'Mock' contract
There was a problem hiding this comment.
We can refactor this later for a generic transfer test. For now ckb as sink zone is not supported so the only practically supported scenario is CKB source SUDT to/from axon voucher ERC20.
Description
Added ckb <-> axon, SUDT <-> ERC20 transfer test.
PR author checklist:
docs/).Reviewer checklist:
Files changedin the GitHub PR explorer.