上一页 1 2 3 4 5 6 7 ··· 10 下一页

2018年11月20日

摘要: pragma solidity ^0.4.4; contract Students{ uint[] data= new uint[](4); address _owner = msg.sender; function get() constant returns(bool,uint,string,uint){ return(true,... 阅读全文

posted @ 2018-11-20 11:33 eilinge 阅读(245) 评论(0) 推荐(0) 编辑

摘要: 编写应用合约之前,先弄清它的逻辑,有助于我们更好的部署合约 pragma solidity ^0.4.21; pragma experimental ABIEncoderV2; contract voter1{ //voter candidate //["eilinge", "lin" ,"meimei"] //admin 0x4B0897b0513fdC7C541... 阅读全文

posted @ 2018-11-20 10:48 eilinge 阅读(312) 评论(0) 推荐(0) 编辑

2018年11月19日

摘要: pragma solidity ^0.4.4; contract funder{ //0xca35b7d915458ef540ade6068dfe2f44e8fa733c //0x14723a09acff6d2a60dcdf7aa4aff308fddc160c :10 //0x583031d1113ad414f02576bd6afabfb302140225 :20 ... 阅读全文

posted @ 2018-11-19 18:03 eilinge 阅读(295) 评论(0) 推荐(0) 编辑

2018年11月18日

摘要: pragma solidity ^0.4.0; contract test { uint [5] T =[1,2,3,4,5] ;//固定长度的数组:可修改数组内值大小,不支持push,不可更改长度 /* contract test { uint [] T = new uint[](5); //ParserError: Expected identifier... 阅读全文

posted @ 2018-11-18 22:52 eilinge 阅读(820) 评论(0) 推荐(0) 编辑

2018年11月16日

摘要: pragma solidity ^0.4.0; contract byte1{ /* 固定大小字节数组(Fixed-size byte arrays) 固定大小字节数组可以通过bytes1,bytes2...bytes32声明,byte=byte1 bytes1 只能存储1个字节,也就是二进制的8位内容 //一个字节=8位2进制/一个字母/符号/(1/3汉字... 阅读全文

posted @ 2018-11-16 18:03 eilinge 阅读(807) 评论(0) 推荐(0) 编辑

2018年11月15日

摘要: pragma solidity ^0.4.0; contract modifierTest{ uint public v1; uint constant v2 =10; //uint constant v3; Uninitialized "constant" variable string public v4='test1'; string c... 阅读全文

posted @ 2018-11-15 18:04 eilinge 阅读(297) 评论(0) 推荐(0) 编辑

摘要: abi.encode(...) returns (bytes):对给定的参数进行ABI编码。 abi.encodePacked(...) returns (bytes): Performes packed encoding of the given arguments abi.encodeWithS 阅读全文

posted @ 2018-11-15 16:06 eilinge 阅读(587) 评论(0) 推荐(0) 编辑

摘要: pragma solidity ^0.4.0; contract Test{ address _owner; uint160 _c; constructor() public{ _owner = 0xca35b7d915458ef540ade6068dfe2f44e8fa733c; _c = 115441409061981179681... 阅读全文

posted @ 2018-11-15 14:26 eilinge 阅读(1094) 评论(0) 推荐(0) 编辑

2018年11月14日

摘要: pragma solidity ^0.4.10; //枚举类型 contract enumTest{ enum ActionChoices{Left,Right,Straight,Still} // 0 1 2 3 //input/output uint ActionChoices public ... 阅读全文

posted @ 2018-11-14 17:58 eilinge 阅读(335) 评论(0) 推荐(0) 编辑

摘要: pragma solidity ^0.4.20; /* uint8 uint16 ...uint256 int8 int16 int24 ..int256 uint => uint256 int => int256 int8 有符号 +1 ,-3 uint 无符号 1,2 int8 8(位) 111 1111 ~ 0 111 1111 - (1+2+4+8+16+32+64) ~ ... 阅读全文

posted @ 2018-11-14 12:31 eilinge 阅读(213) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 10 下一页