At CiscoLive Barcelona I became a millionaire. I’m loaded. I couldn’t be happier. And all because we launched DevNetCoin! Now, technically, I’m only a millionaire in a token with no intrinsic value. But I’m still happy. So, that’s good.

Do YOU want to be a millionaire (in your own crypto token)?

With a little background and some basic developer knowledge, it’s actually pretty easy to create your own token on a blockchain, which I’m going to take you through in the rest of this blog.

I’m going to assume you know the basics of what Blockchain is and how it works. (If you don’t, here’s a good article on blockchain that can give you the very basic premise fairly quickly). You can also head over to DevNet website to find out what Cisco is doing in the blockchain space.

Programming languages and tools for blockchain development

The programming languages and tools you use to develop in the world of tokens and distributed applications, generally differ from blockchain to blockchain – so, here we’ll focus in on a specific blockchain implementation – Ethereum.

Ethereum is a good choice to get started as it is a public blockchain (anyone can use it), and it supports smart contracts. ‘Smart Contract’ is a badly named concept, but they are essentially pieces of code we deploy to a blockchain that can be called and executed whenever we like.

Smart contracts on Ethereum are written in a language called Solidity. It is also one of the most popular languages for this type of development.

To create our token, we essentially need to create a Smart Token in Solidity, detailing the token particulars (which we’ll talk about soon), then deploy it to the Ethereum network.

Now, to make your life as easy as possible when creating your token contract, you’ll need to select a few tools:

An Ethereum account / wallet

First, if you haven’t already, get yourself a digital wallet / blockchain account on Ethereum using MyEtherWallet . I love this site. It will not only help you deploy smart contracts, but also create your accounts securely, give you best practices for keeping your keys safe etc. and try it’s very best from stopping you doing anything bad with real funds you might use in the future. Super useful. Also, get yourself MetaMask as a browser plugin. Not only can you chase the fox head around the screen for hours, but you can create accounts, send money and it’ll stop you going to bad phishing sites.

Text editor or solidity IDE to write your smart contract

You’ll need something to use to write your smart contract. You can choose any text editor you are comfortable with (I use Atom as it has a neat little solidity plugin), or an IDE with helpful functions like compilers and functionality that will help you deploy to the Ethereum blockchain more easily. Parity and remix are examples of such IDEs. Remix is right-there-in-your-browser based. Note: Atom actually now even blurs those lines with this further plugin (I haven’t tried that out, at the time of writing, but it looks cool)!

A smart contract deployment tool

Options aplenty here, coming in two main packages – UI driven or command line driven.

On the UI flavour, Remix type IDEs will also help you deploy contracts – the same IDE we discussed about above. But, I’m generally a command line fan, so I seem to search these types of tools out – and a great one has been created from the guys over at Truffle. You set up the details of your contract, your account and the blockchain network you’re going to deploy to in a series of configuration files and truffle does the rest!

Wait!! “Network I’m going to use?! I thought we were using Ethereum,” I hear you cry…

A blockchain test network

It costs real crypto money to deploy contracts and transact with them on the Ethereum public blockchain, which can get expensive when you’re developing and testing! So, for this purpose, there are a number of test Ethereum networks, that are exactly the same as Ethereum, but tied to crypto currency available for free! Bargin! My favourite is called Kovan, which uses the crypto token ‘Keth’ (Ehtereum proper uses Eth). You can get Keth here, using your public key generated when you create a wallet.

Blockchain developer tool chain

Putting all that together, you’ll have a toolchain that cold look something like the ones below:

But it’s totally your choice! You should certainly look around and select the right ones for your own style.

Writing your contract

Now, we need to write our smart contract. When folks first started writing Smart Contracts there were no real standards, so lots of issues and hacking used to occur (including some losing lots of crypto currency). Luckily, token contract standards have started to form, one of which is ERC20.

Because this is a short blog, I’m going to cheat and provide you an example in this repo . You can use this, explore it and change the pieces your like, as you wish. This contract is ETH20 compliant and provides all the basic components of what that requires.

So, go ahead, hook up to your test network and deploy it using the tools above! Now, It’ll take you some learning to understand how to do just that, but that’s where I’m going to stop for today and let you get started.

In future blogs, I’ll look to focus on setting up some of these tools. You can also head over to DevNetCoin to ‘buy’ some of our tokens (it’s actually free – the token is on the Kovan network!) and get to understand how the tools and mechanisms of buying crypto tokens work! If you’re wondering if using a blockchain is right for your use case, feel free to drop me a comment on this blog, or check out my other blogs on blockchain.

If you want to see what Cisco is doing in the blockchain space, head over to the DevNet Blockchain website to learn more.

Come see us!

The DevNetCoin token launch was part of a session discussing how folks can get into blockchain development, by understanding the basics of blockchain, smart contracts and the tools and toolchains emerging to help developers write applications atop blockchain technology. Catch my sessions with Val Benincosa in the DevNet Zone at upcoming CiscoLive events on these topics and hopefully stay for a chat, too!

Share

Share: