An integrator may consider the following integration options related to wrapped FIO Domain.
For wallets desiring full control over the registration user experience, the best strategy is to execute mapping actions directly to the FIO Chain.
Domain wrapping is accomplished using the wrapdomain action. Wrapped domains may be unwrapped by calling the
unwrapnft action on the Polygon fionft ERC721 contract. Note that wrapping and unwrapping cannot be accomplished entirely inside the FIO Protocol and requires FIO oracle middleware software and an ERC721 contract on the Polygon chain.
The following gives an overview of the domain wrapping process:
- Alice wants to wrap her
alicedomain to her public address on the Polygon chain.
- Alice fetches the Oracle fee using
- Alice executes the wrapdomain action and passes in:
- domain: "alice" (the amount of FIO to be wrapped, in SUFs)
- publicaddress: "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B" (the Polygon address where domain should be delivered)_
- chaincode: "MATIC" (For the initial version, only domain wrapping to the Polygon "MATIC" chain is supported)_
- maxoracle_fee: 2000000000 (maximum amount of FIO user A is willing to pay the Oracles)_
- maxfee: 1000000000 (maximum amount of FIO user A is willing to pay for the FIO chain fee)_
- tpid: "rewards@wallet"
- actor: "aftyershcu22"
- The domain is transferred from Alice to the wrapping smart contract account on the FIO Chain.
- Oracle fee is transferred from Alice and distributed evenly to all registered Oracles.
- Oracles monitor every block looking for the
- Once detected Oracles trigger minting of a FIO Domain NFT to Alice's public address on the Polygon chain.
The following gives an overview of the domain unwrapping process:
- Alice wants to unwrap her
alicedomain from Polygon to her crypto handle on FIO Chain.
- Alice executes the
unwrapnftaction on the Polygon contract.
- Oracles monitor unwrapnft events on the Polygon contract.
- Once detected each Oracle executes the
unwrapdomainaction on the FIO chain and passes in:
- fio_domain: "alice" (the amount of FIO to be unwrapped, in SUFs)
- fio_address: "alice@wallet" (The crypto handle which will recieve the unwrapped domain)
- Once the last Oracle executes
unwrapdomainaction, the domain ownership is transferred to Alice's FIO account.
Integrating these actions require the integrator to have access to user's Private key and properly serialize and sign each transaction. For additional information, see Write Transaction.
|Action||Description||Can be paid with bundled tx?|
|wrapdomain||This action wraps FIO Domain to another chain.||No|
Alternatively to Native Integration, the application may link the user to to the FIO App, a comprehensive website to register and manage FIO Handles and many other functionality related to FIO Protocol.
For additional information, see FIO App.
Updated about 2 months ago