PartyA
The SymmioPartyA
contract serves as a proxy for users to interact with the Symmio platform via their respective sub-accounts. Each sub-account, represented by an instance of SymmioPartyA
, can forward calls to the Symmio diamond. Here's a detailed breakdown of the functionalities and features provided by this contract:
Constructor
Initializes a new SymmioPartyA
contract with specific roles and addresses.
Parameters:
admin
: The administrator of the contract who is granted theDEFAULT_ADMIN_ROLE
.multiAccountAddress
: The address of theMultiAccount
contract, granted theMULTIACCOUNT_ROLE
to allow it to make calls on behalf of the sub-account.symmioAddress_
: The initial address of the Symmio platform contract to which all calls will be forwarded.
Operations:
Grants
DEFAULT_ADMIN_ROLE
toadmin
.Grants
MULTIACCOUNT_ROLE
tomultiAccountAddress
.Sets the initial Symmio platform address (this is the Diamond).
setSymmioAddress()
Updates the address of the Symmio platform contract. Only an account with DEFAULT_ADMIN_ROLE
can invoke this function.
Parameters:
symmioAddress_
: The new address of the Symmio platform.
Operations:
Emits a
SetSymmioAddress
event containing the old and new addresses.Updates the
symmioAddress
state variable.
Events:
_call()
Forwards calls from the SymmioPartyA
contract to the Symmio platform. This method is crucial for interacting with the Symmio functionalities through sub-accounts. Only an account with MULTIACCOUNT_ROLE
can invoke this function, meaning only the MultiAccount
contract can direct actions.
Parameters:
_callData
: The bytecode of the function call to be forwarded to the Symmio platform.
Returns:
_success
: A boolean indicating whether the call was successful._resultData
: The data returned from the call if successful, or error information if the call failed.
Last updated