当前位置:   article > 正文

remix使用

remix使用

remix使用介绍

remix是一个在线编写solidity的IDE。remix提供了编写、编译、部署、调试、测试solidity程序的功能。

remix网址

https://remix.ethereum.org/

使用介绍

remix主页介绍remix主页

编写solidity程序

  1. 新建一个solidity文件夹,用以放置编写的silidity程序
  2. 新建一个名为HelloWorld的solidity程序
    file explorers
  3. 编写solidity程序
// 定义solidityde的版本
pragma solidity ^0.5.0;

// 定义一个名为HelloWorld的合约
contract HelloWorld {
    
    function helloWorld() public pure returns(string memory){
        
        return "hello world";
    }
    
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

在这里插入图片描述

编译solidity程序

  1. 选择solidity编译器的版本,编译合约
    编译合约

部署合约

  1. 到部署页面,部署合约
    部署合约
  2. 部署后看在控制台看到合约的部署信息,在左下方可以看到合约地址以及调用该合约的方法
    部署后的合约
  3. 调用合约的方法
    调用合约里的方法
本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/1016333
推荐阅读
  

闽ICP备14008679号