mouseless-eth/rusty-sando

Huff constant documentation

Closed this issue · 3 comments

pygeek commented

Can you explain the purpose of the following constants:

#define constant PAIR_INIT_CODE_HASH = 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54
#define constant HELPER = 0x2B5AD5c4795c026514f8317c7a215E218DcCD6cF

I see no documentation on these constants, and it seems at very least, HELPER needs to be changed prior to deployment.

Thanks

Did this get fixed? Were you able to deploy?

pygeek commented

@vehctor it seems like HELPER needs to be changed as this is where eth is swept to on contract selfdestruct according to the sandwch.huff code?

The HELPER is an address with the rights to delete contracts, withdraw Ethereum or WETH. This can be consistent with SEARCHER, and needs to be modified in the Huff code during deployment. The PAIR_INIT_CODE_HASH is one of the constant values used to calculate the address of the Uniswap v3 pair contract. The specific Solidity implementation can be more easily understood by looking at the Uniswap v3 factory contract code.