-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add scripts, transactions and a test example on how to interact with Solidty contracts through Flow EVM #6
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting idea...I wonder if something like a Cadence-native diamond pattern (ERC-2535) would be a useful example
Port of the guide in https://ethereum.org/en/developers/docs/apis/json-rpc/#interacting-with-smart-contract