/delphereum

web3 implementation for the Delphi programming language

Primary LanguagePascalOtherNOASSERTION

What is Delphereum?

Delphereum is a Delphi interface to the Ethereum blockchain that allows for development of native dapps (aka decentralized applications) that interact with the Ethereum network, including sending transactions, working with smart contracts, and reading blockchain data.

What is Delphi?

Delphi is a development environment that compiles into native apps for Windows, macOS, iOS, and Android.

What is Ethereum?

Ethereum is a blockchain-based distributed computing platform and operating system featuring smart contracts.

What is a smart contract?

A smart contract is a computation that takes place on a blockchain or distributed ledger. You can think of a smart contract as a microservice that runs trustless on the backend of your application.

Smart contracts can have many applications, ranging from sports betting to online voting. But the true power of smart contracts is in managing assets that have value and are scarce.

Once added to the blockchain, a smart contract becomes public and cannot be modified or removed. This assures your users that the rules are transparent and will never change.

What is a dapp?

A dapp is an application whose backend runs on a decentralised network with trustless protocols. Dapps aren’t owned by anyone, cannot be shut down, and have zero downtime.

What other networks does this thing support?

Delphereum supports every EVM-compatible network, including (but not limited to)

Dependencies

Before you can compile this project, you will need to clone the following repositories, and then add them to your Delphi search path:

git clone https://github.com/rvelthuis/DelphiBigNumbers
git clone https://github.com/Xor-el/SimpleBaseLib4Pascal
git clone https://github.com/Xor-el/HashLib4Pascal
git clone https://github.com/Xor-el/CryptoLib4Pascal

Please note there are NO runtime dependencies. Delphereum is lightweight and self-contained.

Search path

Assuming your project is named MyProject and you have a projects directory with this structure...

MyProject 
CryptoLib4Pascal
delphereum
DelphiBigNumbers
HashLib4Pascal
SimpleBaseLib4Pascal

...then this is your Delphi search path:

../delphereum;../DelphiBigNumbers/Source;../CryptoLib4Pascal/CryptoLib/src/Interfaces;../CryptoLib4Pascal/CryptoLib/src/Math;../CryptoLib4Pascal/CryptoLib/src/Utils;../CryptoLib4Pascal/CryptoLib/src/Security;../HashLib4Pascal/HashLib/src/Interfaces;../HashLib4Pascal/HashLib/src/Utils;../CryptoLib4Pascal/CryptoLib/src/Utils/Randoms;../HashLib4Pascal/HashLib/src/Base;../HashLib4Pascal/HashLib/src/KDF;../HashLib4Pascal/HashLib/src/Nullable;../HashLib4Pascal/HashLib/src/NullDigest;../HashLib4Pascal/HashLib/src/Checksum;../HashLib4Pascal/HashLib/src/Hash32;../HashLib4Pascal/HashLib/src/Hash64;../HashLib4Pascal/HashLib/src/Hash128;../HashLib4Pascal/HashLib/src/Crypto;../HashLib4Pascal/HashLib/src/Interfaces/IBlake2BParams;../HashLib4Pascal/HashLib/src/Crypto/Blake2BParams;../HashLib4Pascal/HashLib/src/Interfaces/IBlake2SParams;../HashLib4Pascal/HashLib/src/Crypto/Blake2SParams;../CryptoLib4Pascal/CryptoLib/src/Crypto/Digests;../CryptoLib4Pascal/CryptoLib/src/Asn1/Pkcs;../CryptoLib4Pascal/CryptoLib/src/Asn1;../CryptoLib4Pascal/CryptoLib/src/Utils/Encoders;../SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases;../SimpleBaseLib4Pascal/SimpleBaseLib/src/Utils;../SimpleBaseLib4Pascal/SimpleBaseLib/src/Interfaces;../CryptoLib4Pascal/CryptoLib/src/Asn1/RossStandart;../CryptoLib4Pascal/CryptoLib/src/Asn1/Oiw;../CryptoLib4Pascal/CryptoLib/src/Asn1/Nist;../CryptoLib4Pascal/CryptoLib/src/Asn1/Misc;../CryptoLib4Pascal/CryptoLib/src/Asn1/TeleTrust;../CryptoLib4Pascal/CryptoLib/src/Asn1/CryptoPro;../CryptoLib4Pascal/CryptoLib/src/Crypto/Prng;../CryptoLib4Pascal/CryptoLib/src/Utils/Rng;../CryptoLib4Pascal/CryptoLib/src/Crypto/Engines;../CryptoLib4Pascal/CryptoLib/src/Crypto/Parameters;../CryptoLib4Pascal/CryptoLib/src/Crypto;../CryptoLib4Pascal/CryptoLib/src/Math/EC;../CryptoLib4Pascal/CryptoLib/src/Crypto/EC;../CryptoLib4Pascal/CryptoLib/src/Math/EC/Endo;../CryptoLib4Pascal/CryptoLib/src/Asn1/Sec;../CryptoLib4Pascal/CryptoLib/src/Asn1/X9;../CryptoLib4Pascal/CryptoLib/src/Asn1/CryptLib;../CryptoLib4Pascal/CryptoLib/src/Math/Raw;../CryptoLib4Pascal/CryptoLib/src/Math/EC/Multiplier;../CryptoLib4Pascal/CryptoLib/src/Math/EC/Abc;../CryptoLib4Pascal/CryptoLib/src/Math/Field;../CryptoLib4Pascal/CryptoLib/src/Math/EC/Custom/Sec;../CryptoLib4Pascal/CryptoLib/src/Math/EC/Custom/Djb;../CryptoLib4Pascal/CryptoLib/src/Crypto/Signers;../CryptoLib4Pascal/CryptoLib/src/Crypto/Generators;../CryptoLib4Pascal/CryptoLib/src/Crypto/Macs

Tutorials

  1. Connecting Delphi to a local (in-memory) blockchain
  2. Connecting Delphi to the Ethereum main net
  3. Connecting Delphi to smart contracts
  4. Generating an Ethereum-signed message signature in Delphi
  5. Transferring ether with Delphi
  6. Transferring ERC-20 tokens with Delphi
  7. Delphi and Ethereum Name Service (ENS)
  8. A 3-minute Smart Contract and Delphi - Part 1
  9. A 3-minute Smart Contract and Delphi - Part 2
  10. QuikNode, Ethereum and Delphi
  11. Delphi and the Ethereum Dark Forest
  12. Swap one token for another in Delphi

Case studies

1. Migratooor

Migratooor transfers all your tokens from one wallet to another. You can download migratooor for Windows or macOS.

2. Bankless

Bankless is a DeFi desktop app with the highest possible yield on your stablecoin savings.

Made with Delphi, bankless is a small and simple dapp that makes it super easy to transfer your savings from one lending protocol to another with the click of one button.

You can download bankless for Windows or macOS.

3. Balancer

Balancer is an implementation of the https://balancer.finance protocol in native code, made possible by an awesome grant from the Balancer DAO. You can download balancer for Windows or macOS.

4. PubSub

PubSub is a simple "Hello World" example project, demonstrating how to subscribe to an Ethereum RPC provider and get notified every time a new block got mined. You can download PubSub for Windows.

License

Distributed under the GNU AGP v3.0 with Commons Clause license.

Sponsors

Commercial support and training

Commercial support and training is available from Stefan.