a94*_*a94 1 inline-assembly ethereum solidity evm
我想在我的合约中包含一个内部方法,该方法允许在由参数命名的存储中创建一个新的 uint256。就像是:
function createUint (string memory _name) internal {
/*
* creates a new uint256 named _name in storage
*/
}
Run Code Online (Sandbox Code Playgroud)
我的猜测是它需要内联汇编,但我不知道如何
映射怎么样?
mapping(string => uint256) myMap;
function setValue(string memory name, uint256 value) internal {
myMap[name] = value;
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1049 次 |
最近记录: |