Skip to content
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

🧩 ERC-7412 Support #9

Merged
merged 15 commits into from
Oct 5, 2023
Merged

🧩 ERC-7412 Support #9

merged 15 commits into from
Oct 5, 2023

Conversation

JaredBorders
Copy link
Contributor

@JaredBorders JaredBorders commented Sep 27, 2023

Support calls to ERC-7412.fulfillOracleQuery function from the SMv3 Engine

Description

  • Implement EIP7412.sol
  • Add ERC2771Context to Engine.sol
  • Replace msg.sender with ERC2771Context._msgSender()
  • Add _trustedForwarder parameter to the Engine.constructor
  • Test EIP7412.sol
  • Deploy SMv3 to Base Goerli
  • Update gas-snapshot
  • Update lcov
  • Update .env-example (PRIVATE_KEY must now start with 0x else parsing will fail within deploy script)

Related issue(s)

N/A

Motivation and Context

These changes are required to interact with Synthetix Perps v3 after it adopted ERC-7412

Copy link
Contributor

@jcmonte jcmonte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, seems pretty straight forward.

My only question: is the intent by not restricting function calls to the trusted forwarder, to enable our own internal multicall to be used in the future?

@@ -11,4 +11,7 @@ contract OptimismParameters {
0xb2F30A7C980f052f02563fb518dcc39e6bf38175;

address public constant PYTH = 0xff1a0f4744e8582DF1aE09D5611b887B6a12925C;

/// @custom:todo Optimism doesn't have a trusted forwarder yet
address public constant TRUSTED_FORWARDER = address(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Are we not going to use this contract yet then? We will just wait until the trusted forwarder is deployed on OP before we deploy our new SMv3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will wait until the trusted forwarder is on OP before deploying

Copy link
Contributor

@tommyrharper tommyrharper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@tommyrharper
Copy link
Contributor

One thing I am not clear on (separate to this PR) is how the nonceBitmap thing works.

@JaredBorders JaredBorders merged commit d694990 into main Oct 5, 2023
2 of 3 checks passed
@JaredBorders JaredBorders deleted the ERC-7412 branch October 19, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request smart-contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants