Add scripts, transactions and a test example on how to interact with Solidty contracts through Flow EVM#6
Open
Add scripts, transactions and a test example on how to interact with Solidty contracts through Flow EVM#6
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6 +/- ##
==========================================
+ Coverage 99.14% 99.16% +0.02%
==========================================
Files 4 5 +1
Lines 117 120 +3
==========================================
+ Hits 116 119 +3
Misses 1 1 ☔ View full report in Codecov by Sentry. |
| // } | ||
| // } | ||
| // ABI for the above Solidity contract | ||
| let contractCode = "6060604052341561000f57600080fd5b60eb8061001d6000396000f300606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063c6888fa1146044575b600080fd5b3415604e57600080fd5b606260048080359060200190919050506078565b6040518082815260200191505060405180910390f35b60007f24abdb5865df5079dcc5ac590ff6f01d5c16edbc5fab4e195d9febd1114503da600783026040518082815260200191505060405180910390a16007820290509190505600a165627a7a7230582040383f19d9f65246752244189b02f56e8d0980ed44e7a56c0b200458caad20bb0029" |
There was a problem hiding this comment.
Is there a way to pull this value from a local JSON file containing Cadence JSON args?
| let account <- EVM.createCadenceOwnedAccount() | ||
| account.deposit(from: <-self.sentVault) | ||
|
|
||
| self.auth.storage.save<@EVM.CadenceOwnedAccount>( |
There was a problem hiding this comment.
I think we'd also want to issue an un-entitled COA Capability at /public/evm so things like the COA ownership proof and public deposits are accessible
| @@ -0,0 +1,16 @@ | |||
| access(all) contract SolidityContractsRegistry { | |||
|
|
|||
| access(all) let contractRegistry: {String: [UInt8; 20]} | |||
There was a problem hiding this comment.
Interesting idea...I wonder if something like a Cadence-native diamond pattern (ERC-2535) would be a useful example
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.
Port of the guide in https://ethereum.org/en/developers/docs/apis/json-rpc/#interacting-with-smart-contract