-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: update function and event naming for backwards compatibility #805
base: svm-dev
Are you sure you want to change the base?
Conversation
Signed-off-by: Chris Maree <[email protected]>
Signed-off-by: Chris Maree <[email protected]>
Signed-off-by: Chris Maree <[email protected]>
Signed-off-by: Chris Maree <[email protected]>
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 was just thinking about this, +1
uint256 inputAmount; | ||
uint256 outputAmount; | ||
uint256 originChainId; | ||
uint256 depositId; |
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.
^
Signed-off-by: Chris Maree <[email protected]>
contracts/SpokePool.sol
Outdated
@@ -633,8 +633,8 @@ abstract contract SpokePool is | |||
uint32 fillDeadline, | |||
uint32 exclusivityParameter, | |||
bytes calldata message | |||
) public payable { | |||
unsafeDepositV3( | |||
) public payable override { |
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.
this did not have override
, so I've added it to the interface.
@@ -766,8 +766,8 @@ abstract contract SpokePool is | |||
uint32 fillDeadlineOffset, | |||
uint32 exclusivityPeriod, | |||
bytes calldata message | |||
) external payable { | |||
depositV3( | |||
) external payable override { |
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.
was also missing from interface.
@@ -827,7 +827,7 @@ abstract contract SpokePool is | |||
uint32 fillDeadlineOffset, | |||
uint32 exclusivityPeriod, | |||
bytes calldata message | |||
) external payable { | |||
) external payable override { |
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.
was also missing from interface.
@@ -109,22 +109,3 @@ export const sampleRateModel = { | |||
R1: toWei(0.07).toString(), | |||
R2: toWei(0.75).toString(), | |||
}; | |||
|
|||
export const SpokePoolFuncs = { |
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.
no more loverload. yay!
Signed-off-by: Chris Maree <[email protected]>
Signed-off-by: Chris Maree <[email protected]>
Signed-off-by: Chris Maree <[email protected]>
Signed-off-by: Chris Maree <[email protected]>
contracts/SpokePoolVerifier.sol
Outdated
@@ -42,7 +42,7 @@ contract SpokePoolVerifier { | |||
* to 0 if exclusiveRelayer is set to 0x0, and vice versa. | |||
* @param fillDeadline Timestamp after which this deposit can no longer be filled. | |||
*/ | |||
function deposit( | |||
function depositV3Bytes32( |
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.
^
Signed-off-by: Matt Rice <[email protected]>
Signed-off-by: Matt Rice <[email protected]>
Signed-off-by: Matt Rice <[email protected]>
Signed-off-by: Matt Rice <[email protected]>
Signed-off-by: Matt Rice <[email protected]>
Signed-off-by: Matt Rice <[email protected]>
Signed-off-by: Matt Rice <[email protected]>
Signed-off-by: Matt Rice <[email protected]>
Signed-off-by: Matt Rice <[email protected]>
Signed-off-by: Chris Maree <[email protected]>
Signed-off-by: Chris Maree <[email protected]>
Signed-off-by: Chris Maree <[email protected]>
Signed-off-by: Chris Maree <[email protected]>
This PR makes a single functional change: it adds back the previous
fillV3Relay
interface that existed prior to this audit. This method forwards tofillRelay
The rest of the PR is entirely renaming to make it an easier upgrade for integrators:
deposit
function has been removed and replaced with the colliding function namedepositDeprecated_5947912356
. Note: this means that anyone who fails to update their code will not be broken. However, it means that we are able to reuse the deposit name without function overloading.bytes32
overload ofdepositV3
has been renamed to justdeposit
.unsafeDeposit
and only thebytes32
version was kept.bytes32
overload ofdepositV3Now
was renamed todepositNow
.bytes32
overload ofspeedUpV3Deposit
was renamed tospeedUpDeposit
.bytes32
version offillV3Relay
was renamed tofillRelay
.V3FundsDeposited
,RequestedSpeedUpV3Deposit
,FilledV3Relay
,RequestedV3SlowFill
:bytes32
version, theV3
was dropped from the name.V3
was added back to the interface, so that it persists in the ABI to make migration easier.