Warning
from_handler and to_handler must verify whether they are authorized addresses.
Handler Contract Needs to Verify Whether the Call is from the Settlement Contract
The receive_cross_chain_callback
and receive_cross_chain_msg
methods should verify if msg.sender
is the settlement
address set during contract deployment.
Interface Handler Validation
Only the owner can call add_handler
and remove_handler
.
interface ISettlementHandler {
is_valid_handler(string chain_name, uint256 handler) bool;
add_handler(string chain_name, uint256 handler);
remove_handler(string chain_name, uint256 handler);
}
Next Version Upgrade: The contract callback will add a resp
field to address developers' needs for custom return data in messages.
PayloadType
enum PayloadType {
Raw,
BTCDeposit,
BTCWithdraw,
BTCStake,
BTCUnstake,
ERC20,
ERC721
}
BTC Deposit Event and Call Flow