Solidity开发实践(一)发布第一个智能合约

本文介绍了在remix.ethereum.org上进行Solidity智能合约开发的初步步骤,包括新建文件并编写简单的计算器功能。尽管IDE缺少Solidity语言选项,但作者通过实践逐步适应。遇到的问题包括代码颜色显示差异、警告信息关于Infinite Gas,以及对Gas计算的疑惑。作者计划加快学习进度,目标是精通Solidity和智能合约开发流程。
摘要由CSDN通过智能技术生成

首先进入Solidity常用的IDE是在线编译环境remix.ethereum.org。

进入后点击文件树上的新建按钮,输入文件名和后缀新建文件。

代码本身没有难度,主要是适应下语言,环境和IDE。

pragma solidity >=0.7.0 < 0.9.0;

/* 

You just land your new blockchain job to build smart contracts for an awesome DAO catching fire!

Immediately, your boss throws at your a scrip of code tons of bugs in it. She says, 

'Hey you! Fix this code and get this smart contract running and help save our DApp from crashing!'

The clock is ticking and this is the perfect opportunity to prove your skills and show what you are made of.

Your assignment is to fix the code below full of syntax errors and get this contract successfully deployed on 
the Ethereum network. 

Good luck! 

*/

 contract learnFunctions {
    
   
   function remoteControlOpen(bool closedDoor, bool openDoor ) public returns(bool) {}
  
    
      uint a = 45;
      
   function addfValues() public view returns (uint) {
     
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值