Skip to content

Instantly share code, notes, and snippets.

@svanas
Last active March 5, 2025 09:43
Show Gist options
  • 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
const 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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment