Comments (4)
@cybercent Are you sure you aren't getting this mixed up with how ETH is represented in Solidity? In Cadence we use UFix64
to represent Flow tokens, so we can have 10k FLOW represented as 10000.0
.
from flow-core-contracts.
The number still has precision up to 8 decimal places, but it is only represented as an integer under the hood. We can represent it as a decimal number in Cadence.
from flow-core-contracts.
@joshuahannan thanks for the explanation.
The confusion came from when I queried an account's balance via gRPC.
I see the amount like this: 1000000000000
not like this 10000.0
, probably because there is no UFix64 in Go.
I opened the issue just to check that there was no mistake there. Good to know the amounts are correct.
from flow-core-contracts.
@cybercent Was just going to ask if that number is reported by the Go SDK. Are you calling GetAccount
? I think we can update the Go SDK to use cadence.UFix64
to represent the balance
field
from flow-core-contracts.
Related Issues (20)
- Introduce Delegator Staking Minimums
- Move `resetEpoch()` to the Epoch Admin resource
- Implement FungibleTokenMetadataViews in FlowToken HOT 3
- Add logic to maintain 8 access node slots every epoch
- Refactor `FlowEpoch.getEpochMetadata` to avoid the dictionary-copy HOT 2
- Replace `while` loop with `for` loop once references are allowed
- Revisit `Account` entitlements in `FlowStakingCollection.CollectionOwner.registerNode` HOT 1
- RandomBeaconHistory.getRandomSourceHistoryPage() performs impure function under Cadence 1.0 HOT 1
- [FLIP 204] Update `FlowEpoch` smart contract to specify target end time for epoch
- LockedTokens getLockedAccountBalance underflows HOT 3
- Update docs site and README with addresses of important contracts
- SoR history gaps when heartbeat call fails HOT 1
- Port a the SoR History fix to Stable Cadence HOT 1
- Use semantic versioning and tags HOT 3
- Require proof of possession of the staking private key from staking nodes
- Improve Fisher-Yates random distribution HOT 1
- Make iterating through delegators in staking contract more efficient
- Use service account Admin resource to set weights
- Mistagged versions are causing Go package manager problems
- Remove `FlowToken` Deposit and Withdraw events
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flow-core-contracts.