sygma-sdk
sygma-sdk copied to clipboard
Add mainet domains and resources as constants
To make interaction flow even more straightforward, especially when interacting with mainet - we file with all supported Domain
s and Resource
s 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