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

feat!: support per network defaults for txn acceptance timeout #911

Merged
merged 4 commits into from Jul 26, 2022

Conversation

antazoey
Copy link
Contributor

@antazoey antazoey commented Jul 25, 2022

What I did

Allows per network configuration for transaction acceptance timeouts.
Makes the default for local and fork network 20 seconds instead of 2 minutes

How I did it

  • Move config logic to ape_ethereum config
  • Have property on NetworkAPI to read it and use default when not found

How to verify it

  • Create ape project with ape-config.yaml file containing:
ethereum:
  local:
    transaction_acceptance_timeout = 1  # make fail really fast.

Then, try to get a non-existent transaction by first launching a console:

ape console

and then attempting to get a transaction:

txn = networks.provider.get_transaction("0x8f9526ca5ad7c83f4ed91a5d055b1267c0a5d89645307e042e9bbffa8f755391")

(the hash above exists on mainnet but wouldn't in your local environment)

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@antazoey antazoey changed the title feat: support per network defaults for txn acceptance timeout feat!: support per network defaults for txn acceptance timeout Jul 25, 2022
@antazoey antazoey enabled auto-merge (squash) July 26, 2022 01:50
@antazoey antazoey merged commit f1a2c80 into ApeWorX:main Jul 26, 2022
@antazoey antazoey deleted the feat/jules/smaller-timeout-local branch July 26, 2022 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants