This article describes how you can use Keycloak behind an API-gateway that considers CORS requests, which by default does not work. It presents a tutorial for a work-around that can be used until a proper fix for the root-cause of the problem is provided by Keycloak.Read More
Last year I published a tutorial helping you get started with the development of smart contracts and using them from java applications. In those tutorials, I’ve described how to use parity as the Ethereum client. Exactly this setup we’ve used also in our own project “Value Manifesto”. But a couple of weeks ago we’ve decided to switch the Ethereum client from parity to Infura. This gives me an opportunity to extend my tutorial with new information.
One of the reasons for changing the Ethereum client is as follows: maintaining your own Ethereum node can give you headaches. First of all, you need to keep your parity version up to date as it’s being continuously improved and adapted to the changes happening on the Ethereum blockchain.Read More
Do it yourself—it’s an overrated mantra.
At first, those three letters promise empowerment. You have full control over what you do and which way you want it to be done. Take fice, third-party software, we are on it ourselves.
But then you stumble over the prerequisites. You have to know how to do it all in the first place. And that you have the right tools for the task. But that should be doable, too. I have a screwdriver lying around somewhere! And there must be a YouTube tutorial for this, right?
Well, when it comes to the complex field of software development, the truth is a little more complicated.Read More
How to use a smart contract from a java application
In Part I of my tutorial I’ve explained how to develop and deploy a simple smart contract. Today we will see how this deployed contract can be used in java applications.
We are going to use Parity as Ethereum client and Web3j java library for interaction with Parity. I’m assuming that you already have installed Web3j, solc and Parity following “Prepare” instructions in Part I.
5. Get Parity Synced
First of all your Parity needs to get synchronized with the Ethereum testnet Rinkeby, meaning it needs to download the current database status to your local machine. Start your local parity with
$parity --chain rinkeby --rpcapi "eth,net,web3,personal"
See also this documentation of Parity about getting synced.
In the meantime, we can prepare everything that we need to call our smart contract from a java application.Read More
How to Write, Deploy and Test a Smart Contract
In this article, I will give you a smart contract tutorial. It will tell you how to quickly write, test and deploy Ethereum smart contracts. My motivation is to help people to make the first steps. There are several good tutorials which helped me to get started. But I missed kind of a “cookbook recipe” for the entire journey, starting with the installation of tools and frameworks and ending with deployment to Ethereum and usage out of an application.
And so, I decided to write down all the steps involved and hope that you will find it helpful!
I’m working on a Mac, but I’ll provide links to the documentation of all tools and frameworks so that you’ll be able to find fitting instructions for your personal environment.
Today we will:
- Setup an environment that allows you to write production-ready smart contracts
- Write a simple smart contract
- Test security and style guide issues with solhint
- Write unit tests with a Truffle framework
- Deploy the contract on the Rinkeby testnet using MetaMask and Remix
- Execute calls on the deployed smart contract
This article describes how to use the Spring Framework and Quartz together when using
org.quartz.jobStore.useProperties=true, meaning that all Job data is stored in the database as properties instead of serialized Java objects.
Normally this is not possible, because the Spring class
SimpleTriggerFactoryBean stores a reference to the
JobDetail in the
JobDataMap, which cannot be represented as a set of properties.