Skip to content

Instantly share code, notes, and snippets.

@svanas
Last active January 10, 2022 12:19
Embed
What would you like to do?
QuikNode
begin
var client: IWeb3 := TWeb3.Create('https://<your-node-name>.quiknode.pro/<your-token>/');
web3.eth.blockNumber(client, procedure(num: BigInteger; err: IError)
begin
TThread.Synchronize(nil, procedure
begin
if Assigned(err) then
MessageDlg(err.Message, TMsgDlgType.mtError, [TMsgDlgBtn.mbOK], 0)
else
MessageDlg(num.ToString, TMsgDlgType.mtInformation, [TMsgDlgBtn.mbOK], 0);
end);
end);
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment