Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Oct 10 2017 22:42
    @jpitts banned @etherchamp1_twitter
  • Jun 05 2016 10:33
    @chriseth banned @adamskee
Bernd Bohmeier
Hey, any idea where I can find the specification on the exact behavior of recipient.call.value(VALUE).gas(GAS)? Specifically I am interested in what will happen if there is less gas left than GAS. Will the call itself fail and return false for success or will the transaction fail?
Lee Raj
@bubbleboy14 set in the constructor
Alexander Wade
Does anyone know when enum casting started doing checks for values higher than the maximum enum value?
hi there. Is there any difference is gas costs for different languages? Is a contract in solidity cheaper to run/execute/store...whatever than a similar code in LLL, Huff or say Vyper?
Lauri Peltonen
Probably not
It's possible, depending on how things are implemented in the compiler. Actually, for some complicated constructs I'd say it's quite possible
They have the same EVM operators in use but might use them in a bit different ways
Lauri Peltonen
have you ever seen the rain?
Yaa even the snow
Any questions?
Cryptocurrency signals for 2020 https://tinyurl.com/Cryptocurrency-signals-2020
Sana Fatima
can i get a function's output of a specific transaction using web3py?
Saurav Shekhar
abi encode error.png
Does anybody knows why I am getting parseError at line 29?
@sauravs pragma solidity ^ 0.5.0;
Saurav Shekhar
still same issue
@sauravs uint skill=uint(keccak256(abi.encodePacked(_name))); try this
try to add just 1 closing bracket at the end
Saurav Shekhar
@kerolosss thank you.
Cryptocurrency signals for 2020 https://tinyurl.com/Cryptocurrency-signals-2020
Saurav Shekhar
interface address issue.png
anyody help me resolving this issue? I tried with replacing line 31 with address payable = 0x060...;
@sauravs solidity >= 0.5 needs your addresses to have valid checksums. For a quick trick to get a checksum: find this address on etherscan and then copy how etherscan lists the address (it does not matter if the address has no eth/transactions). Checksums have capitals in them
e.x. 0x627306090abab3a6e1400e9345bc60c78a8bef57 -> https://etherscan.io/address/0x627306090abab3a6e1400e9345bc60c78a8bef57 -> 0x627306090abaB3A6e1400e9345bC60c78a8BEf57
You can also checksum the address using web3
Saurav Shekhar
@jochem-brouwer Got it.Thank you very much.
can anyone think of why my openzepplin called burn function works in ganache-cli but not on rinkeby ?
if I have a contract that i'm importing into my contract so I can call ThatContract thatContract = new ThatContract, why is it costing me 5 million gas to do so?
it is a pretty simple ERC20 like contract that inherits two open zeppelin libraries
I thought the gas cost for create was 32k
I'm passing an array of addresses in and writing that to the storage of the newly created contract - but 5 million gas seems like way too much
Lauri Peltonen
Are you sure you run out of gas? If yes then the ThatContract constructor has to have some pretty heavy stuff.
No, I don't run out of gas
It just costs 5 million gas
The constructor doesn't do anything but assign the array of addresses to storage
tokens = _tokens
@realisation you pay for the data you store. I assume your token contract is quite large. IIRC you pay 200 gas per 4 bytes which you deploy
sying2025 revert The transaction has been reverted to the initial state.
Note: The called function should be payable if you send value and the value you send should be less than your current balance

sying2025 interface ERC20Interface {
// function transfer(address _to, uint256 _value) external;
function transfer(address _to, uint256 _value) returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
interface RegisterInterface {
function isLogin(address _userAddr) public returns(bool);

contract RentBasic {
enum HouseState {
HouseState defaultState = HouseState.ReleaseRent;
struct HouseInfo {
uint8 landRate;
uint8 ratingIndex;
uint8 huxing;
string houseAddress;
bytes32 houseId;
string descibe;
string landlordInfo;
string hopeYou;
address landlord;
struct HouseReleaseInfo {
HouseState state;
uint32 tenancy;
uint256 rent;
uint releaseTime;
uint updateTime;
uint dealineTime;
bool existed;
// RentToken token;
ERC20Interface token;
TenancyAgreement tenancyContract;
RegisterInterface userRegister;
HouseInfo public hsInformation;
mapping(bytes32 => HouseInfo) houseInfos;
mapping(bytes32 => HouseReleaseInfo) hsReleaseInfos;
mapping(address => uint) public addrMoney;

address public owner; 

event ReleaseInfo(bytes32 houseHash, HouseState _defaultState, uint32 _tenancy, uint256 _rent, uint _releaseTime, uint _deadTime, bool existed);    
event ReleaseBasic(bytes32 houseHash, uint8 rating,string _houseAddr,uint8 _huxing,string _describe, string _info, string _hopeYou,address indexed _landlord);        

modifier onlyLogin() {
function releaseHouse(string _houseAddr,uint8 _huxing,string _describe, string _info, uint32 _tenancy, uint256 _rent, string _hopeYou) public onlyLogin returns (bytes32) {
    uint256 nowTimes = now; 
    uint256 deadTime = nowTimes + 7 days;
    address houseOwer = msg.sender;
    // releaser should hold not less than 500 BLT
    // token.transferFrom(houseOwer, receiverPromiseMoney, promiseAmount);
    require(token.transferFrom(houseOwer, receiverPromiseMoney, promiseAmount),"Release_Balance is not enough");
    addrMoney[houseOwer] = promiseAmount;
    bytes32 houseIds = keccak256(abi.encodePacked(houseOwer, nowTimes, deadTime));
    hsInformation = HouseInfo({                
        landRate: 2,         
        ratingIndex: 2,
        huxing: _huxing,            
        hopeYou: _hopeYou,
        houseAddress: _houseAddr,            
        houseId: houseIds, 
        descibe: _describe,
        landlordInfo: _info,
        landlord: houseOwer            
    houseInfos[houseIds] = hsInformation;
    hsReleaseInfos[houseIds] = HouseReleaseInfo({
        state: defaultState,
        tenancy: _tenancy,
        rent: _rent,
        releaseTime: nowTimes,
        updateTime: nowTimes,
        dealineTime: deadTime,
        existed: true
    // releations[houseId].leaser = houseOwer;
    ReleaseBasic(houseIds, 2, _houseAddr, _huxing, _describe, _info, _hopeYou, houseOwer);
    ReleaseInfo(houseIds, defaultState, _tenancy,_rent,nowTimes,deadTime,true);
    return houseIds;


sying2025 revert The transaction has been reverted to the initial state.
Note: The called function should be payable if you send value and the value you send should be less than your current balance. Debug the transaction to get more information.
sying2025 jochem-brouwer (Gitter):
sying2025 temp
sying2025 an the main code is in temp file
is there a place where can I get resources for web3 js for free ... Thanks in advance
Hi guys! Apologies if I'm asking in the wrong channel. I am trying to get assembly output from solidity using solc --asm. According to internet this is something that used to work, but it doesn't seem to be working now. Any ideas why, or suggestions for an alternative?
@jochem-brouwer aha interesting. It's not that large, just a basic erc20 that inherits from two libraries. but 200 gas for 4 bytes...
where can I read up on that?