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

AcreSDK: current position #233

Merged
merged 17 commits into from
Mar 5, 2024
Merged

AcreSDK: current position #233

merged 17 commits into from
Mar 5, 2024

Conversation

ioay
Copy link
Contributor

@ioay ioay commented Feb 11, 2024

Closes: #149


SDK: Return current position


SDK exposes the current staker's balances with two values:
stBTC shares balance (Obtained from: stBTC.balanceOf(address))
tBTC assets balance (Obtained from: stBTC.assetsBalanceOf(address) - depends on #221)

@ioay ioay self-assigned this Feb 11, 2024
@ioay ioay requested a review from r-czajkowski February 11, 2024 19:19
@ioay ioay force-pushed the acre-sdk-current-position branch from e242fee to da7f19e Compare February 11, 2024 20:00
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/modules/staking/index.ts Outdated Show resolved Hide resolved
sdk/src/lib/contracts/stbtc.ts Outdated Show resolved Hide resolved
@ioay ioay requested a review from r-czajkowski February 14, 2024 18:10
@ioay ioay marked this pull request as ready for review February 14, 2024 18:10
@ioay ioay force-pushed the acre-sdk-current-position branch from 8a660f8 to 7814ae1 Compare February 19, 2024 10:51
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
@ioay ioay requested review from r-czajkowski and nkuba February 21, 2024 00:37
sdk/src/modules/staking/index.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/modules/staking/index.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Show resolved Hide resolved
@ioay ioay requested a review from r-czajkowski February 22, 2024 17:06
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/src/lib/ethereum/stbtc.ts Outdated Show resolved Hide resolved
sdk/test/modules/staking.test.ts Outdated Show resolved Hide resolved
sdk/test/modules/staking.test.ts Outdated Show resolved Hide resolved
sdk/test/modules/staking.test.ts Outdated Show resolved Hide resolved
sdk/test/lib/ethereum/stbtc.test.ts Outdated Show resolved Hide resolved
sdk/test/lib/ethereum/stbtc.test.ts Outdated Show resolved Hide resolved
sdk/test/lib/ethereum/stbtc.test.ts Outdated Show resolved Hide resolved
sdk/test/lib/ethereum/stbtc.test.ts Outdated Show resolved Hide resolved
sdk/test/modules/staking.test.ts Outdated Show resolved Hide resolved
@r-czajkowski
Copy link
Contributor

Let's add PR description.

@ioay ioay requested a review from r-czajkowski February 27, 2024 19:45
sdk/test/lib/ethereum/stbtc.test.ts Outdated Show resolved Hide resolved
sdk/test/modules/staking.test.ts Outdated Show resolved Hide resolved
@ioay ioay force-pushed the acre-sdk-current-position branch from 1bcacf1 to ae2b70b Compare February 28, 2024 14:57
@ioay ioay requested a review from r-czajkowski February 28, 2024 15:01
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to deploy the latest version of stBTC and update this artifact. The contract deployed under 0xF99139f09164B092bD9e8558984Becfb0d2eCb87 doesn't have assetsBalanceOf function. cc @nkuba

r-czajkowski
r-czajkowski previously approved these changes Mar 4, 2024
Copy link
Contributor

@r-czajkowski r-czajkowski left a comment

Choose a reason for hiding this comment

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

LGTM! Let's hold with merge until we redeploy stBTC contract and update the stBTC.json artifact.

Copy link

netlify bot commented Mar 4, 2024

Deploy Preview for acre-dapp-testnet ready!

Name Link
🔨 Latest commit 0618fef
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp-testnet/deploys/65e719024c6b720008391c69
😎 Deploy Preview https://deploy-preview-233--acre-dapp-testnet.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ioay ioay requested a review from r-czajkowski March 4, 2024 15:17
@r-czajkowski r-czajkowski enabled auto-merge March 5, 2024 13:07
@r-czajkowski r-czajkowski merged commit 8226f97 into main Mar 5, 2024
20 checks passed
@r-czajkowski r-czajkowski deleted the acre-sdk-current-position branch March 5, 2024 13:10
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.

SDK: Return current position
3 participants