You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
problem1
A lot of contracts might contain more than one contract definition and they need to be split into multiple files, each with only a single contract definition. In the end they are re-added my adding the correct import statements, so that the result works in the same way than the single file with multiple contract definitions
problem2
Two people can compile and deploy the same contract.
/user/serapath/solidity/foo.sol with importing /user/serapath/solidity/bar.sol
The compiler will output two different bytecode hashes, so it is hard to verify the contract if you only have the source code, but don't know what was the filepath from which it was compiled.
correct format (example)
sourcecode/xx240gjwspgj4j95K/ (=hash of source.sol where all imports are hash names)
@todo
datdot-tcir#2
: AST import statement analysis and content hash replacementdatdot-tcir#2
: AST import statement analysis and content hash replacement to re-write all contract data into the correct formatproblem1
A lot of contracts might contain more than one contract definition and they need to be split into multiple files, each with only a single contract definition. In the end they are re-added my adding the correct import statements, so that the result works in the same way than the single file with multiple contract definitions
problem2
Two people can compile and deploy the same contract.
/user/serapath/solidity/foo.sol
with importing/user/serapath/solidity/bar.sol
/user/chriseth/solidity/foo.sol
importing/user/christeth/solidity/bar.sol
The compiler will output two different bytecode hashes, so it is hard to verify the contract if you only have the source code, but don't know what was the filepath from which it was compiled.
correct format (example)
sourcecode/xx240gjwspgj4j95K/
(=hash ofsource.sol
where all imports are hash names)source.sol
0x457dsaf704e39fc728058557a113b226207d2212/
contract.json
(= deployed address of Foo instance)0xnv7d56704e39fc728058557a113b226207d2212/
contract.json
(= another deployed address of Foo instance)sourcecode/42j490gj294jg2094jg9w0jg4/
source.sol
sourcecode/v2240gjwspgj4j94w/
source.sol
sourcecode/79g79g79f8f6j6f/
source.sol
0xd556caf704e39fc728058557a113b226207d2212/
contract.json
// ... see above examples ...
0xa64sscaf704e39fc728058557a113b226207d2212/
contract.json
// ... see above examples ...
The text was updated successfully, but these errors were encountered: