QuickNode
Published in

QuickNode

QuikNode, Ethereum and Delphi

While Infura is an awesome gateway to Ethereum, when you have a high-traffic decentralized application then you might have a need for maximum performance, non-funnelled access to the blockchain.

Yes you can run your own Ethereum node, but setting up and managing a blockchain node is a difficult, time- and resource-consuming task. Not to mention that it is your responsibility to keep your node up to date with node and network upgrades.

QuikNode is a so-called remote node service that gives you all the power of a full-node without running one yourself. They have a free plan for developers, and if your decentralized application is ready to scale up, they have membership plans for up to 10 million requests/day. This can make a world of difference in the way your decentralized application feels for your users.

Let’s create a free account and obtain a complimentary endpoint to the Ethereum blockchain. Go to the QuikNode website and sign up. After signing up and signing in, you are greeted by your complimentary node:

Your node comes with the following JSON-RPC web3 provider over HTTPS:

https://<your-node-name>.quiknode.pro/<your-token>/

Here’s how to plug your HTTPS endpoint in Delphi code. Launch Delphi, and then start a new project. Please make sure Delphereum and the dependencies are in your search path. Copy and paste the following example:

Please note that you will need to replace <your-node-name> and <your-token> in the example above.

The example above breaks down to this. After we have created a new instance of the Delphereum client, we will then call a function named web3.eth.blockNumber(). Because calls to the Delphereum library are asynchronous, the web3.eth.blockNumber function expects a so-called promise. Inside this promise, we get the number of the most recent block and prompt that number in a message box. Please note that we need to synchronise the execution state with the main thread, and that is what TThread.Synchronizedoes for us.

Congratulations! You have successfully connected your Delphi application to the Ethereum blockchain via QuikNode.

--

--

--

A platform to access ETH, BTC, BSC, MATIC, OPTIMISM, ARBITRUM, FTM, CELO, SOL, TERRA & xDAI blockchains via API. Infra & tools to build + scale your #Web3 dApp!

Recommended from Medium

Welcome onboard to DogeXSpace !

OpenFi Manifesto

Boosting The Nigerian Insurance Industry Through The Adoption of Smart Contracts — A Blockchain…

The Automation of Complex Loan Agreements with Blockchain Technology

#Blockchain was used to award scientific degrees in the Russian Federation

How to create an NFT-token

Why CLARITY is better than SOLIDITY for building your next decentralized application

Wax, the best and most active blockchain.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Stefan

Stefan

Delphi/Rust/Go developer. Ethereum consultant. Embarcadero MVP. Ex-Adobe, Macromedia. Helped build 1Password.

More from Medium

February Recap: What’s New with Unity Network?

Future of funds (CBDC/BTC)

Use Cases of Blockchain in the Energy Sector

HarmonyLauncher AMA Recap 요약본