Last active
May 31, 2023 17:34
-
-
Save svanas/7ab5ba600406c0b70e2bfc63a733ca58 to your computer and use it in GitHub Desktop.
Transferring Ether with 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.tx.sendTransaction( | |
TWeb3.Create(Ganache), // Ganache 2.7.1 | |
TPrivateKey('24622d680bb9d6d80c4d3fb4b4818e738de64b521948b1b1c85616eeeda54ee1'), // from private key | |
'0xaDDcedc01C1070bCE0aF7eb853845e7811EB649C', // to public key | |
web3.eth.utils.toWei('0.01', ether).Value, // 0.01 ether | |
procedure(tx: TTxHash; err: IError) | |
begin | |
TThread.Synchronize(nil, procedure | |
begin | |
if Assigned(err) then | |
MessageDlg(err.Message, TMsgDlgType.mtError, [TMsgDlgBtn.mbOK], 0) | |
else | |
MessageDlg(string(tx), TMsgDlgType.mtInformation, [TMsgDlgBtn.mbOK], 0); | |
end); | |
end | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment