SymmioPartyB Contract (Options)
The SymmioPartyB
contract is the core execution proxy for Party B actors. It provides secure routing, multi-call support, and fine-grained permissioning for interactions with the Symmio core contracts.
This contract allows Party B to batch trade operations, authorize token flows, and interface with both internal and whitelisted external contracts.
Core Functions
๐น Symmio Call Dispatcher
function _call(bytes[] calldata callDatas) external;
Forwards multiple encoded calls to the Symmio core (e.g., opening or closing trades). Enforces selector-level permissions:
restrictedSelectors[sel] == true
: requiresMANAGER_ROLE
otherwise:
TRUSTED_ROLE
orInstantLayer
delegate is sufficient
Reverts if any call fails.
๐น Multicast Executor
function _multicastCall(
address[] calldata dests,
bytes[] calldata datas
) external;
Sends parallel external calls to approved targets. All destination contracts must be whitelisted. Requires TRUSTED_ROLE
.
๐น Token Management
function _approve(address token, uint256 amount) external;
Sets Symmio token allowances. Callable by TRUSTED_ROLE
.
function withdrawERC20(address token, uint256 amount) external;
Withdraws tokens to the caller. Restricted to MANAGER_ROLE
.
๐น Configuration Functions
function setRestrictedSelector(bytes4 sel, bool state) external;
Marks a core selector as restricted to MANAGER_ROLE
.
function setMulticastWhitelist(address addr, bool state) external;
Controls which external contracts can be called via _multicastCall
.
function setSigner(address newSigner) external;
Updates the ERC-1271 signer address used for off-chain validation.
๐น Signature Verification
function isValidSignature(
bytes32 hash,
bytes calldata sig
) external view returns (bytes4);
Returns 0x1626ba7e
if signature is valid; otherwise 0xffffffff
.
๐น Emergency Controls
function pause() external;
function unpause() external;
Enables or disables contract functions under emergency conditions. Controlled via PAUSER_ROLE
/ UNPAUSER_ROLE
.
Once the cooldown period has elapsed, the withdrawal can be finalized:
function completeWithdraw(uint256 id)
Last updated