Made a test for reading block gas limit in contracts#337
Closed
joelamouche wants to merge 2 commits intomasterfrom
Closed
Made a test for reading block gas limit in contracts#337joelamouche wants to merge 2 commits intomasterfrom
joelamouche wants to merge 2 commits intomasterfrom
Conversation
JoshOrndorff
reviewed
Apr 8, 2021
Contributor
JoshOrndorff
left a comment
There was a problem hiding this comment.
The test looks good. Thanks @joelamouche Mind if I take over this PR and merge it once I get the test passing?
| import { AbiItem } from "web3-utils"; | ||
| import solc from "solc"; | ||
|
|
||
| export function compileSolidity(contractContent: string, contractName: string = "Test") { |
Contributor
There was a problem hiding this comment.
Yeah, this is awesome! We should do all of our solidity-based tests this way.
Contributor
Author
There was a problem hiding this comment.
So at first I thought to myself that the repo would be cleaner if we did this for every single contract but then I thought that recompiling every contract every test might slightly increase the duration of testing. Thoughts @crystalin @JoshOrndorff ?
Collaborator
|
We should have a smart contract factory, that compiles (and kind of cache)
on demand
…On Thu, Apr 8, 2021, 11:03 AM Antoine Estienne ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In tests/tests/constants/testContracts.ts
<#337 (comment)>:
> @@ -1,4 +1,33 @@
import { AbiItem } from "web3-utils";
+import solc from "solc";
+
+export function compileSolidity(contractContent: string, contractName: string = "Test") {
So at first I thought to myself that the repo would be cleaner if we did
this for every single contract but then I thought that recompiling every
contract every test might slightly increase the duration of testing.
Thoughts @crystalin <https://github.com/crystalin> @JoshOrndorff
<https://github.com/JoshOrndorff> ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#337 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQMIATEUMX2VN3BYABVXLTHXAVBANCNFSM42SXABCA>
.
|
Contributor
Author
|
What do you mean by "kind of cache" ? |
Collaborator
|
I meant that if you request the same contract in another test it serves the
bytecode right away without recompiling it
…On Thu, Apr 8, 2021, 12:42 PM Antoine Estienne ***@***.***> wrote:
What do you mean by "kind of cache" ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#337 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQMIHFMG7FB5YJKNRXGPLTHXMHJANCNFSM42SXABCA>
.
|
Collaborator
|
Closing it in favor of #370 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does it do?
What important points reviewers should know?
Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?
polkadot-evm/frontier#327
polkadot-evm/frontier#332
Checklist