-
Notifications
You must be signed in to change notification settings - Fork 192
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
Permit2 sdk #1724
Permit2 sdk #1724
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
express_relay/sdk/js/src/index.ts
Outdated
opportunityAdapterInitBytecodeHash: Hex | ||
): Address { | ||
const saltHex = searcher.replace("0x", "").padStart(64, "0"); | ||
const create2Address = `0x${keccak256( |
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.
you can use:
https://viem.sh/docs/utilities/getContractAddress
@@ -164,12 +164,12 @@ export interface components { | |||
* @description The network chain id parameter for EIP712 domain. | |||
* @example 31337 | |||
*/ | |||
chain_id: string; |
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.
why not just remove this EIP712 all together?
opportunityAdapterConfig.opportunity_adapter_init_bytecode_hash | ||
) | ||
), | ||
nonce: bidParams.nonce, |
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.
nonce should have a default random value. Otherwise, we should document somewhere on what this value should be
express_relay/sdk/js/src/index.ts
Outdated
): TokenPermissions[] { | ||
const permitted: TokenPermissions[] = []; | ||
|
||
for (let i = 0; i < tokens.length; i++) { |
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.
use map
Upgrade SDKs to permit2 + factory