-
Notifications
You must be signed in to change notification settings - Fork 13
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
adding functions to get the total flow balance of an account with all… #23
base: main
Are you sure you want to change the base?
Conversation
… staking and locked stuff
looking good! thanks for the great utility |
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 have a test for this somewhere to make sure we're getting everything right?
How easy is it to setup and test things using staking/locked token on emulator. Do anybody have a example? |
Co-authored-by: Joshua Hannan <[email protected]>
Co-authored-by: Joshua Hannan <[email protected]>
Co-authored-by: Joshua Hannan <[email protected]>
Co-authored-by: Joshua Hannan <[email protected]>
Co-authored-by: Joshua Hannan <[email protected]>
Co-authored-by: Joshua Hannan <[email protected]>
Co-authored-by: Joshua Hannan <[email protected]>
Co-authored-by: Joshua Hannan <[email protected]>
tests fail because of yet to be released cadence-testing code. We import Crypto. So we have to wait |
No need to test on the emulator. that is a little too complicated to get set up. I just meant testing for an account on testnet or something. Though I could add it to my setup in flow core contracts to make sure it works right on the emulator if you would rather it live there |
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 isn't deployed anywhere yet, is it?
cadence/contracts/AccountUtils.cdc
Outdated
pub(set) var primaryAcctBalance: UFix64 | ||
pub(set) var secondaryAddress: Address? | ||
pub(set) var secondaryAcctBalance: UFix64 | ||
pub(set) var stakedBalance: UFix64 |
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 probably prefer this to be called nodeStakedBalance
just to be consistent on the terminology
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.
Sure we can do that. Totally forget about this pr.
I cant get the flow tests to work here, but if i deploy to emulator and run the scripts for the service-account they compile. I have run this code on mainnet for all addresses so i know it works. |
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.
Some small comments but looks good to me 🙂
yeah, no need to run tests if you have already run a bunch on mainnet to make sure it works |
turns out finding out the total flow balance for an account with locked companion is very hard. synced with josh and he approves of this.