Last active
May 8, 2023 14:38
-
-
Save svanas/e74ddc085e6282933f041c2928dc7ebd to your computer and use it in GitHub Desktop.
Get balance of Ethereum wallet from Delphi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web3.eth.getBalance(TWeb3.Create(Ganache), Edit1.Text, procedure(qty: BigInteger; err: IError) | |
begin | |
TThread.Synchronize(nil, procedure | |
begin | |
if Assigned(err) then | |
MessageDlg(err.Message, TMsgDlgType.mtError, [TMsgDlgBtn.mbOK], 0) | |
else | |
ShowMessage(web3.eth.utils.fromWei(qty, web3.eth.utils.ether) + ' ether'); | |
end); | |
end); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment