Table of Contents |
---|
...
Functionality | ||
---|---|---|
Alice (via dApp) called |
| |
Oracle monitors |
TBD: Both methods require a history node so we should reach out to BPs with the requirements and ask which method they prefer | |
Oracle validates Ensure finality. Don’t end up on a fork. It is common to have transactions go into a mempool, and thentransaction ends up in an uncle (orphan) block. If the transaction in the uncle block has not been validated elsewhere, then it should be returned to the mempool. But, there are situations where it can disappear from the mempool.Err on the side of waiting to make sure the block has reached finality. Only process one transaction at a time to reduce complexity. If exceptions are found, Oracle takes action to unwind transaction | See Exception handling below | |
Oracle executes | wrap(ethaddress, FIO (SUF) amount, obtid);
| |
Listen for unwrapped events | Oracle validates |
|
Once all Oracles have submitted | TBD: Does the oracle do any kind of monitoring or validation of the overall transaction (post consensus?) |
Exception handling
Error condition | Trigger | Type | fields:name | fields:value | Error message | Oracle Action |
---|---|---|---|---|---|---|
Invalid chain | Chain passed to | Oracle triggers | ||||
Invalid Ethereum address | Public address passed to | Oracle triggers | ||||
...
Functionality | |
---|---|
Alice (dApp) executes | unwrap(fio address, amount);
|
Oracle monitors |
|
Oracle validates | Validation includes:
|
If exceptions are found, Oracle takes action to unwind transaction | See Exception handling below |
Registered Oracles call | fio.oracle contract Actions:
|
Oracle validates |
|
Once all Oracles have submitted | TBD: Does the oracle do any kind of monitoring or validation of the overall transaction (post consensus?) |
Exception handling
Error condition | Trigger | Type | fields:name | fields:value | Error message | Oracle Action |
---|---|---|---|---|---|---|
Invalid FIO Address | FIO Address passed in with ERC-20 is not valid or does not exist | Oracle triggers a ERC20
| ||||