The introduction
In our last article, “Get Started with your first Smart Contract,” we explained how to write and run our first smart contract. But that’s just running the contract in the browser’s blockchain virtual environment, which is different from blockchain, and it can’t be used by anyone else. Therefore, this paper mainly introduces how to use Remix to deploy our written smart contracts into the public chain. In this paper, we take Rinkeby, the test chain of Ethereum, as an example.
Ethereum tests the network
The network most people use is called Mainnet, where users trade, build smart contracts and miners mine. The main network is functional and the Ether on it is valuable because it is used by so many people, it is robust against attacks, and the blockchain is not easily tampered with.
And in order to convenient for developers to test, we also need some open test network, Ethernet has multiple test network, including Ropsten, Kovan and Rinkeby, relative to the main network, test network using smaller, less node, poor robustness, also easy to tamper with, but the etheric COINS for easy, convenient for developers to test.
Connect the test chain using MetaMask
In order to be able to access Rinkeby, we need a bridge to the blockchain, and here we use MetaMask, which is a plug-in on browsers like Chrome that allows us to run our smart contracts in the browser. Using Chrome as an example, download Metatask from the plugin store, enter a password to create a wallet account,
Rinkeby Ehter access
Link MetaMask using Remix
As introduced in My First Smart Contract, Remix’s Environment was set as Injected Web3 and Remix would link to MetaMask.
Wait for a moment after the contract has been successfully deployed, address 0 xa9511dc74fd18a7e09b1ceaeaa8bab93e7523200 contract, we can query to the contracts from www.rinkeby.io/#explorer.
conclusion
This article focuses on how to deploy smart contracts to blockchain using Remix and MetaMask. We used Ethereum’s Rinkeby blockchain network.