
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.

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.

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

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.
网友评论