-
Notifications
You must be signed in to change notification settings - Fork 325
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1292 +/- ##
==========================================
+ Coverage 64.37% 67.90% +3.53%
==========================================
Files 50 46 -4
Lines 8541 6868 -1673
==========================================
- Hits 5498 4664 -834
+ Misses 3043 2204 -839 ☔ View full report in Codecov by Sentry. |
2d4d48d
to
7f4402e
Compare
good to merge, can ignore the trunk check |
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'd revert the changes made to deploy
and use the foundry file to get if there are some
"linkReferences": {
"solidity_contracts/src/UniswapV3/NFTDescriptor.sol": {
"NFTDescriptor": [{ "start": 3038, "length": 20 }]
}
}
and if so, then deploy them first, and replace. Even the compute_library_identifier
doesn't seem required
@@ -33,7 +33,7 @@ library UniswapV2Library { | |||
hex"ff", | |||
factory, | |||
keccak256(abi.encodePacked(token0, token1)), | |||
hex"666a5b78ea0b660c426b08cb5b7427447e909408067de1a5519c772ee9a3c032" // init code hash | |||
hex"0f5b822a8dffa6ce589a2c240d78a6a2b38a51835a97ceab40c1f301e46ba30b" // init code hash |
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.
From where this init code hash was taken ?
Did not find it in commit history of https://github.com/Uniswap/v2-periphery/blob/0335e8f7e1bd1e8d8329fd300aea2ef2f36dd19f/contracts/libraries/UniswapV2Library.sol#L24
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.
run forge build
, open UniswapV2Library.json
and take the keccak hash of the bytecode hexstring
Time spent on this PR: 1d
Adds Mock UniswapV3 contracts that allow querying a dynamically generated on-chain SVG representing a position.
The values are mocked, and due to some issues, the base64 encoding of the image crashes with a stack underflow error (tbd).
However, the encoding of the rest takes ~27M steps
Also: Because
NFTDescriptor
is a library with anexternal
function, it must be deployed and called with its address. When referring to this library, the compiler will add a placehold in form__$HASH_OF_PATH$__
in the compiled bytecode. Thus, I implemented a way of linking a library in the deployments scripts - we can deploy the contract providing a set of required libraries, that are deployed, hashed, and their address replaces the hash in the compiled bytecode.Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Resolves #
What is the new behavior?
This change is