Questions tagged [contract-deployment]

The act of pushing a compiled smart contract in byte code to the Ethereum blockchain.

Filter by
Sorted by
Tagged with
3
votes
1answer
625 views

Deploying on contract on main net - Error: insufficient funds for gas * price + value

Running geth v 1.7.3 truffle 4.0.5 truffle-config.js module.exports = { networks: { development: { host: "localhost", port: 8545, network_id: "*" // Match any network id ...
0
votes
1answer
285 views

What are the steps to send ERC-20 tokens?

I need to send USDT and other ERC-20 tokens via Geth on Ethereum. I'm using PHP and Web3.php library to work with Ethereum. So far, it worked well for everything. Now, I need to start sending tokens ...
0
votes
0answers
24 views

How can I compile multiple smart contracts in a single compile.js file?

There is another post on this question but I don't find it useful enough so I thought I should ask again. In my compile.js file, I'm taking each smart contract's complied code and put it in a ...
1
vote
2answers
34 views

what's the difference between call and just using function?

Let's say I have a contract called contractA. It has the function: function bla(address test) { // way 1. test.call(abi.encodeWithSignature("first4bytes", arg1, arg2)) // way 2. ...
1
vote
3answers
391 views

truffle migrate --network kovan issue

When I run truffle migrate --network kovan in the terminal the contract deployment doesn't run. Just: Compiling your contracts...==================== >Eveything is up to date, there is nothing to ...
0
votes
1answer
86 views

Cannot read property 'sendEth' of undefined, 'sendEth' is function in smart contract

Hi I'm trying to interact with an Ethereum smart contract but it is always showing "TypeError : Cannot read property 'sendEth' of undefined" where 'sendEth' is a function in my smart contract Here is ...
1
vote
1answer
58 views

What does scope do in the function itself?

Here is one of the functions I am curious about... function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external lock { require(amount0Out > 0 || amount1Out > 0, '...
1
vote
2answers
62 views

Unable to Deploy/Migrate to Mainnet via Truffle/Infura

On 12/26/2020 I successfully compiled, migrated and tested on Ropsten via Truffle the following contract https://github.com/estudios-amazonia/FilmVault/blob/main/contracts/FVP_Token.sol. See Ropsten ...
0
votes
2answers
107 views

Not able to get deployed address of smart contract

Error: connect ECONNREFUSED /home/sanya/.ethereum/geth.ipc at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1106:14) errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: '...
0
votes
1answer
62 views

Problem watching events without invoke functions in the Smart Contract

I have an event which is sent each time when a contract is deployed. It is launched in the constructor. I have a Dapp where I want to watch this event to send a tx each time that a smart contract is ...
1
vote
2answers
1k views

Contract deployment using web3.eth.contract(abi) with constructor arguments

I'm trying to deploy the following smart contract: pragma solidity ^0.5.00; contract TestContract { address public owner; string public word; constructor(string memory _word) public{ ...
1
vote
1answer
81 views

Calling a smart contract function with an unsigned transaction

I'm new to working with Ethereum smart contracts and would appreciate some guidance by the community on a task that I'm trying to solve. This is the contract I want to use - https://github.com/chatch/...
0
votes
1answer
2k views

Error encountered during contract execution - Out of gas

I try to create a smart contract (Simple TokenERC20) with sendRawTransaction(). var firstMainadress = '0x3c7B83E0Fa6f19B1B61e80A73630cB5Db48b700C'; var secondAdress = '...
0
votes
1answer
19 views

difference between contract creation in web3 and in solidity

I created a contract named Pepito by calling new in web3: import Pepito from "./contracts_abi/Pepito.json"; const instance = new web3.eth.Contract( Pepito.abi, address,...
1
vote
1answer
176 views

API node js with call and send to a contract without metamask

I am new in Solidity. I'm trying to create a API in node js, which can be use without a navigator like chrome with MetaMask. I would like to test it with postman. But i have some problems with web to ...
7
votes
1answer
877 views

Deploy contract in web3j quorum problem

I'm trying to deploy a smart contract (7 nodes sample from Quorum) using web3j. It fails at get() to get the contract wrapper object. If I check the logs, a new transaction will show up, but if I call ...
0
votes
0answers
28 views

Range error : Maximum call stack size exceeded

I am trying to deploy my contract written in solidity on a test network (Rinkeyby),But when i run the command "node deploy.js" i get the mentioned error in the title of this article which is ...
0
votes
1answer
529 views

Truffle tries deploy from unknown account

I am trying to deploy a contract to Ropsten using Infura with the config file truffle.js below. The deploy fails because the account listed in the error message has insufficient funds – however I do ...
0
votes
1answer
55 views

Unable to interact with a contract on Kovan network on Remix IDE

I am working on a project and I have successfully deployed a smart contract on Kovan test network, but for some reason, I am not able to interact with it in JS code. So, now I want to access it ...
0
votes
0answers
14 views

Error at calling the memory function

I am using an remix ide for the smart contract development, at the time of compilation of the below code I am facing the error of expected primary expression. Could anyone help me out with this ...
0
votes
1answer
565 views

Pass address[] array to Truffle deployer (MultisigWallet)

I am trying to deploy the MultisigWallet contract on testrpc. However, I can't figure out how to provide the address[] _owners constructor parameter in the deployment command. I've tried several ...
1
vote
2answers
1k views

On mainnet Gas required exceeds allowance or always failing transaction

When I try to deploy contract, the error comes up: gas required exceeds allowance or always failing transaction on mainnet. contract Crowdsale { using SafeMath for uint256; // The token ...
0
votes
1answer
35 views

Deploy basic proxy with arguments

https://github.com/optionality/clone-factory/blob/master/contracts/CloneFactory.sol#L32 contains a code to deploy a basic proxy. This code misses a way to pass data to the proxied contract to init it. ...
0
votes
2answers
79 views

How many functions allowed per contract? + solidity

I deployed a contract to ropsten and tried to call a method from frontend, but was getting TypeError: Cannot read property 'call' of undefined So I checked my instance via this.Test.deployed()....
0
votes
2answers
103 views

Massive Download [ETH] smart contracts

This question have just been published in StackOverflow as well, but you might be able to guide me on a better direction: I'm looking for the most valid path to download and keep downloading every ...
0
votes
1answer
268 views

Error: Invalid JSON RPC response | ropsten.infura

I'm trying to deploy my contracts to the ropsten test network, but I get this error. the message error : C:\Users\acer\test>truffle migrate --reset --network ropsten Using network 'ropsten'. ...
1
vote
1answer
61 views

how to see contract that only has bytecode

I am looking at this contract - https://etherscan.io/address/0xf8681dad1ce4f1f414fb07fc07f81a3a82e91d8f#code but it turns out that there's only ByteCode and if I decompile it, the code it gives me is ...
1
vote
1answer
37 views

Ethereum Contract Simplify

I'm confused about 'contracts' in Ethereum. When do I need a 'contract'? For the scope of my app: I want user to be able to generate ETH address, receive and send out ETHER and I should be able to ...
0
votes
1answer
22 views

when do smart contract wallets need to sign transaction by themselves?

Do smart contract wallets ever store priv/pub keys or something ? Of course, It would be then seen on the blockchain if it did, but I am asking this because somewhere, I've read that sometimes smart ...
0
votes
0answers
17 views

wallet and smart contract connection

I am just here to make sure that i understand what smart contract wallet and what wallet means. These 2 guesses of mine are highly related so what my question is simple. Am I right about assuming the ...
0
votes
2answers
147 views

Is there a better way to implement search functionality?

Take the following code for example: pragma solidity ^0.4.23; import "./MyContract.sol"; contract MyFactory { address[] public myContracts; function createContract(string ...
4
votes
2answers
748 views

How to compile Solidity ^0.5.5 contract with Node.js?

I am terribly new in Solidity and now I try to learn how to compile a contract in Solidity ^0.5.5 (No versions below). I have the contract as follow (UsersContract.sol) pragma solidity ^0.5.5; ...
1
vote
3answers
93 views

Ownership isn't allocated in the contract?

I've taken the below contract as an example from a tutorial and changed items highlighted in bold, as per IDE errors. What the contract should do is allocate ownership of the item to the account that ...
3
votes
1answer
388 views

How to find deployed transaction hash of any given contract in chain, with just “contract address” information?

Am trying to write small application which will be able to find Contract deployment transaction with only input parameter - contract address. The application should be able to search entire net.,i,e ...
1
vote
1answer
13 views

does selfdestruct clear/remove data?

I want to know if calling selfdestruct clears/removes data from blockchain or it still remains there. Looking at this link, CLICK HERE it says that data doesn't get removed. (first answer) Looking at ...
0
votes
1answer
227 views

remix ERC223: This contract does not implement all functions and thus cannot be created

I can't implement ERC223 contract. remix said " This contract does not implement all functions and thus cannot be created." please tell me what bad it is. pragma solidity ^0.4.25; library ...
5
votes
2answers
1k views

Contract creation gas cost depends on code in library function?

I have a contract fooContract which is using a fooLib library, calling fooLib.foo(LibStruct storage param) The transaction cost to create fooContract seems to depend on the code in the fooLib.foo() ...
0
votes
0answers
16 views

parity hack - how does this work?

I am looking at the following contract https://eips.ethereum.org/EIPS/eip-1822#erc-20-token Look at the following line : Ensures no one can manipulate the Logic Contract. IMPORTANT: I am going to ...
0
votes
1answer
13 views

Factory Pattern Migration With Truffle

have a standard factory pattern for my contract and I am trying to get it up and running using Truffle Migrations. In my factory truffle migration script I have await deployer.deploy(ContractFactory); ...
0
votes
1answer
144 views

Deploying a smart contract using transaction manager in web3j

I am new to web3j and smart contract deployment. Consider a scenario where a user is too scared to give his wallet credential file or username/password or private key in a piece of code(the code is ...
4
votes
3answers
2k views

Correctly deploying contracts with web3 1.0 and testrpc (invalid opcode error)

I followed the following tutorial: https://medium.com/@mvmurthy/full-stack-hello-world-voting-ethereum-dapp-tutorial-part-1-40d2d0d807c2 Now this tutorial is not using the recent version of web3 but ...
4
votes
1answer
524 views

Contract transaction couldn't be found after 50 blocks in Kovan

When deploying contracts on the ledger I faced with issue Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: Contract transaction couldn't be ...
2
votes
2answers
1k views

Constantly getting “Gas estimation failed” error when attempting to deploy ERC20 Token contract on Rinkeby testnet

I have included the code for the contract below. The error I get when attempting to deploy in remix via metamask is: Gas estimation errored with the following message (see below). The transaction ...
0
votes
0answers
12 views

Use new to generate an instance of a sub-contract in a smart contract

When we write a smart contract, we can use the keyword new in the code to generate an instance of a sub-contract. I want to know whether the instance of this sub-contract has an address, and can ...
0
votes
1answer
45 views

Contract deployment won't confirm in mist wallet

I'm trying to deploy a contract on the mainnet, and I'm using Solidity 0.4.24 I can only deploy the contract as byte code because I can't figure out how to upgrade the solidity compiler in mist (the ...
0
votes
0answers
33 views

store data in any slot

contract test { bytes32 private constant ownerSlot = keccak256("ownerSlot"); constructor(address _implementation) public { bytes32 s = ownerSlot; assembly { ...
0
votes
2answers
53 views

delegate call - msg.sender wrong value

pragma solidity >=0.4.22 <0.7.0; contract D { uint public n; address public sender; function delegatecallSetN(address _e, uint _n) public { _e.delegatecall(abi.encode(bytes4(keccak256(...
0
votes
0answers
11 views

estimateGas - how does it work when there's an internal call?

I've read the following: The catch about gas estimation is that the node will try out your tx with different gas values, and return the lowest one for which your tx doesn't fail. But it only looks at ...
3
votes
1answer
318 views

Geth Sync Problems | Rinkeby, Ropsten | Deploy contracts

Get Geth to sync --> Rinkeby test network. For the love of god I just want to deploy a contract. I have deployed it to Ganache-cli, GUI, remixIDE, deployed with truffle/Infuria.io...I keep failing to ...
1
vote
1answer
18 views

bignumber in solidity - returned values

Let's say that Ethereum solidity returns a number from one of its functions and I get that into Javascript. Now ,because I write tests in my js application, I have to check if the returned value is ...

1 2
3
4 5
24