Arcana Contract Flows
The interactions between various Arcana smart contracts to implement the logic for the Arcana Auth protocol is captured by the following two workflows:
- Data access flow
- New app registration flow
Data Access Flow
-
All app user operation-related calls made via the client-side Arcana Auth SDK are intercepted by the Arcana Gateway.
-
The Gateway executes meta transactions with relevant data and signatures.
-
Forwarder forwards the transaction via the per-app
BeaconProxy.sol
smart contract. -
The BeaconProxy requests the current Arcana core system contract,
Arcana.sol
, from theArcanaBeacon.sol
contract. -
After receiving the address of the latest Arcana core system contract from the
ArcanaBeacon
contract, the BeaconProxy delegates the forwarded call to the Arcana system contract. -
{{ no such element: dict object['compay_name'] }} contract actually executes the transaction.
New App Registration Flow
- When a new app is registered at the Arcana Developer Dashboard, it interacts with the Arcana Gateway to initialize the program state of the app.
-
The
Factory.sol
smart contract is invoked to create a newBeaconProxy.sol
contract that is solely associated with this newly registered app. Each app has its own BeaconProxy contract deployed. -
The
BeaconProxy.sol
contract stores the per-app data related to the program state. -
The BeaconProxy communicates with the
ArcanaBeacon
contract to obtain the address of the latest Arcana core system contract. This ensures that each app contract knows and utilizes the latest supported Arcana Auth protocol.