Questions tagged [contract-deployment]

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

523 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
2 answers
373 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 ...
Dmytro Zarezenko's user avatar
7 votes
1 answer
2k 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 ...
ActionCures's user avatar
7 votes
1 answer
970 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 ...
vincent's user avatar
  • 71
6 votes
0 answers
645 views

how to decode/encode ipfs for contracts

It's known that IPFS can use 2 types of CID, v0 and v1. In my contract, I let users store bytes data parameter. They can store some simple text on it or even pass the ipfs hash. This question is about ...
Nika Kurashvili's user avatar
6 votes
2 answers
2k 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() ...
szerte's user avatar
  • 1,221
4 votes
1 answer
289 views

Goerli Smart Contract Deployment taking way too long because of pending transactions

My deployments are very slow. I've read that I need to override pending transactions by resetting the nonce. I'm using Infura. Is there a way to view pending transactions and their nonce like I would ...
HeeeeSark's user avatar
4 votes
0 answers
149 views

What happens in the account state when we pre-send ethers to a smart contract?

I'm asking this question in relation to this one : pre_sending Ether where the OP asked in a comment of the answer about what happens at the low-level when pre-sending ethers to a smart contract. As ...
clement's user avatar
  • 4,292
4 votes
0 answers
93 views

What's the point of Truffle Migrations?

I've been reading a few articles and StackExchange posts (e.g. What are truffle migrations?) about Truffle Migrations, but I still don't get it: why do we need them? It seems they do only one thing (...
GuiTeK's user avatar
  • 213
4 votes
1 answer
428 views

I want to use Ledger Nano S to deploy the contract, but not working

I wanted to deploy the contract with the Ledger Nano S wallet, but not working on truffle. I installed npm package 'truffle-ledger-provider' and followed the practice. But I got an error ...
Jung Chun's user avatar
  • 191
4 votes
3 answers
1k views

How to deploy contract with bytecode from etherscan?

For example, I want to deploy a contract to my local testnet. But I only have its opcode from etherscan. How to deploy the contract with just those runtime bytecode?
user avatar
4 votes
1 answer
1k 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 ...
Michael O'Rourke's user avatar
4 votes
0 answers
818 views

Truffle migrate Error Invalid number of arguments to Solidity function

Truffle 4.0.1 I've got a contract declared "is Pausable" (OpenZeppelin framework) and I want to pause it as part of the deployment logic. I'm getting an error, however, when invoking pause() Error: ...
sofend's user avatar
  • 241
4 votes
3 answers
3k 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 ...
Etherhacker's user avatar
4 votes
3 answers
1k views

Importing a contract from another contract in NodeJS app

I'm using a function in my NodeJS app to deploy contracts. The user inputs the contract he wishes to deploy and the app deploys it. The structure of the app is . ├── app │   ├── models │   │   └── ...
mcansado's user avatar
  • 841
4 votes
0 answers
369 views

Storing a truffle contract interface in version control

What I'm doing When I compile and deploy a contract using Truffle, I get a .json build artifact that contains information about where the contract is deployed on the network (its address). So far I ...
Travis Jacobs's user avatar
4 votes
1 answer
152 views

How to work with inherited contracts in EthereumJ?

In EthereumJ, I have two contracts i deployed them individually,first one was deployed but for the second i got error as in that i was calling function of first one and example i have second is first ,...
Gagan's user avatar
  • 41
4 votes
1 answer
1k views

How deploy a smart contract with meteor and metamask?

I will deploy a smart contract with meteor and matamask. My code in main.js : var inactivityTime = 1000; var continuityContract = web3.eth.contract(Continuity.abi); var continuity = ...
n1c01a5's user avatar
  • 294
3 votes
0 answers
487 views

How to deploy smart contract with raw transaction

I want to deploy transaction with raw transaction without using hardhat or web3 method. my code looks like this. // constructor params const name = 'My Contract'; const symbol = 'MC'; const maxSupply =...
rrrrssss's user avatar
3 votes
0 answers
371 views

Embedded vs linked libraries

I recently became aware of linked vs embedded libraries. My understanding is that if your library uses public pure functions and/or manages storage, then you need to deploy and link the library to ...
Nolan Jannotta's user avatar
3 votes
1 answer
354 views

Error: exceeds block gas limit / transaction underpriced

When I call the function .send({ from: accounts[0], gas: "5000000000" }); and attempt to deploy my contract, I get an :Error: exceeds block gas limit." When I switch to a much lower ...
Louis L's user avatar
  • 31
3 votes
1 answer
3k views

How to send correct SwapExactEthForTokens params types on ethers/web3.js?

I need to know how to send correct paramaters / paramater types as in what does the parameter type has to be is it a hex number , a string ? help would be massively appreciated. Notes: 1)i cant set ...
Aaron Klich's user avatar
3 votes
1 answer
113 views

how do I know that NFT is from the right person

I understand the NFT (at least solidity part).. There's something that's bugging me though. Let's say someone made a super great cat(cat1), published it to ipfs, then called the ERC721 contract and ...
Nika Kurashvili's user avatar
3 votes
0 answers
993 views

Timeout while attempting to connect and deploy in the Ropsten network

I am trying to deploy the contract in Ropsten network. It fails with the timeout error The same is deployed in Ganache without any issues. Please advice truffle-config.js require('dotenv').config(); ...
iappmaker's user avatar
  • 813
3 votes
2 answers
1k 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 ...
Philip Rutovitz's user avatar
3 votes
0 answers
462 views

Why two contracts got same address?

I've been testing payments for shopping cart on a private chain. I create and deploy contracts to disburse payments among sellers. So if a shopper buys same items again the contracts for two carts ...
user43623's user avatar
3 votes
1 answer
496 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 ...
user46230's user avatar
3 votes
2 answers
3k 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 ...
John Murphy's user avatar
3 votes
0 answers
644 views

Truffle contract migration deploying same contract on multiple address

I deployed multiple contracts of which some are linked to one another using truffle migration on the testrpc . In my web3 call for a function of one of the contract, instead of returning the current ...
M.Gupta's user avatar
  • 31
3 votes
1 answer
592 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 ...
Gleichmut's user avatar
  • 472
3 votes
0 answers
173 views

Smart contracts and ICO questions

I am trying to learn and understand how ICOs and the smart contracts used in them work and I am having a hard time understanding the following: Take for example ParagoinCoin, you can see here that it ...
Julien's user avatar
  • 246
3 votes
0 answers
88 views

Deploy contract from external address

All the contract deployment tutorials I have seen instruct me to deploy the via my eth.accounts[0] or some other address belonging to my nodes account list. The code in the last step generally is (don'...
Shabahat M. Ayubi's user avatar
3 votes
0 answers
391 views

Account and/or Balance not found in Geth for Smart Contract Deployment

Error 'Error: Account does not exist or account balance too low' Overview I'm trying to deploy the greeter smart contract in the ethereum.org/greeter tutorial. I downloaded/validated the ...
William Capozzoli's user avatar
3 votes
0 answers
119 views

Wallet on private chain not watching contracts?

I set up an ethereum private chain for testing smart contracts a while back. Recently, I've been unable to deploy and interact with contracts successfully. Here is what used to work: 1) I created a ...
JamesEverette's user avatar
2 votes
0 answers
39 views

I can't deploy contract on eth mainnet

I have deployed this code on many different chains with success except for ETH mainnet and Sepolia. return error: Transaction mined but execution failed https://github.com/lamxoan92/ct/blob/main/a.sol
Nguyễn Lâm's user avatar
2 votes
0 answers
189 views

Gas costs for contract deployment

Whenever I deploy a contract on Sepolia, there is an additional gas cost I haven't quite figured out. The flow as I understand is: 21,000 gas (base) 32,000 gas (contract creation) 4*(zero-value bytes ...
Peter's user avatar
  • 166
2 votes
0 answers
130 views

Best practices for Hardhat deployment script?

As a newcomer in Solidity, I am trying to understand and create a deploy script that I will use for deploying my contracts. Stack: Ether.js + hardhat + javascript Here is the code that I came up with: ...
CC_Zio's user avatar
  • 27
2 votes
1 answer
56 views

unable to verify etherscan contract may be due to high optimize runs

I have used high optimize runs as 999999999 while deploying contract.. I need to verify contract on etherscan but it has range from 0-1000000 .. what should i do?
Abhishek Bengani's user avatar
2 votes
0 answers
333 views

How to deploy a contract with linked libraries and a different version in `foundry test`

I need to deploy a contract with an incompatible version number to my test script. The natural solution is to use deployCode, however, this contract also requires certain libraries. The following ...
Peteris's user avatar
  • 1,005
2 votes
1 answer
594 views

Deploy smart contract with metamask ethers.js and ganache

I want to deploy smart contracts on front-end with metamask address as deployer. To do that, I first compile the smart contract with Remix and put the json output on my React project (I use Ganache to ...
Silta's user avatar
  • 31
2 votes
0 answers
64 views

solidity - supportsInterface with ERC165 in the abstract contract

I have an abstract contract. abstract contract Test is ERC165 { function great1() public { } function great2() public { } function supportsInterface(bytes4 interfaceId) public ...
Giorgi Lagidze's user avatar
2 votes
2 answers
260 views

Disable contract bytecode size warning in remix

Remix warns me by highlighting the whole contract in Orange that i have exceeded the maximum contract size of 24KB. I am developing a contract for a private network which does not impose this limit, ...
CathalMF's user avatar
  • 253
2 votes
0 answers
22 views

deployment cost different in solidity

contract A { function b_1Y() public pure returns (uint) { return 1; } } contract B { function b_1X() public pure returns (uint) { return 1; } } Deployment cost of A is much ...
Nika Kurashvili's user avatar
2 votes
1 answer
1k views

Error: call revert exception

I keep getting this unhandled runtime error with my code:- " Unhandled Runtime Error Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="...
Muskaan Sharma's user avatar
2 votes
1 answer
547 views

"contract x" ran out of gas. Something in the constructor (ex: infinite loop) caused gas estimation to fail ganache

i'm trying to deploy contracts on private network ganache using ganache application. but it threw an error because of its big size: "contract x" ran out of gas. Something in the constructor (...
Seif Khédija's user avatar
2 votes
0 answers
636 views

Can one still bypass EIP-155 and deploy to the same chain-independent address from an EOA

I was trying to deploy a contract to a deterministic address using Nicks method. This works fine on Rinkeby and all the Ethereum-Testnets that I tried. However, it doesn't work on Mumbai and probably ...
Marlo's user avatar
  • 297
2 votes
0 answers
342 views

Solidity Error: TypeError: contract.detectNetwork is not a function

When trying to run 'truffle migrate --reset' everything works and it seems that the contract deploys, however I get the error 'TypeError: contract.detectNetwork is not a function'. I have no idea what ...
CryptoSteez's user avatar
2 votes
1 answer
327 views

How to make a web page button that invokes MetaMask to mint an NFT to Ethereum mainnet?

What programming languages background is required to publish a web page that has a button on it, which when pressed, invokes MetaMask for the user to publish an ERC-721 token to Ethereum mainnet? ...
user610620's user avatar
  • 1,486
2 votes
0 answers
216 views

Accessing a public mapping from a deployed Ethereum Contract

I'm trying to get my Contract to interface with the already-deployed CryptoPunksMarket Contract, seen here: https://etherscan.io/address/0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb#code Specifically, I ...
Mark55's user avatar
  • 979
2 votes
0 answers
231 views

Deploying Migrations.sol file in mainnet

I've seen some tutorials about deploying a smart contract to mainnet using Truffle. In those tutorials they are also deploying Migrations.sol contract to mainnet. What is the purpose of doing that? I ...
Batın Evirgen's user avatar
2 votes
0 answers
569 views

Smart contract size limit

Need your help/suggestion for below question Question: Smart contract size limit My application size for Smart (contracts folder with .sol file) is around 140 KB It is structured as below, with each ...
Shailendra Omkar's user avatar

1
2 3 4 5
11