-
Notifications
You must be signed in to change notification settings - Fork 73
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: enable gas estimation in airnode-examples local flow and E2E test #1836
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3cefe26
ci(examples): use AirnodeRrpV0DryRun in E2E test
dcroote 220e296
fixup! ci(examples): use AirnodeRrpV0DryRun in E2E test
dcroote cb21d0e
feat: enable gas estimation in airnode-examples local flow
dcroote 3900635
fix: typo
dcroote 01b73c2
fix: keep immutability
dcroote 21d9df7
fix: include 'V0' in log printed when deploying AirnodeRrpV0
dcroote 3cf5747
Merge branch 'master' into dcroote/issue1692
dcroote File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@api3/airnode-examples': patch | ||
--- | ||
|
||
Use AirnodeRrpV0DryRun in E2E test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/airnode-examples/contracts/AirnodeRrpForAirnodeStarter.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.9; | ||
|
||
// We need to compile AirnodeRrp.sol and this is the easiest way to make hardhat do that | ||
// We need to compile AirnodeRrp contracts and this is the easiest way to make hardhat do that | ||
import "@api3/airnode-protocol/contracts/rrp/AirnodeRrpV0.sol"; | ||
import "@api3/airnode-protocol/contracts/rrp/AirnodeRrpV0DryRun.sol"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { cliPrint, deployContract, runAndHandleErrors } from '../'; | ||
|
||
const main = async () => { | ||
const airnodeRrpDryRun = await deployContract('@api3/airnode-protocol/contracts/rrp/AirnodeRrpV0DryRun.sol'); | ||
cliPrint.info(`AirnodeRrpV0DryRun deployed to address: ${airnodeRrpDryRun.address}`); | ||
dcroote marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
|
||
runAndHandleErrors(main); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think
await
here is redundant because after this line function is ending.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 initially thought so too and spent a lot of time dealing with strange behavior. Turns out you do need it. I created a simple example to demonstrate. If you run it, "All done" will be printed before the (non-awaited) async call completes.
https://www.typescriptlang.org/play?#code/MYewdgzgLgBANuA5gJQK5jASzIgghATzGBgF4YBDQ4mACgEoyA+GAbwCgYYB6bmAZUwBbVHApQAppXhIAtACd0WHJWokQABwnzxmcDADumKAAsYECVAAqwiSFRROlAxWMwwEgzAAK8kEMwLWlp5CQgQOAA3CUZSFgtrW3soELCI6IAaGAAmAAZ8+noAbidQSAiJADoERFoAIgAZJBhFDGxEVSISUCENOEsJOuL2AF8S9jLoGAAzEBAyTpoGZjZS8HD+6pBauv4oCnkoIZKuBBw0Npx8LoYSsfYJ9dgoTQWqLrpYlg4uChc3WYgW5rcqbGr1XBwOAwAAm4EGw3u7BeGmBQA
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.
Oh, thanks much for this self-explanatory example. It makes me understand the behavior. 🙏🏼