You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation here does not address these questions.
(1) Should the name (ticker) of the token on the Polygon network be the same as the name of the token on Ethereum mainnet? So if my Ethereum ERC20 token is called XYZ, should the Polygon version be called just XYZ, or should it be called wXYZ?
(2) Why does the ChildMintableERC20.withdraw function have no access controls? I realize if a user calls this, it will only lose them tokens, but shouldn't you limit access to calling this function to only a Polygon router? Otherwise maybe a user can burn tokens early, which will make the router fail when trying to move tokens between chains. Who knows, it could trigger some security vulnerability. All router-specific functions should be locked down and limited so that only the router can call them.
(3) Why does the ChildMintableERC20.deposit function take an argument bytes calldata depositData, which has to be decoded through abi.decode? Why isn't the parameter decoded before it is passed to this function?
(4) Why does the mint function require the role DEFAULT_ADMIN_ROLE, while deposit requires DEPOSITOR_ROLE? In practice, is it only one router contract that has both roles? Your documentation on mintable assets does not talk about what the DEFAULT_ADMIN_ROLE role is, or which router contract should be assigned this role.
(5) Your contract DummyMintableERC20 has a function mint(address user, uint256 amount) which has the same signature as the function of the same name in ChildMintableERC20. However, the former takes role PREDICATE_ROLE and the latter takes role DEFAULT_ADMIN_ROLE. If I want to deploy the same exact contract to Ethereum mainnet and Polygon, does this mean this function needs to be callable by two different contracts, one for each of the two roles?
The text was updated successfully, but these errors were encountered:
Also, is there any advantage to using the Polygon bridging function, rather than using Multichain to move assets to and from Ethereum mainnet? The functionality seems to be exactly the same.
I have several questions on Polygon mintable assets, based on the templates in this repository:
https://github.com/maticnetwork/pos-portal/blob/master/flat/ChildMintableERC20.sol
https://github.com/maticnetwork/pos-portal/blob/master/flat/DummyMintableERC20.sol
The documentation here does not address these questions.
(1) Should the name (ticker) of the token on the Polygon network be the same as the name of the token on Ethereum mainnet? So if my Ethereum ERC20 token is called XYZ, should the Polygon version be called just XYZ, or should it be called wXYZ?
(2) Why does the
ChildMintableERC20.withdraw
function have no access controls? I realize if a user calls this, it will only lose them tokens, but shouldn't you limit access to calling this function to only a Polygon router? Otherwise maybe a user can burn tokens early, which will make the router fail when trying to move tokens between chains. Who knows, it could trigger some security vulnerability. All router-specific functions should be locked down and limited so that only the router can call them.(3) Why does the
ChildMintableERC20.deposit
function take an argumentbytes calldata depositData
, which has to be decoded throughabi.decode
? Why isn't the parameter decoded before it is passed to this function?(4) Why does the mint function require the role
DEFAULT_ADMIN_ROLE
, while deposit requiresDEPOSITOR_ROLE
? In practice, is it only one router contract that has both roles? Your documentation on mintable assets does not talk about what theDEFAULT_ADMIN_ROLE
role is, or which router contract should be assigned this role.(5) Your contract
DummyMintableERC20
has a functionmint(address user, uint256 amount)
which has the same signature as the function of the same name inChildMintableERC20
. However, the former takes rolePREDICATE_ROLE
and the latter takes roleDEFAULT_ADMIN_ROLE
. If I want to deploy the same exact contract to Ethereum mainnet and Polygon, does this mean this function needs to be callable by two different contracts, one for each of the two roles?The text was updated successfully, but these errors were encountered: