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
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 ...
0
votes
2answers
7 views

What causes .deployed() to return same contract instances in each test

It took me awhile to diagnose the problem. At first I just noticed that the states of my contracts were being affected by previous tests when running truffle test I then looked in the terminal tab in ...
0
votes
2answers
79 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 ...
1
vote
1answer
21 views

Is it possible to send ERC-20 tokens with the gas from another account?

I'm creating a DApp platform which allows customers to send and receive USDT (ERC-20 Token). The problem I have is that if customer want to send some Tethers out, he should have enough ETH too as the ...
0
votes
1answer
283 views

web3.eth.getAccounts() never give any output

const deploy = async () => { **var acct = await web3.eth.getAccounts();** console.log("ac", acct); } deploy(); even the console is not getting printed,what could be the reason? ...
0
votes
0answers
12 views

If I set unlimited gas in a dev environment, am I just postponing dealing with a problem in my contract or is it a Truffle issue?

Booted up ganache with this command: ganache-cli --gasLimit=0x1fffffffffffff --allowUnlimitedContractSize -e 1000000000 because I was running into this error on truffle migrate in my development ...
0
votes
0answers
8 views

Error: This contract object doesn't have address set yet, please set an address first

I should click on a button in HTML such that by the clicking a smart contract must be deployed and its function must be run. But when i write the codes of the both operations in Node-js the followed ...
0
votes
0answers
12 views

Which of MyContract.new(…) and MyContract.deploy().send(…) is better to deploy a smart contract?

Suppose MyContract is the name of the given contract. I tried two commands to deploy that, MyContract.new(...) and MyContract.deploy().send(...), and the both worked. So, i interest to know which of ...
0
votes
1answer
15 views

Why my contract binary does not set?

My project is in Truffle. I programmed a smart contract and want to deploy it with JavaScript. But the following error occurs: Error: Contract error: contract binary not set. Can't deploy new ...
0
votes
0answers
11 views

program terminates on web3 async requests [closed]

the terminal stops and doesn't execute any line after the async request whether the request is getAccounts or deploy it doesn't matter. Any web3 async request causes the terminal to terminate. const ...
0
votes
0answers
14 views

web3.eth.getAccounts() returns no output

const deploy = async () => { const accounts = await web3.eth.getAccounts(); console.log("Attempting to deploy from contract ", accounts); }; The code runs but returns nothing and even the next ...
0
votes
1answer
37 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 ...
2
votes
3answers
226 views

Publishing contracts with libraries using web3.py

Im trying to publish contracts with libraries in them and im getting the below issue. Contracts without libraries publish just fine. Can someone who might have faced this issue before advise what the ...
0
votes
1answer
18 views

Problem with Syntax in Solidity with sale contract

Good evening. Well, I have really been battling with this and have followed instructions to the "T" but somehow i'm not getting the Syntax right on Solidity. I'm using Remix in my Web.3 Browser. I ...
0
votes
1answer
30 views

Error when deploying contract in geth with truffle ? --> Returned values aren't valid, did it run Out of Gas?

I have deployed a contract in a geth private network by using truffle. I can send transaction via my UI in html / nodejs but i am not able to do a call to retrieve informations. If I do, nothing ...
0
votes
1answer
21 views

Corporate key store for storing private keys - Ethereum

Is there a device to store private keys of Ethereum in a corporate world? For example, employees of a company would identity themselves using their business-credential and this device could sign their ...
0
votes
1answer
29 views

“VM Exception while processing transaction: invalid opcode” only with Byzantium hardfork

i'm testing my Smart Contract with Truffle and Ganache, everything works fine while using hadfork version "Petersburg", but when i switch to Byzantium i receive this error while truffle performs ...
3
votes
1answer
289 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 ...
0
votes
1answer
18 views

Deploying contract to infura via @truffle/hdwallet-provider is hanging

I created a contract and deployed to Ganache test network successfully but it is not deploying to infura. //this section is clean. worked for Ganache var output = JSON.parse(solc.compile(JSON....
5
votes
1answer
139 views

Receive deployed contract address by transaction hash with JSON-RPC request

I want to receive deployed contract address by transaction hash. Transcation example - 0x996a683acd59a2ad17461f76ce0f387a89a5ac257ec5d667556219c6acc7f45a. As you can see this contract was deployed by ...
0
votes
1answer
40 views

Power of signing transactions and what you can do with that

I have been playing around with state channels and am starting to see the power of signing information/transactions, but haven't got a completely clear idea of what I can do with them. I think I can ...
0
votes
1answer
40 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
2answers
113 views

app.vote(1, {from: web3.eth.accounts[0] }) not working

I am following a tutorial from Dapp University about building Election Smart Contract. When I run this command in the console: app.vote(1, {from: web3.eth.accounts[0] }) I get the following error: ...
0
votes
1answer
19 views

Contract inheritance to share same storage in Proxy pattern for upgradeability

Please bear with me here, I have been trying to figure it out myself but couldn't. I am trying to learn upgradeability with a Proxy pattern .https://blog.gnosis.pm/solidity-delegateproxy-contracts-...
0
votes
1answer
36 views

How do I find how much money is stored on all deployed instances of a contract?

I am reviewing a certain contract, and would like to gauge how much money is stored on all deployed instances of this contract. Someone told me I can deploy a new instances of the contract to mainnet,...
0
votes
1answer
15 views

How to include constructor arguments in bytecode for smart contract deployment in genesis block?

Please excuse if the title is not perfectly accurate but I had a hard time fitting my problem into 1 question. If you have a better title please feel free to suggest it and i will edit it. I want to "...
1
vote
1answer
16 views

How to pass constructor parameters to solc?

I'm trying to compile a Smart Contract to bytecode using solc. I'm on a Ubuntu VM so I have to rely on a simple-to-install cmd line application. Compilation works fine but it seems like I can't pass ...
0
votes
0answers
15 views

Which contract bytecode to deploy? [duplicate]

I the build/contracts/*.json files there are two bytecode fields: "bytecode" "deployedBytecode" What is their difference and which of them to deploy?
1
vote
2answers
1k views

Remix - Contract creation initialization returns data with length of more than 24576 bytes. The deployment will likely fails). What can be done?

I get the following error when deploying my contract in Remix: Contract creation initialization returns data with length of more than 24576 bytes. The deployment will likely fails. More info: eip-...
4
votes
2answers
3k views

How big could a contract be?

I am trying to figure out how big could a contract be? Is it possible to have 10k functions? One million? More? Is there any restriction on the function's body size? Does a bigger contract need ...
0
votes
1answer
27 views

Why I can't deploy a smart contract to a specific public key if i just generated and own this publickey/private key?

I am writing an explorative article about the actors/assets model for Ethereum 2.0 (https://ethresear.ch/t/ethereum-2-0-data-model-actors-and-assets/4117). Are there some reasons why is it not ...
1
vote
1answer
56 views

Deployed Smart contract methods are not updating the value when restart the geth instance.Why?

Started Geth using following command geth --identity "testpvtnode" --rpc --rpcport "8545" --rpccorsdomain "*" --datadir <pvtnetdatapath> --port "30303" --rpcapi db,eth,net,web3,personal --...
2
votes
1answer
197 views

Truffle Deploy gas limit exhausted

I kept on getting this error. 9/10 of my deployment will fail. But out of the sudden it will be success without any reason. I have checked the transaction receipt and indeed it had reaches the gas ...
2
votes
1answer
169 views

truffle deploy live | transaction not mined within 750 seconds

I'm trying to deploy my smart contract to the live ETH network. I've done the same process on rinkeby and it works fine. However during the block mining phase it times out and gives the error: " ...
1
vote
2answers
32 views

Contract deployment with “truffle-contract”

My purpose is deploying a smart contract to a private network with Node-js. I work on Truffle and Ganache. I tried it with "truffle-contract". But in deploying process an error occurs. My contract ...
2
votes
1answer
150 views

Deploy smart contract on Ropsten using truffle-hdwallet-provider

I have 7 smart contracts to deploy on the Ropsten network. I am using truffle-hdwallet-provider and below is the content of my truffle.js file: module.exports = { solc: { optimizer: { ...
1
vote
1answer
82 views

Deploying fails with different compile version

I'm trying to implement a simple card game. Actually, everything is working fine. Until I tried to move from 0.4.0 to 0.4.22. Any idea what is going wrong? Thanks a lot. And here the code: pragma ...
1
vote
1answer
70 views

Contract not deploying with web3

I'm writing a web-based DApp with web3, and am trying to get my JavaScript to deploy a contract. I've set up the abi, contract, and bytecode as follows: const trade_abi = [ ... not shown: ABI copied ...
0
votes
1answer
33 views

How to deploy A contract created by another contract in the browser?

Hey I am making a smart contract that create another smart contracts. Organization.sol create Session.sol . When I create a session using createdSession function I got it's address and I already had ...
1
vote
1answer
165 views

Unable to unlock account before deploying contract to rinkeby

Each time i try to unlock my account w/ password i get the error: Fatal: Failed to unlock account 0x1288AB0bf7FE0Ad09d7f28bd4Ab2C06332c625a2 (no key for given address or file) my geth command is: ...
0
votes
2answers
20 views

Set contract storage directly at deployment

Is there a way to pre-define a contracts storage when deploying it? Say I want a mapping to be filled with 1000 entries but want to avoid having to pay gas for adding every entry on its own. Since ...
0
votes
1answer
23 views

What is .new()?

I am using the following code to deploying a smart contract to a private network with Node-js. But the error TypeError: contract_object.new is not a function occurs. What are .new() and the error's ...
1
vote
1answer
38 views

Transaction does not get mined on rinkeby

so I'm trying to deploy my first contract on rinkeby using web3 and truffle/hdwallet-provider. even with different gas prices it doesn't get mined.Please help out. const HDWalletProvider = require("@...
1
vote
2answers
44 views

Assigning address, data, and gas to smart contract to deploy with Node-js

I used this guide to deploy a smart contract with Node-js. I followed as far as my contract was created as an object. Because the mentioned guide is old some web3 methods changed nowadays. So it looks ...
1
vote
3answers
31 views

Deploy smart contract with Node-js

I want to deploy a smart contract with Node-js. I followed this guide but an error occurs where i effort instantiate my smart contract. app.js: var Web3=require('web3'); var fs=require('fs'); var ...
0
votes
1answer
106 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 ...
1
vote
1answer
61 views

Cannot deploy new contracts with pending transactions (Ropsten)

I have a very strange and annoying problem. I am trying to deploy a new contract however it just keeps cycling. I have the same problem on the POA testnet and on Ropsten. Please see below: I have ...
1
vote
1answer
67 views

Which one of methods should I choose for deployment of smart contract geth or a wallet if I have to build API for smart contracts in nodejs?

I'm having trouble to understand which method would be better for deployment geth or a wallet if I'm building API in nodejs using web3. Where exactly is the contract stored?? Is the contract ...
1
vote
1answer
72 views

What is rpc and p2p code for Ethereum token? What to give as GitHub source code of an Ethereum token in exchange?

I’m new to Ethereum development. From ethereum token docs I came to know the process of deploying the token. But at some exchanges they ask for RPC and P2P port as well as the github source of the ...
0
votes
1answer
14 views

Deployment transaction mined but contractAddress still empty

I'm trying to deploy a very simple smart contract on Ropsten through Infura When I launch (on Ubuntu) my deploy.js script, everything seems to work except I don't get the contractAddress in the ...

1
2 3 4 5
20