Package foundation.icon.btp.xcall
Interface CallService
-
- All Known Implementing Classes:
CallServiceImpl
public interface CallService
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
The name of CallService.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
executeCall(java.math.BigInteger _reqId, byte[] _data)
Executes the requested call message.void
executeRollback(java.math.BigInteger _sn)
Rollbacks the caller state of the request '_sn'.java.math.BigInteger
sendCallMessage(java.lang.String _to, byte[] _data, byte[] _rollback)
Sends a call message to the contract on the destination chain.
-
-
-
Field Detail
-
NAME
static final java.lang.String NAME
The name of CallService.- See Also:
- Constant Field Values
-
-
Method Detail
-
sendCallMessage
java.math.BigInteger sendCallMessage(java.lang.String _to, byte[] _data, byte[] _rollback)
Sends a call message to the contract on the destination chain.- Parameters:
_to
- The BTP address of the callee on the destination chain_data
- The calldata specific to the target contract_rollback
- (Optional) The data for restoring the caller state when an error occurred- Returns:
- The serial number of the request
-
executeRollback
void executeRollback(java.math.BigInteger _sn)
Rollbacks the caller state of the request '_sn'.- Parameters:
_sn
- The serial number of the previous request
-
executeCall
void executeCall(java.math.BigInteger _reqId, byte[] _data)
Executes the requested call message.- Parameters:
_reqId
- The request id_data
- The calldata
-
-