Skip to content
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

fix: thawing tokens #44

Merged
merged 24 commits into from
Oct 17, 2024
Merged

fix: thawing tokens #44

merged 24 commits into from
Oct 17, 2024

Conversation

0xShaito
Copy link
Member

@0xShaito 0xShaito commented Oct 11, 2024

🤖 Linear

Closes GRT-210

Copy link
Member

@0xJabberwock 0xJabberwock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Check that unit tests failed in GitHub Actions.

test/integration/arbitrum/IntegrationBase.sol Outdated Show resolved Hide resolved
test/integration/arbitrum/IntegrationBase.sol Outdated Show resolved Hide resolved
Comment on lines 35 to 39
string internal _chainId2;
uint256 internal _currentEpoch;
uint256 internal _blockNumber;

uint96 public currentNonce;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I purposely made all variables within IntegrationBase internal so they could be easily differentiated from the public ones inherited from Deploy (which account for all its variables).

Comment on lines 441 to 443
uint256 _availableTokens =
_provisionData.tokens > _provisionData.tokensThawing ? _provisionData.tokens - _provisionData.tokensThawing : 0;
if (_amount > _availableTokens) revert HorizonAccountingExtension_InsufficientTokens();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I can't come up with a reason why tokensThawing would ever be greater than tokens, other than rounding issues.

test/integration/arbitrum/HorizonAccountingExtension.t.sol Outdated Show resolved Hide resolved
test/integration/arbitrum/HorizonAccountingExtension.t.sol Outdated Show resolved Hide resolved
test/integration/arbitrum/HorizonAccountingExtension.t.sol Outdated Show resolved Hide resolved
test/integration/arbitrum/HorizonAccountingExtension.t.sol Outdated Show resolved Hide resolved
Copy link

linear bot commented Oct 14, 2024

@0xShaito 0xShaito marked this pull request as ready for review October 14, 2024 09:21
src/contracts/HorizonAccountingExtension.sol Show resolved Hide resolved
test/integration/arbitrum/BondEscalation.t.sol Outdated Show resolved Hide resolved
@@ -49,6 +49,18 @@ contract IntegrationBondEscalation is IntegrationBase {
// Do not pass the dispute deadline nor the tying buffer
vm.warp(disputeDeadline);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant find the inssuficientBondedTokens error in the test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one!

0xJabberwock
0xJabberwock previously approved these changes Oct 15, 2024
Base automatically changed from test/horizon-accounting-extension-integration to dev October 16, 2024 14:07
@0xShaito 0xShaito dismissed 0xJabberwock’s stale review October 16, 2024 14:07

The base branch was changed.

ashitakah
ashitakah previously approved these changes Oct 17, 2024
0xJabberwock
0xJabberwock previously approved these changes Oct 17, 2024
@0xShaito 0xShaito merged commit 89930c3 into dev Oct 17, 2024
7 checks passed
@0xShaito 0xShaito deleted the fix/thawing-tokens branch October 17, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants