New answers tagged

0

Adding an answer for others who come across this. Unpopular opinion: Don't do it, because you can't do it. Methods based on the assumption that code size of zero reliably implies that the caller must be an EOA will probably introduce a security risk. This is because a constructor can make such a call the constructor's address will return length 0 because ...


0

The way I usually do this is by emitting an event that includes the created contracts address. It actually looks like the contract you called (0xc0abbf630bc11aa4a48f2cb6735f22104eeaf3e2) does this in the very last transaction as the last topic https://etherscan.io/tx/0x996a683acd59a2ad17461f76ce0f387a89a5ac257ec5d667556219c6acc7f45a#eventlog. The source isn'...


2

The error message gives you both the reason for error (incorrect checksum) and the way to fix the error (the letters in your address must be uppercase). Just copy paste the address provided by the error message in your code. See this answer.


0

(This is just an educated guess, to be 100% certain I'd need to see your entire contract and the series of calls leading up to the error) An INVALID opcode is raised when you attempt to access a storage location that hasn't been intialized. In this case, you are attempting to store data in a dynamic array emp at location emp.length-1. Because the length of ...


0

Our particular constraints: using addresses as identification minimal UX trade-off The solution: A contract that generates receiver contracts The receiver address producing contract: contract Factory { address public owner; mapping ( uint256 => address ) public receiversMap; uint256 public receiverCount = 0; constructor() public { /* ...


0

I assume you can't identify the token transferrers just based on the sending address - otherwise this would be trivial (just follow the Transfer events). I personally don't quite understand why meta transactions aren't a big thing already. They enable all sorts of scenarios especially in easy user on-boarding. Sure, they have some issues and are a bit ...


0

You can use web3.js as it is the same process for ethereum and ethereum classic to interact with the blockchain. There are also libraries for creating accounts and wallets from ethereumjs.


0

I assume the issue is on this line: address newCampaignAddress = new Campaign(minimum, msg.sender); newCampaignAddress is an address, while the right hand side of the assignment is not. It's a Campaign. As the error message indicates, Solidity will not implicitly cast from Campaign to address. You can, however, explicitly cast the value: address ...


Top 50 recent answers are included