New answers tagged

2

The examples that you gave fit well into bytes32 and they can be transferred to the contract as an array, which can be split into pairs inside. If you just want to transfer big data through a contract without processing it in it, then it is probably better to use a decentralized file system (IPFS, Ethereum Swarm) or cloud storage, and put a link to the data ...


2

I am not sure how you test it but I wrote a function that shows it is actually not empty. pragma solidity ^0.5.9; contract PhysicalContract { uint numContracts; mapping (address => uint) contracts_test; function newDeal(address adr, uint value) public { contracts_test[adr] = value; numContracts++; } ...


1

from 0.7.0 do like below: struct Request{ string description; uint value; address recipient; bool complete; uint approvalsCount; mapping(address => bool) approvals; } uint numRequests; mapping (uint => Request) requests; function createRequest (...


0

I think you can make a struct and then create a mapping with it.


Top 50 recent answers are included