type IstanbulExtra struct {
// AddedValidators are the validators that have been added in the block
AddedValidators []common.Address
// AddedValidatorsPublicKeys are the BLS public keys for the validators added in the block
AddedValidatorsPublicKeys []blscrypto.SerializedPublicKey
// AddedValidatorsG1PublicKeys are the BLS public keys for the validators added in the block
AddedValidatorsG1PublicKeys []blscrypto.SerializedG1PublicKey
// RemovedValidators is a bitmap having an active bit for each removed validator in the block
RemovedValidators *big.Int
// Seal is an ECDSA signature by the proposer
Seal []byte
// AggregatedSeal contains the aggregated BLS signature created via IBFT consensus.
AggregatedSeal IstanbulAggregatedSeal
// ParentAggregatedSeal contains and aggregated BLS signature for the previous block.
ParentAggregatedSeal IstanbulAggregatedSeal
}
type IstanbulAggregatedSeal struct {
// Bitmap is a bitmap having an active bit for each validator that signed this block
Bitmap *big.Int
// Signature is an aggregated BLS signature resulting from signatures by each validator that signed this block
Signature []byte
// Round is the round in which the signature was created.
Round *big.Int
}
enumMessageType { CALLDATA, MESSAGE }// @notice This is the configuration you need across the chain. // @param relay - When it is true, the relay chain is required to perform a special execution to continue across the chain.
// @param msgType - Different execution patterns of messages across chains.// @param target - The contract address of the target chain.// @param payload - Cross-chain content.// @param gasLimit - The gasLimit allowed to be consumed by an operation performed on the target chain.// @param value - Collateral value cross-chain, currently not supported, default is 0.structMessageData {bool relay; MessageType msgType;bytes target;bytes payload;uint256 gasLimit;uint256 value; }// @notice Gets the fee to cross to the target chain.// @param toChain - Target chain chainID.// @param feeToken - Token address that supports payment fee,if it's native, it's address(0).// @param gasLimit - The gasLimit allowed to be consumed by an operation performed on the target chain. function getMessageFee(uint256 toChain, address feeToken, uint256 gasLimit) external view returns(uint256, address);
// @notice Initiate cross-chain transactions. Generate cross-chain logs.// @param toChain - Target chain chainID.// @param messageData - Structure MessageData encoding.// @param feeToken - In what Token would you like to pay the fee. function transferOut(uint256 toChain, bytes memory messageData, address feeToken) external payable returns(bytes32);
// @notice Add the fromaddress permission.// @param fromChain - The chainID of the source chain.// @param fromAddress - The call address of the source chain.// @param tag - Permission,false: revoke permission.functionaddRemoteCaller(uint256 fromChain,bytesmemory fromAddress,bool tag) external;// @notice Query whether the contract has execution permission.// @param mosAddress - This is the mos query address.// @param fromChainId - The call chain id of the source chain.// @param fromAddress - The call address of the source chain. function getExecutePermission(address mosAddress,uint256 fromChainId,bytes memory fromAddress) external view returns(bool);
event mapMessageOut(uint256 indexed fromChain, uint256 indexed toChain, bytes32 orderId, bytes fromAddrss, bytes callData);
event mapMessageIn(uint256 indexed fromChain, uint256 indexed toChain, bytes32 orderId, bytes fromAddrss, bytes callData, bool result, bytes reason);