Skip to content

Instantly share code, notes, and snippets.

@svanas
Last active October 2, 2023 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svanas/504218bb76292334ea9086bc10d3a28a to your computer and use it in GitHub Desktop.
Save svanas/504218bb76292334ea9086bc10d3a28a to your computer and use it in GitHub Desktop.
QuikNode
var client: IWeb3 := TWeb3.Create('https://<your-node-name>.discover.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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment