New answers tagged

0

For anyone that may have the same problem, I followed Sanjay's answer and made some adjustments to it so it can fit my case better. For the reason that I want users to have as many identities as they want (and name them), I needed a struct. So, I did this: Created a struct which holds the: Address of the user Address of the instance The name that the user ...


1

The transaction does not have a "to" so the EVM will try to deploy a new contract using the data field as bytecode. You are sending in the data field the following: 0xa9059cbb0000000000000000000000000764edccd0278ee60c421148b8bab812306d90d50000000000000000000000000000000000000000000000000de0b6b3a7640000 Now 0xa9 is not a valid opcode and the EVM will halt ...


0

It does not get deleted but the variable of that contract is deleted. In order to preserve the variable of the contract before you exit the geth console, you can store the variable with corresponding ABI interface and address of the contract in web3js. Example code in node.js: var http = require('http'); var Web3js = require('web3'); var web3 = new Web3js("...


0

In your factory contract, you can track the instances created. pragma solidity ^0.5.10; import './ContractToBeInstanced.sol'; contract newInstance { mapping(address=>address) public userContracts; function newInstanceFunc(address _address) public returns(address) { ContractToBeInstanced T = new ContractToBeInstanced(_address); address ...


2

It is not possible for a Smart Contract to trigger itself. However, you could use an external service like the Ethereum Alarm Clock which will trigger the Contract for you.


5

You are violating one of the basic concepts of blockchain. You can't remove anything! If the contract has a method in place for disabling its functionality that's fine. However, it will always remain on the blockchain.


0

When a transaction is issued, the transaction is sent to a node to be mined and added in a block. After issuing the transaction, if the transaction structure is properly filled with necessary fields, the transaction hash will be returned instantly. If there is any wrong in the given transaction structure like to address is not properly set, the error will be ...


4

I assume you deployed it on the Main Net using MetaMask. Probably the gas limit of the transaction was too low. Otherwise the gas price was to low. Please send a screenshot of your MetaMask transactions, in case above didn't fix it.


3

This seems to be a remix bug. When you deploy it using web3 or so it should work properly. Everything should be fine. As the other answer stated you can bypass this problem.


0

I tried the same and my code worked perfectly. There was no such error as well. I cannot say about bug or something, just make sure that you are passing the values properly. Edited answer: I did the same as yours and its giving error creation of FundRaiser errored: Error encoding arguments: Error: invalid number value (arg="", type="number", value=...


0

The process goes the same way in your private network as in the mainnet or Ropsten. You just have to define the endpoint properly to point to one of the nodes. As it is a private network controlled by you, to deploy the contract for free you can just use a gas price of 0 for the transaction.


1

There are only two possibilities: a) Your contract deployment reverts, spending all gas b) Your deployment is too complicated (does it have a for loop?) To debug this, keep deleting code from your contract until the deployment works. Then add code back until it works. Continue this process exhaustively until you identify the line of code causing the ...


Top 50 recent answers are included