-
Notifications
You must be signed in to change notification settings - Fork 227
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
Set safeTxGas=0 when safeVersion>=1.3.0 #121
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
)) | ||
let safeTxGas: number | ||
const safeVersion = await safeContract.getVersion() | ||
if (semverSatisfies(safeVersion, '>=1.3.0')) { |
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.
Maybe put '>=1.3.0'
in some sort of config, similar to safe-react?
Or at least a constant.
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.
Looking good! I just have a couple of suggestions
)) | ||
let safeTxGas: number | ||
const safeVersion = await safeContract.getVersion() | ||
if (semverSatisfies(safeVersion, '>=1.3.0')) { |
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.
Maybe it makes sense to create a lookup for the versions?
|
||
it('proposeTransaction', async () => { | ||
const safeTxData: SafeTransactionDataPartial = { | ||
to: '0xa33d2495760462018275994d85117600bd58221e', | ||
data: '0x', | ||
value: '123456789', | ||
operation: 1, | ||
safeTxGas: 123, | ||
safeTxGas: 0, | ||
baseGas: 0, | ||
gasPrice: 0, | ||
gasToken: '0x0000000000000000000000000000000000000000', |
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.
Do you use the a ZERO_ADDRESS
often? Might be worthwhile creating a constant for it.
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.
It is only used twice in this test file
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 would just address the suggestion of using some kind of lookup for the safe version
6f8ae7b
to
bedee8d
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.
🚀
What it solves
Resolves #100