
How to get Uniswap V3 liquidity pool address for whitelisting?
Similar to what we did for Uniswap V2 on how to find address of smart contract pool that will be generated we can do the same for V3 https://mirror.xyz/n00b21337.eth/0QkNt3NnLnnUSy4jFmWnaeRr_38Z3wlYKKf1O6URG3c Depending on what chain we are at, you can find all the addresses of Factories here https://github.com/Uniswap/sdk-core/blob/5365ae4cd021ab53b94b0879ec6ceb6ad3ebdce9/src/addresses.ts#L135 Aim for the v3CoreFactoryAddress values.**So there are a few methods to do that, one could be to us...
Clear browser storage when developing
Different wallet scripts usually use window.localStorage for saving data for reuse and determination of what is the status of wallet connect, sometimes this could be awire and you need to clear it, you could delete all in browser like cookies, stored data and all the rest but you can also call first this in consolewindow.localStorage to check what is saved and then you can delete it all withlocalStorage.clear(); orlocalStorage.removeItem("name of localStorage variable you want to remov...
Example of implementation of EIP 4906 metadata updates
EIP 4096 has an interesting method of updating your metadata with events, more details here. https://eips.ethereum.org/EIPS/eip-4906 So lets see how to implement it with an example. First you need to create a file with interface that has this code in itpragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /// @title EIP-721 Metadata Update Extension interface IERC4906 is IERC165 { /// @dev This event emits when the metadata of a token is changed. /// Third-...
R4Nd0m k0lLEC7I0N 0F U5EFul PHindiN92 0N mY j0URney PhR0m n00b 2 1337. rAmBL1N92 aBoUt 5Ol1d17y, rE4C7, nf7, dEfi, WE83

How to get Uniswap V3 liquidity pool address for whitelisting?
Similar to what we did for Uniswap V2 on how to find address of smart contract pool that will be generated we can do the same for V3 https://mirror.xyz/n00b21337.eth/0QkNt3NnLnnUSy4jFmWnaeRr_38Z3wlYKKf1O6URG3c Depending on what chain we are at, you can find all the addresses of Factories here https://github.com/Uniswap/sdk-core/blob/5365ae4cd021ab53b94b0879ec6ceb6ad3ebdce9/src/addresses.ts#L135 Aim for the v3CoreFactoryAddress values.**So there are a few methods to do that, one could be to us...
Clear browser storage when developing
Different wallet scripts usually use window.localStorage for saving data for reuse and determination of what is the status of wallet connect, sometimes this could be awire and you need to clear it, you could delete all in browser like cookies, stored data and all the rest but you can also call first this in consolewindow.localStorage to check what is saved and then you can delete it all withlocalStorage.clear(); orlocalStorage.removeItem("name of localStorage variable you want to remov...
Example of implementation of EIP 4906 metadata updates
EIP 4096 has an interesting method of updating your metadata with events, more details here. https://eips.ethereum.org/EIPS/eip-4906 So lets see how to implement it with an example. First you need to create a file with interface that has this code in itpragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /// @title EIP-721 Metadata Update Extension interface IERC4906 is IERC165 { /// @dev This event emits when the metadata of a token is changed. /// Third-...
R4Nd0m k0lLEC7I0N 0F U5EFul PHindiN92 0N mY j0URney PhR0m n00b 2 1337. rAmBL1N92 aBoUt 5Ol1d17y, rE4C7, nf7, dEfi, WE83

Subscribe to N00b21337

Subscribe to N00b21337
<100 subscribers
<100 subscribers
Share Dialog
Share Dialog
To actually get constructor parameters you will need to get transaction details and see what was “data” that was sent or if you are using etherscan you can go to”Input Data” field and see all the bytecode there. So I will take this transaction as example
https://goerli.etherscan.io/tx/0xf15cfeb9be64058ba3680a7095ca045bb7cdddc85e318921a297de36f77e48b0
and use its bytecode to dissect constructor parameters. We need to go the end of the code and find this part of code
this 0033 is the last opcode that was used before adding the constructor info. 00 means STOP and 33 means CALLER, after that, we have 4 parameters that are four addressed used for this contract constructor, each of them left padded to 32 bytes.
This is what was used in hardhat when deploying and it matches the above bytecode
args = [
'0xCb07bf0603da228C8ec602bf12b973b8A94f9bac',
'0xF5147D56502C80004f91FB4112d6812CddE8eDE3',
'0xefC5Ead3188402eCC951DB45827F6e0F99B67a25',
'0xb1C7F17Ed88189Abf269Bf68A3B2Ed83C5276aAe',
];
So this part where there are constructor parameters on-chain, it can only be found in the transaction when the contract was deployed, you won’t find it in init bytecode or in the deployed bytecode which we talked about here.
https://mirror.xyz/n00b21337.eth/tNVuQii_z_D-2zyFnou9Yh2Hu0U6LajweFgC4WGfI0Y
So if you want to find this code and where it starts you could make a DIFF of init bytecode and bytecode used in deployment transaction creation and you will get this block of code. You could also try to just find
0033 // Somewhere it Was said that in older contract this was 0029, didnt confirm
by the end of the bytecode in contract creation and anything after that will be constructor arguments.
To actually get constructor parameters you will need to get transaction details and see what was “data” that was sent or if you are using etherscan you can go to”Input Data” field and see all the bytecode there. So I will take this transaction as example
https://goerli.etherscan.io/tx/0xf15cfeb9be64058ba3680a7095ca045bb7cdddc85e318921a297de36f77e48b0
and use its bytecode to dissect constructor parameters. We need to go the end of the code and find this part of code
this 0033 is the last opcode that was used before adding the constructor info. 00 means STOP and 33 means CALLER, after that, we have 4 parameters that are four addressed used for this contract constructor, each of them left padded to 32 bytes.
This is what was used in hardhat when deploying and it matches the above bytecode
args = [
'0xCb07bf0603da228C8ec602bf12b973b8A94f9bac',
'0xF5147D56502C80004f91FB4112d6812CddE8eDE3',
'0xefC5Ead3188402eCC951DB45827F6e0F99B67a25',
'0xb1C7F17Ed88189Abf269Bf68A3B2Ed83C5276aAe',
];
So this part where there are constructor parameters on-chain, it can only be found in the transaction when the contract was deployed, you won’t find it in init bytecode or in the deployed bytecode which we talked about here.
https://mirror.xyz/n00b21337.eth/tNVuQii_z_D-2zyFnou9Yh2Hu0U6LajweFgC4WGfI0Y
So if you want to find this code and where it starts you could make a DIFF of init bytecode and bytecode used in deployment transaction creation and you will get this block of code. You could also try to just find
0033 // Somewhere it Was said that in older contract this was 0029, didnt confirm
by the end of the bytecode in contract creation and anything after that will be constructor arguments.
No activity yet