rusk icon indicating copy to clipboard operation
rusk copied to clipboard

Add token migration contract bindings

Open HDauven opened this issue 7 months ago • 0 comments

Summary

Integrate the DUSK migration contract for BEP20 and ERC20 DUSK tokens . This requires the creation of an ABI for the migration function on the DUSK migration contract, and bindings to the DUSK BEP20/ERC20 token to allow the spending of DUSK in name of the migration contract.

Solution

Define the interface of the migration contract and BEP20/ERC20 DUSK tokens. Use WAGMI to read and write to contracts.

It's useful to create wrapper functions for the following ERC20 calls:

  • allowance -> read
  • approve -> write
  • balanceOf -> read

And for the migration contract:

  • migrate -> write

HDauven avatar Jul 24 '24 08:07 HDauven