当前位置:网站首页>Msg.value of solidity
Msg.value of solidity
2022-07-28 18:23:00 【L Qi Tian】
It will change when sending money to the contract msg.value Value .msg.value The value of wei In units of , The value is for the contract wei The number of .
The following contract can be used for testing
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;
}
}
边栏推荐
- 矢量网络分析仪(矢网)的校准
- MediaTek has submitted an application to the US side, striving to supply goods to China after September 15
- NDK 系列(5):JNI 从入门到实践,爆肝万字详解!
- About the difference between root and alias under localization
- What role does low code play in the digital transformation?
- Tips -- solve the problem of no module named matlab.engine
- 有一种密码学专用语言叫做ASN.1
- USB Type-C PD快充简介
- ModelBox端云协同AI开发套件(RK3568)试用记录(三)
- The growth path of hardware engineers (0) -- Understanding components
猜你喜欢
随机推荐
个人制作:AD库、元件库、封装库及3D模型,免费
[untitled]
Tensorflow2.0 (XI) -- understanding LSTM network
如何简简单单地自己动手磨刀
Food safety | will the salt content of bread exceed the standard? A few tips to teach you to eat bread correctly!
MySQL operation Encyclopedia
信号源原理简介
Five key considerations for network security budget planning in 2023
Introduction to USB type-C PD fast charging
Power adapter global definition
Openmv (IV) -- STM32 to realize feature detection
solidity的msg.value
初识结构体
The US ban on Huawei began to affect European chip manufacturers
横向listview的最佳实现——RecycleView
Openmv (I) -- basic introduction and hardware architecture
七个步骤,深入解读数据含义
MediaTek has submitted an application to the US side, striving to supply goods to China after September 15
Import the database backup of MySQL 8 into MySQL 5
物联网在智慧城市的应用









