-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permissionless Adapters #20
Conversation
/// GlacisTokenMediator has. Similarly, the retry function has been replaced | ||
/// with a `sendCrossChainRetry`. | ||
/// Developers using this must ensure that their token has the same address on | ||
/// each chain. | ||
contract SimpleTokenMediator is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: What about XERC20Mediator as name? Since it is using XERC20 pure standard without the extension perhaps it is more informative of the overall functionality of the contract
@@ -10,7 +10,6 @@ import {AddressBytes32} from "../libraries/AddressBytes32.sol"; | |||
|
|||
error GlacisRouter__GMPNotSupported(); //0xed2e8008 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we remove this error signatures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's required if one of our reserved GMPs isn't used yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean what's after "//0x", it breaks the error table generating script
@@ -2,7 +2,7 @@ | |||
|
|||
pragma solidity 0.8.18; | |||
|
|||
import "@openzeppelin/contracts/access/Ownable.sol"; | |||
import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's actually a major issue with token mediators now. EOAs can't always accept now because the fromGmpId
could be a custom adapter.
// If the destination smart contract is an EOA, then we allow it.
address toAddress = to.toAddress();
if (toAddress.code.length == 0) {
return true;
}
Should also leave uint8 if necessary and standardize to a higher bound (based off of GLACIS_RESERVED_IDS) |
SimpleTokenAdapter
for developers who don't want to use our token adapter@gusjavaz Would be helpful if you looked this over when you get the chance (no rush as Halborn is looking through the current code still). Don't merge still if you do approve, as I'd like the Halborn folks to also take a look at the PR.
Also, coverage works again: