-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the safeSingletonContract property from FractalContracts and BaseContracts interfaces #1660
Conversation
✅ Deploy Preview for fractal-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
75f435e
to
5ebaf5b
Compare
107633c
to
476155d
Compare
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.
Two questions and looks like github is picking up on a lint error in AzoriusTxBuilder
if (!isHex(encodedAddOwnerWithThreshold)) { | ||
return; | ||
} |
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.
the isHex
function seems to be off and on used in conjunction with the encodeFunctionData
. is there a reason its being used in some places and not others?
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.
viem's encodeFunctionData()
will always return a "Hex
" string, so no need to use the isHex
function on data returned from that function.
It was needed when using ethers interface.encodeFunctionData()
, because that function just returns a plain string
, and typescript doesn't allow plain strings
to be passed into viem functions that are expecting Hex
.
As we progress through this refactor, we'll be removing all of these isHex
checks, because we won't be using ethers any longer!
It's jsut needed temporarily for now as we have both ethers and viem in the codebase.
bytecodeHash: keccak256( | ||
encodePacked( | ||
['bytes', 'uint256'], | ||
[ | ||
safeFactoryContractProxyCreationCode, | ||
hexToBigInt(getAddress(safeSingletonContract.address)), | ||
], |
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.
Why the removal of the getAddress
function here?
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.
Presumably because the safeSingletonContract
type went from an ethers contract object to a viem contract object.
ethers contract.address is a string
viem contract.address is an Address
5ebaf5b
to
917cc5b
Compare
476155d
to
b81091e
Compare
ccd09f8
to
3b3a125
Compare
…aseContracts interfaces
b81091e
to
77d3fbe
Compare
Please review and merge #1658 first.