Remix IDE

Getting Started

Web-based IDE to create, deploy, execute the working of symbol contracts. Available at — https://remix.ethereum.org.

Remix in. a one-step environment to develop, deploy, and test a smart contract.

Steps in the development of a smart contract-

  1. Design
  2. Code
  3. Test

Design

Code

It begins with the pragma that provides a version number so that the compiler knows which version of solidity this was developed in.

  1. contract Greeter is like the class variable we use in high-level languages like C++ or Python.
  2. The constructor Greeter initializes yourName variable, set() function sets a variable to a name supplied by the variable message as a parameter and hello() function retrieves the name for use b the invoking application.

Artefacts generated by the Remix smart contract compile process and their use.

  1. ABI(Application Binary Interface) — The interface schema for a transaction to invoke functions on the smart contract instance bytecode.
  2. Contract Bytecode — This is the bytecode that is executed for instantiating a smart contract on the EVM.
  3. Web deploy script — This has two items a) JSON script to the web application to invoke smart contract function. b)Script for programmatically deploying a smart contract from a web application.
  4. Gas estimates — This provides gas estimates for deploying the smart contract and for the function invocation.
  5. Function hashes — First four byte of the function signatures to facilitate function invocation by a transaction.
  6. Instance bytecode — The bytecode of the smart contract instance.

The smart contract deployment process

First, a smart contract solution is written in a high-level language and compiled bytecode.

An ABI is also generated for high-level language applications, e.g., Web Apps to interact with the binary smart contract. EVM provides an execution environment for a smart contract bytecode. The smart contract requires an address for itself so that transactions can target it for invocation of its function. The contract address is generated by the hashing the sender’s account address and it’s nonce. A unique target account is reserved for smart contract creation and deployment. Target account zero, if a target’s address is zero or null, it is meant for creating a new smart contract using its payload feed. The payload of a transaction contains the bytecode for the smart contract. This code is executed as a part of the transaction execution to instantiate the bytecode for the actual smart contract, similar to how an actual smart contract creates an object.

The execution of a smart contract creation transaction results in the deployment of this smart contract code on the EVM. It is permanently stored in the EVM for future invocation. This transaction goes through all the regular verification and validation specified in the Ethereum blockchain protocol, block creation, transaction confirmation by the full nodes deploys the same contract on all the nodes. This provides consistent execution when the regular transaction with function messages are invoked on the smart contract.

Complete deployment process

https://twitter.com/thecapital_io


Remix IDE was originally published in The Capital on Medium, where people are continuing the conversation by highlighting and responding to this story.



from The Capital - Medium https://ift.tt/3fkl8vu

Post a Comment

0 Comments