Get Started with Ethereum Testnet for Laminar Flow Protocols

Bette Chen
Laminar
Published in
4 min readNov 11, 2019

Before launching on Ethereum mainnet, Laminar Flow Protocols will be deployed on the Ethereum test network (aka testnet) like other projects. This will allow developers, protocol participants, the community and traders to review and examine the protocols before real assets get involved.

Test Network

This guide will cover the Kovan testnet where Laminar Flow Protocols are launched.

A test network runs similarly to the Ethereum mainnet. There are a number of testnets available — Kovan, Ropsten and Rinkey. Our choice is mostly based on preferences and availability of dependant contracts.

Connecting to Testnet

Ethereum accounts would work on any testnets as well as mainnet. Generally, it is recommended to use a different account on testnet, so that you won’t accidentally send real Ether to a testnet address.

Metamask Wallet

Using Metamask to interact with Ethereum networks, Laminar Flow Protocols, and our DApp is very straightforward. You can follow these guides from Metamask (Part 1 & Part 2) to set it up.

You shall switch the network from Main Ethereum Network to Kovan Test Network when interacting with Laminar Flow Protocols.

Metamask networks

Add Flow Token Addresses to Track Their Balances

Metamask shows the ETH balance on your account by default. You will need to add other ERC20 tokens of interest to track their balances.

Go to menu, scroll down and click on Add Token, put in the token contract address of interest, for example

  • DAI: 0xbF7A7169562078c96f0eC1A8aFD6aE50f12e5A99
  • fEUR: 0x99D46D56b4f17BeFbE95673161aBDa45a0c29bf8
  • fJPY: 0xEAc94CCD74EFa1ED1578fF8276A96066b788c3A7
  • fXAU: 0xeD476b30f8296626051A3b5d5fA2A83CdC2B36eD
  • fAPPL: 0x9A442a19b2168CdBED51BD3dbDECe1e9FA5E6d7E

As we continue to develop the protocols, the Flow Token contracts may get updated and re-deployed. But you can find the latest Kovan deployment addresses here.

We will add support of other software and hardware wallets such as Coinbase Wallet and Ldger with guidance documentation as we progress.

Acquiring Ether

You will need Kovan ETH — KETH to pay gas fees. Here are a couple of ways to obtain testnet ETH.

Gitter Kovan Faucet

You can go to Gitter Kovan Faucet, sign in with a Github or Twitter account, and paste your Kovan Ethereum address to the chat, then a few Ether will be sent to you shortly.

Kovan Faucet by Parity

You can also go to Kovan Faucet, log in with a Github account, and provide your Kovan Ethereum address to obtain some Ether.

Acquiring DAI

The Laminar Flow Protocols deployed on Kovan use DAI provided by Compound for ease of acquiring and testing purposes.

Get DAI on Laminar Flow Exchange DApp

Switch your Metamask to “Kovan Test Network”, then visit the Flow Exchange Dapp, click the Faucet button on the Dashboard tab to obtain some DAI for trading 🚀.

Get DAI from Compound Website

Alternatively, go to Compound’s DAI page. At the bottom of the page, click the Faucet button to obtain some DAI.

Set up Remix (Optional)

If you are looking to deploy your own liquidity pool to participate in liquidity provision, or you want to interact with Laminar Flow contracts without coding, you can use Remix — the Ethereum integrated development environment to make it easier.

Use Remix to approve the Laminar Flow contracts to move your DAI tokens. This is only required if you want to interact with the smart contracts directly without coding. You may skip to step 4 if you are familiar with Remix.

  1. Open Remix
  2. You should have your Metamask logged in and connected to Kovan testnet
  3. Set up Remix to enable interacting ERC20 contract
  • Copy the contract source code from here
  • Go to the Remix File Explorer tab: create a new Solidity file with any name, and paste in the source code. Select this newly created file.
  • Go to the Compiler tab: hit the Compile button
  • Go to the next Deploy & Run tab: now this should be enabled for us to set up and interact with DAI ERC20 contract

4. Set up DAI contract

  • In the Deploy & Run tab, ensure Injected Web3 is selected in the Environment field
  • Select IERC20 in the dropdown above the Deploy button
  • Paste the DAI address 0xbF7A7169562078c96f0eC1A8aFD6aE50f12e5A99 next to the At Address field
  • Click At Address button

5. Use the DAI contract

  • Expand the IERC20 box below the Deployed Contracts, and expand the approve function box, where you can interact with this function
  • To approve synthetic asset contract to move your DAI for minting or depositing tokens, put its address in the spender field
  • Put the approved amount in the amount field. Note this is in the unit of uint256, with DAI having 18 digits, 100 DAI is represented as 100000000000000000000
    See sample transaction here.

Start Testing Laminar Flow Protocol

You can use the protocols via our web application: https://flow.laminar.one or you can interact with the smart contracts directly https://github.com/laminar-protocol/flow-protocol-ethereum/wiki

Get Updates from Laminar

Official Website: https://laminar.one
Twitter: https://twitter.com/LaminarProtocol
Github: https://github.com/laminar-protocol/flow-protocol-ethereum
LinkedIn:https://www.linkedin.com/company/laminar-protocols

--

--

Bette Chen
Laminar
Editor for

COO & Co-Founder @Laminar & @AcalaNetwork. Full-stack Product Manager. Budling for a decentralized future.