SymmioPartyA

Each SymmioPartyA instance is a sub-account that forwards calls to the Symmio diamond on behalf of a user. It is created and managed by the MultiAccount contract, supports ERC-1271 signature validation, and can hold and transfer trade NFTs.

Constructor

Initializes a new SymmioPartyA contract with the MultiAccount as admin and a reference to the Symmio diamond.

constructor(address multiAccountAddress_, address symmioAddress_) {
    _grantRole(DEFAULT_ADMIN_ROLE, multiAccountAddress_);
    symmioAddress = symmioAddress_;
    multiAccountAddress = multiAccountAddress_;
}

Parameters:

  • multiAccountAddress_: The MultiAccount contract that manages this sub-account. Granted DEFAULT_ADMIN_ROLE.

  • symmioAddress_: The address of the Symmio diamond contract to which calls are forwarded.


setSymmioAddress

Updates the Symmio diamond address. Only callable by DEFAULT_ADMIN_ROLE (the MultiAccount contract).

function setSymmioAddress(address symmioAddress_) external onlyRole(DEFAULT_ADMIN_ROLE);

Parameters:

  • symmioAddress_: The new Symmio diamond address.

Event: SetSymmioAddress(oldAddress, newAddress)


call()

Forwards a call from this sub-account to the Symmio diamond. Only callable by the MultiAccount contract (onlyMultiAccount).

Parameters:

  • callData: ABI-encoded function call to forward to the Symmio diamond.

Returns:

  • success: Whether the call succeeded.

  • resultData: The return data (or revert reason on failure).


isValidSignature()

ERC-1271 signature verification. Delegates to the MultiAccount contract to check whether the signature is valid for this sub-account.

Returns 0x1626ba7e (the ERC-1271 magic value) if valid, 0xffffffff otherwise.


transferTradeNFT()

Transfers a trade NFT held by this sub-account to another address. Only callable by the MultiAccount contract.

Parameters:

  • nftContract: The TradeNFT contract address.

  • to: The recipient address.

  • tokenId: The NFT token ID to transfer.

Uses safeTransferFrom. Reverts with NFTTransferFailed if the transfer fails.

Event: NFTTransferred(to, tokenId)


onERC721Received()

Implements IERC721Receiver so this contract can receive trade NFTs via safeTransferFrom.

Returns the selector IERC721Receiver.onERC721Received.selector.


Last updated