We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Chain.balance
Reproduction
import { Node, AeSdk, MemoryAccount, CompilerHttp, } from '@aeternity/aepp-sdk'; const contractSourceCode = ` contract Test = entrypoint getBalance(addr : address) = Chain.balance(addr) `; const node = new Node('https://testnet.aeternity.io'); const account = new MemoryAccount('9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200'); const aeSdk = new AeSdk({ nodes: [{ name: 'testnet', instance: node }], accounts: [ new MemoryAccount('9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200'), ], onCompiler: new CompilerHttp('https://v7.compiler.aepps.com'), }); const contract = await aeSdk.initializeContract({ sourceCode: contractSourceCode }); const deployInfo = await contract.$deploy([]); console.log('Contract deployed at', deployInfo.address); const address = account.address; console.log('Node balance', await aeSdk.getBalance(address)); console.log('Contract balance', (await contract.getBalance(address, { callStatic: false })).decodedResult); console.log('Node balance', await aeSdk.getBalance(address)); console.log('Contract balance dry-run', (await contract.getBalance(address, { callStatic: true })).decodedResult);
outputs
Contract deployed at ct_9L62omp1ASfV9oRFNJSWEWNaRXhTAPyNr5CnxgBXjZyVNbVFh Address ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E Node balance 105447145675740744092 Contract balance 105446960420740744092n Node balance 105446960933740744092 Contract balance dry-run 100000000000000105440960933740744092n
100000000000000105440960933740744092n needs to be 105440960933740744092n, 100000000000000000000000000000000000n is from here
100000000000000105440960933740744092n
105440960933740744092n
100000000000000000000000000000000000n
aepp-sdk-js/src/tx/builder/schema.ts
Line 29 in 5df22dd
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Reproduction
outputs
100000000000000105440960933740744092n
needs to be105440960933740744092n
,100000000000000000000000000000000000n
is from hereaepp-sdk-js/src/tx/builder/schema.ts
Line 29 in 5df22dd
The text was updated successfully, but these errors were encountered: