Support multi-file smart contracts (debugging)
See original GitHub issueThe compiler should support smart contracts that are spread over multiple .java
files.
Because Java does not have functionality like C# provides with the keyword partial
, another solution is needed for enabling multi-file contracts.
Our proposal is to use an annotation which has a name or ID attribute. That annotation is then applied to every class that is part of the smart contract and the compiler can determine using the name/ID of that annotation if two or more files belong to the same contract.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Debugging an Example Smart Contract - Truffle Suite
Introducing Truffle for VS Code Simplified building, debugging, deploying! ... Press Enter multiple times to cycle through the steps.
Read more >Debugging Smart Contracts - Ethereum Blockchain Developer
If you are looking into a more advanced way to debugging smart contracts, then wait until we use Truffle, or directly head over...
Read more >Debugging smart contracts - Algorand Developer Portal
Smart contracts can be debugged using two different methods. The first is an interactive debugger that uses the tealdbg command-line tool to launch...
Read more >Debugging Smart Contracts with SmartACE - SeaHorn
In this tutorial, we show how smart contract invariants can be expressed in temporal logic, converted into monitors, and then instrumented ...
Read more >Debugging a Smart Contract
The main method used to debug smart contract is Caveman Debugging, where we utilize the printing functionality to inspect the value of a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, i was imagining the same. The contract class is like the entry point to the compilation and the other classes will be processed because the contract class makes use of them. The helper/dependency classes will be discovered automatically because they will be in the classpath of the ClassLoader passed to the
Compiler
.I’m not a huge fan of automatically identifying it because I think the developer gets a clearer picture if she actually has to state which class is the contract class.
Ok, I agree with this argument: so, the definition of a smart contract in Java, is: “a .java file which contains, among other information, all ‘invokable’ methods which users might interact with”
Yes… so, it means that: all other .java files are “dependencies” of the smart contract, and should be also compiled and “embedded” to the final
.avm
. Right?Absolutely. I also think that we’re not far from it! 🚀 ⭐