Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle-based IMA gas reimbursement #1132

Open
kladkogex opened this issue Apr 29, 2022 · 0 comments
Open

Oracle-based IMA gas reimbursement #1132

kladkogex opened this issue Apr 29, 2022 · 0 comments

Comments

@kladkogex
Copy link
Contributor

kladkogex commented Apr 29, 2022

Oracle-based IMA gas reimbursement

  1. Change signature of
  function transferToSchainERC20(
        string calldata targetSchainName,
        address contractOnMainnet,
        uint256 amount
    )

to

   function transferToSchainERC20(
        string calldata targetSchainName,
        address contractOnMainnet,
        uint256 amount,
        bytes[] oracleResultGasPrice,
        bytes[] oracleResultUserEthOnMainNet
    )
 
  1. Inside the body of transferToSchainERC20() {

a ) verify both oracleResults

b) verify that

userEthOnMainNet / gasPrice >= MINIMUM_GAS_REQUIRED_FOR_A_SUCCESSFUL_ERC20_TRANSFER

  1. Do a similar change for other token types such as NFT
@kladkogex kladkogex changed the title Oracle Reimbusement spec Oracle-based IMA gas reimbursement Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant