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

Update testing scripts #284

Open
Keyrxng opened this issue Aug 21, 2024 · 0 comments
Open

Update testing scripts #284

Keyrxng opened this issue Aug 21, 2024 · 0 comments

Comments

@Keyrxng
Copy link
Member

Keyrxng commented Aug 21, 2024

Requires #274

The linked PR introduces support for stacked permits and extends multi-network capabilities.

Proposed changes for streamlined testing:

  • Setup two Anvil instances:

    • One targeting Gnosis (current setup).
    • Another targeting Ethereum.
  • Configuration requirements:

    • The new instance should operate on port 8546 with networkId 31338.
  • Funding script updates:

    • Update the funding script to reflect the "whale" address as the updated "WXDAI" token holder for this network.
    • Set distinct approvals and balances compared to the first instance for clarity.
  • Script adjustments:

    • Eliminate process.env usage and hardcode necessary values to enhance clarity and prevent operational errors during script execution.
  • Permit generation:

    • Generate two permits from the original instance and one from the new instance, to avoid breaking old tests.
  • Additional testing scripts:

    • Introduce test:anvil-eth and test:fund-eth scripts, to be utilized only when testing this feature.
  • RPC Handler Update:

    • Implement a NODE_ENV check in use-rpc-handler to ensure compatibility:
      return new ethers.providers.JsonRpcProvider(
        networkId === 31337 ? "http://localhost:8545" : "http://localhost:8546", networkId
      );
      This ensures the correct provider is returned since 31338 is not a supported network in the rpcHandler package
time: 2 hours
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants