forked from gakonst/ethers-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(solc): remapping aware libraries (gakonst#1190)
* feat(solc): add Libraries type * feat: add lib applied remappings * test: add lib linking tests * Update ethers-solc/src/artifacts/mod.rs Co-authored-by: Georgios Konstantopoulos <me@gakonst.com> * Update ethers-solc/src/artifacts/mod.rs Co-authored-by: Georgios Konstantopoulos <me@gakonst.com> * Update ethers-solc/src/artifacts/mod.rs Co-authored-by: Georgios Konstantopoulos <me@gakonst.com> * Update ethers-solc/src/artifacts/mod.rs Co-authored-by: Georgios Konstantopoulos <me@gakonst.com> * chore: rustfmt Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
- Loading branch information
Showing
4 changed files
with
357 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"language": "Solidity", | ||
"sources": { | ||
"/private/var/folders/l5/lprhf87s6xv8djgd017f0b2h0000gn/T/tmp_dappPyXsdD/lib/remapping/MyLib.sol": { | ||
"content": "\n// SPDX-License-Identifier: MIT\nlibrary MyLib {\n function foobar(uint256 a) public view returns (uint256) {\n \treturn a * 100;\n }\n}\n" | ||
}, | ||
"/private/var/folders/l5/lprhf87s6xv8djgd017f0b2h0000gn/T/tmp_dappPyXsdD/src/LinkTest.sol": { | ||
"content": "\n// SPDX-License-Identifier: MIT\nimport \"remapping/MyLib.sol\";\ncontract LinkTest {\n function foo() public returns (uint256) {\n return MyLib.foobar(1);\n }\n}\n" | ||
} | ||
}, | ||
"settings": { | ||
"remappings": [ | ||
"remapping/=/private/var/folders/l5/lprhf87s6xv8djgd017f0b2h0000gn/T/tmp_dappPyXsdD/lib/remapping/" | ||
], | ||
"optimizer": { | ||
"enabled": false, | ||
"runs": 200 | ||
}, | ||
"outputSelection": { | ||
"*": { | ||
"": [ | ||
"ast" | ||
], | ||
"*": [ | ||
"abi", | ||
"evm.bytecode", | ||
"evm.deployedBytecode", | ||
"evm.methodIdentifiers" | ||
] | ||
} | ||
}, | ||
"evmVersion": "london", | ||
"libraries": { | ||
"/private/var/folders/l5/lprhf87s6xv8djgd017f0b2h0000gn/T/tmp_dappPyXsdD/lib/remapping/MyLib.sol": { | ||
"MyLib": "0x0000000000000000000000000000000000000000" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.