当前位置:网站首页>solidity的msg.value
solidity的msg.value
2022-07-28 17:02:00 【l齐天】
在发钱给合约时会改变msg.value的值。msg.value的值以wei为单位,数值大小为给合约打的wei的数量。
可用以下合约进行测试
pragma solidity ^0.4.23;
contract tx{
uint256 value;
constructor()public payable{
value = msg.value;
}
function number()public view returns(uint256){
return value;
}
function n()public payable returns(uint256){
return msg.value;
}
}
边栏推荐
- [untitled]
- 频谱分析仪的性能参数
- Openmv (VI) -- STM32 realizes object recognition and handwritten digit recognition
- 互联智能,如何定义下一代网络变革
- Import the database backup of MySQL 8 into MySQL 5
- Video number one video broadcast 260million
- Personal production: ad library, component library, packaging library and 3D model, free of charge
- Digital filter (VI) -- design FIR filter
- 公众号和视频号互相绑定带来的功能
- Digital filter (III) -- Design of analog filter
猜你喜欢

【干货】如何建立支持和产品之间的密切关系?

频谱仪原理简介二

互联智能,如何定义下一代网络变革

天线的原理、分类及要求

Openmv (VI) -- STM32 realizes object recognition and handwritten digit recognition

The best implementation of horizontal listview -- recycleview

Leetcode--45. jumping game II (greed)

After CentOS uses docker to run mysql, the remote connection needs to open the port

如何简简单单地自己动手磨刀

DC-DC开关电源
随机推荐
Openmv (I) -- basic introduction and hardware architecture
个人制作:AD库、元件库、封装库及3D模型,免费
“3·8女王节”限时大促竟让场观、视频号销量翻倍?
Mysql5.7 compressed package installation tutorial
[reading notes] for:object detection with deep learning: the definitive guide
Electrotechnics Volume II self study notes 1.23
Analysis of Alibaba cloud Tianchi competition questions (in-depth learning) -- Reading Notes 1 -- competition question 1
七个步骤,深入解读数据含义
Tips -- tips in SCI thesis writing
视频号更像是2.0版的公众号
centos8按照docker官网创wordpress+mysql报错解决
示波器探头详解
Video Number Xiaobai starting operation guide
Nearly 200000 people watched a live calligraphy video
[dry goods] how to establish a close relationship between support and products?
USB Type-C 详解
长江存储推出自有存储品牌“致钛”,首款SSD产品曝光
蛰伏两年!瓴盛科技首款AIoT芯片发布:三星11nm工艺,集成NPU内核!
Live video Number supports product playback
体验5分钟开发微信小程序