sygma-sdk icon indicating copy to clipboard operation
sygma-sdk copied to clipboard

Add mainet domains and resources as constants

Open MakMuftic opened this issue 1 year ago • 0 comments

To make interaction flow even more straightforward, especially when interacting with mainet - we file with all supported Domains and Resources as constants.

This would allow us for transfer creation to be reduced to be something like this:

  const assetTransfer = new EVMAssetTransfer();
  await assetTransfer.init(provider, Environment.TESTNET);
  
  const transfer: Transfer<Fungible> = {
    sender: await wallet.getAddress(),
    amount: {
      // amount in wei
      amount: "50",
    },
    from: mainet.domains.Ethereum,
    to: mainet.domains.Polygon,
    resource: mainet.resources.USDT,
    recipient: await wallet.getAddress(),
  };

Implementation details

Testing details

  • [ ] Add unit tests

Acceptance Criteria

  • [ ] Have mainet domains and resources exposed as constants

MakMuftic avatar Jun 06 '23 14:06 MakMuftic