Skip to content

Commit

Permalink
conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Jan 24, 2025
2 parents 2352da1 + 32756f0 commit 3611448
Show file tree
Hide file tree
Showing 54 changed files with 572 additions and 917 deletions.
28 changes: 28 additions & 0 deletions contracts/Revert.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,38 @@ struct RevertContext {
bytes revertMessage;
}

/// @notice Struct containing abort context passed to onAbort.
/// @param sender Address of account that initiated smart contract call.
/// bytes is used as the crosschain transaction can be initiated from a non-EVM chain.
/// @param asset Address of asset. On a connected chain, it contains the fungible
/// token address or is empty if it's a gas token. On ZetaChain, it contains the
/// address of the ZRC20.
/// @param amount Amount specified with the transaction.
/// @param outgoing Flag to indicate if the crosschain transaction was outgoing: from ZetaChain to connected chain.
/// if false, the transaction was incoming: from connected chain to ZetaChain.
/// @param chainID Chain ID of the connected chain.
/// @param revertMessage Arbitrary data specified in the RevertOptions object when initating the crosschain transaction.
struct AbortContext {
bytes sender;
address asset;
uint256 amount;
bool outgoing;
uint256 chainID;
bytes revertMessage;
}

/// @title Revertable
/// @notice Interface for contracts that support revertable calls.
interface Revertable {
/// @notice Called when a revertable call is made.
/// @param revertContext Revert context to pass to onRevert.
function onRevert(RevertContext calldata revertContext) external;
}

/// @title Abortable
/// @notice Interface for contracts that support abortable calls.
interface Abortable {
/// @notice Called when a revertable call is aborted.
/// @param abortContext Abort context to pass to onAbort.
function onAbort(AbortContext calldata abortContext) external;
}
Loading

0 comments on commit 3611448

Please sign in to comment.