Should live in a new repo probably? or maybe in hyperlane-token
Should include:
GasRouter (either as a separate lib or using a StorageMap or something)
Encoding / decoding of messages just as we do in Solidity
Minting and burning tokens as required
Note that tokens are first-class citizens in the FuelVM, and we should be minting / burning using the functions provided in the std lib. Balances are also denominated as u64s, not uint256s, which means that these warp route tokens probably need to have different token decimals than their remote counterparts :| https://fuellabs.github.io/sway/v0.23.0/blockchain-development/native_assets.html for context
I asked them what their native ERC20 bridge will be doing and got this as a response:
It's not set in stone yet, but 18 decimals seems to be most common [on L1 Ethereum] which will be converted to 9 [decimals] on Fuel. Anything less than 9 [decimals, like USDC's 6 decimals] we'll probably just match
Build in such a way such that HypERC20Collateral can tap into things easily as well
Should live in a new repo probably? or maybe in
hyperlane-token
Should include:
Note that tokens are first-class citizens in the FuelVM, and we should be minting / burning using the functions provided in the std lib. Balances are also denominated as u64s, not uint256s, which means that these warp route tokens probably need to have different token decimals than their remote counterparts :| https://fuellabs.github.io/sway/v0.23.0/blockchain-development/native_assets.html for context
I asked them what their native ERC20 bridge will be doing and got this as a response:
Build in such a way such that HypERC20Collateral can tap into things easily as well
Also check out https://github.com/FuelLabs/rfcs/issues/13 for the frc 20 standard