Reputation: 29
I try to execute this code and receive current blockchain block number
nodeInteraction.currentHeight('https://nodes.wavesplatform.com/').then((res) => {
console.log(res);
});
I did not forget to import the library
import { invokeScript, broadcast, nodeInteraction, waitForTx } from '@waves/waves-transactions';
This code is executed correctly.
nodeInteraction.accountData(dappaddress, baseUri).then((v) => {
window.dAppData = v;
if (v) {
window.dAppDataKeys = Object.keys(v);
console.log("dApp Account data:");
console.log(v);
console.log(JSON.stringify(v));
}
});
I'm using below library
https://wavesplatform.github.io/waves-transactions/globals.html#currentheight
Upvotes: 1
Views: 74