Skip to content

Commit

Permalink
[SOURCIFY] Fix client::get_source_files_any test (#924)
Browse files Browse the repository at this point in the history
* Fix client::get_source_files_any test case

* Update order of files
  • Loading branch information
rimrakhimov authored Jun 13, 2024
1 parent a1e07c7 commit 457af68
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
14 changes: 12 additions & 2 deletions libs/sourcify/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,22 @@ mod tests {
"files": [
{
"name": "Example.sol",
"path": "contracts/full_match/11155111/0x4e7095a3519a33df3d25774c2f9d7a89eb99745d/sources/contracts/Example.sol",
"path": "contracts/full_match/11155111/0x4E7095a3519A33dF3D25774c2F9D7a89eB99745D/sources/contracts/Example.sol",
"content": "library Lib {\n function sum(uint256 a, uint256 b) external returns (uint256) {\n return a + b;\n }\n}\n\ncontract A {\n function sum(uint256 a, uint256 b) external returns (uint256) {\n return Lib.sum(a, b);\n }\n}\n"
},
{
"name": "creator-tx-hash.txt",
"path": "contracts/full_match/11155111/0x4E7095a3519A33dF3D25774c2F9D7a89eB99745D/creator-tx-hash.txt",
"content": "0x4b511e8d9bcd56407bc348631d04a673b39c859a036e5cd49df7526a8de29b93"
},
{
"name": "library-map.json",
"path": "contracts/full_match/11155111/0x4E7095a3519A33dF3D25774c2F9D7a89eB99745D/library-map.json",
"content": "{\"__$50698f9fab9190debff1c0247749d3c3d0$__\":\"0xf145e3a26c6706f64d95dc8d9d45022d8b3d676b\"}"
},
{
"name": "metadata.json",
"path": "contracts/full_match/11155111/0x4e7095a3519a33df3d25774c2f9d7a89eb99745d/metadata.json",
"path": "contracts/full_match/11155111/0x4E7095a3519A33dF3D25774c2F9D7a89eB99745D/metadata.json",
"content": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"a\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"b\",\"type\":\"uint256\"}],\"name\":\"sum\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Example.sol\":\"A\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/Example.sol\":{\"keccak256\":\"0x74f0b08e915377a73ed19a56ae3bfce73f4a75c2b9c76ce3c450c2e3f35ad730\",\"urls\":[\"bzz-raw://57df7d0de4fd2c829d638021ea6ed9845fe04c6ad68ed9bd516ca82295ffbfea\",\"dweb:/ipfs/QmR8QjtWYAW2RuyvZVKJMNS3Wp38rRQP33FxviuRdf1Vek\"]}},\"version\":1}"
}
]
Expand Down
Loading

0 comments on commit 457af68

Please sign in to comment.