美文网首页区块链研习社
Using Remix to Compile and Deplo

Using Remix to Compile and Deplo

作者: Olly_Zhang | 来源:发表于2018-11-13 19:28 被阅读31次
Using Remix to Compile and Deploy a Smart Contract in Different Env

This article wrote from my question on the difference smart contract running on the three different env supported in Remix.

Remix Execution Environments

. Js VM: a sandbox blockchain implemented with js in thr browser to emulate a real blockchain.

. Injected Web3: a provider that injects web3 such as Mist and metamask connecting to your private blockchain.

. Web3 provider: a remote node with geth, or any ethereum clients. can be used to connect to the real network, or to your private blockchain directly without MetaMask in the middle.

Remix works on Ropsten testnet by default(injected web3 ropsten), so the contract deployed will exist on testnet as long as testnet keeps alive.

But if you deploy your contracts using the sandbox env JS VM, they exist only on the memory of your browser, so they don't belong to any persistent blockchain.

Deploy smart contract are permanently stored on the ethereum network if your selected environment is Mainnet in remix.

Using Remix to Compile and Deploy a Smart Contract in Different Env

Here take an example of JS VM, once the contract deployed successfully on the JavaScript VM, a box will be open on the bottom of Run tab.

Using Remix to Compile and Deploy a Smart Contract in Different Env

You will see a similar message to the following screenshot in the IDE terminal.

Using Remix to Compile and Deploy a Smart Contract in Different Env

This message tells you the contact address which uniquely identify the contract you deployed and the transaction hash represents the contact deployment has been done successfully and stored into the blockchain.

相关文章

网友评论

本文标题:Using Remix to Compile and Deplo

本文链接:https://www.haomeiwen.com/subject/kbflfqtx.html