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

Understanding TokenCreator/OwnedToken example from Solidity documentation

Here's the page containing the example https://solidity.readthedocs.io Here are two contracts that are supposed to work together(my questions are below): Here's how I think it works. Please correct ...
0
votes
1answer
23 views

Big discrepancy between the cost of deploying to the test net and the main net

I have a simple 100-line contract with 6 functions that I want to deploy to the main net. When I deploy it to the Rinkeby test net through Truffle, I get the following result: Summary ======= > ...
0
votes
1answer
191 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 ...
0
votes
1answer
7 views

“Uncaught ReferenceError: TodoList is not defined” as I tried to call Todolist.deployed() in truffle console

I was trying this Beginner tutorial on smart contracts and solidity. I typed truffle compile, truffle migrate and they ran without any error and I got my gas cost used up in Ganache. When I opened ...
4
votes
1answer
526 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 ...
0
votes
0answers
9 views

Failing to deploy complied contract

This contract is straight from the solidity docs. But am failing to deploy this: // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; contract Owned { constructor() { owner = ...
5
votes
1answer
153 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
0answers
12 views

Deploy a contract (factory) with web3 based on the connected wallet?

A big newbie into solidity here. I’ve managed to compile and deploy (with truffle) a ContractFactory from OpenSea repository. Long story short the part with the deployment is this if (...
0
votes
1answer
16 views

Problem with smart contract's constructor instantiating another smart contract

I have the following two smart contracts in the same ".sol" file: Credentials and Proposals. Every Proposals smart contract should refer to a single Credentials smart contract, in order to ...
0
votes
0answers
9 views

How would I create a function where 3% of transactions gets sent to an address I assign?

I am creating an erc20 token that will serve as the currency between online communities, and I want to have an ethereum address that accumulates a 3% fee from all the transactions.
1
vote
1answer
606 views

web3.eth.getAccounts() : Cannot read property 'map' of undefined

const HDWalletProvider = require('truffle-hdwallet-provider'); const Web3 = require('web3'); const provider = new HDWalletProvider( 'passphrase', 'rinkeby.infura.io/v3/mytoken' ); const web3 = new ...
0
votes
1answer
24 views

Do I need a wallet to deploy a smart contract into Ethereum network?

I am new to Ethereum world and I would like to know if developers who desire to deploy their smart contract in the Ethereum mainnet or testnet, need to create previously a digital wallet with real or ...
0
votes
2answers
54 views

Token Contract Verified and Signed on Mainnet Does Not Show MINT Function

The Token Contract Address https://etherscan.io/address/0xa2e7a0d1cfeda4d3977277265e205f6092d02e3b was successfully tested on Ropsten (See Ropsten Contract Address ...
0
votes
1answer
135 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
54 views

Reflect Base contract's update in another contract

I have wanted to know what concept is it called when we want two contracts which are deployed on the Network, reflect the transaction and updates in another contract. for example: contract Base{ ...
0
votes
1answer
18 views

Build with multiple solc versions?

My tokens and basic setup scripts are built in solidity 0.8.0 and I just downloaded GSN with OpenZeppelin because I need a platform which will fund users' few things. Now I can't compile because it ...
0
votes
1answer
55 views

Cannot Deploy to Rinkeby using Truffle, Infura, and Node

I am trying to deploy a contract to Rinkeby using Node and Truffle but I get a lengthy error: Truncated Error: Attempting to deploy from account 'MYACCOUNT#' [object Object] [object Object]...
4
votes
3answers
349 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 ...
15
votes
3answers
6k views

How to pass constructor parameters to a contract using Truffle?

I am using testrpc and truffle for deploying contracts.I want to pass constructor parameters while deploying. contract User { string public userName; function User(string ...
1
vote
0answers
11 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 ...
0
votes
0answers
23 views

How do I deploy a BEP20 token on Brownie Eth? [closed]

I've created my BEP 20 token and I want to deploy it. I understand that you can deploy it using remix.ethereum.org but I want to use brownie eth to deploy it? I can't find any docs or tutorials to ...
2
votes
2answers
111 views

Hardhat - How to interact with a deployed contract?

I can deploy a contract using ethers and Hardhat with the following: const myContract = await hre.ethers.getContractFactory("SomeContract"); const deployedContract = await myContract.deploy()...
0
votes
1answer
15 views

What needed for the deployment and approvement of smart contract creation transaction?

I attach the following image. Once a user creates a digital wallet (for example in MetaMask), then they receive a private key and a public address of their account as outputs. Then, after having ...
1
vote
2answers
34 views

What's the possible errors (or warnings) that a developer can face when deploys a smart contract into the Ethereum network?

it's my first post here. I would like to ask, what's the possible errors that a developer can face while trying to deploying their smart contract into the Ethereum network. For example, can it be &...
0
votes
2answers
279 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
0answers
17 views

How to deploy a new Smart Contract from an existing contract?

I'm trying to develop an Smart Contract that programatically creates/deploy new ERC20 Contracts, when an user call a function. I need to know the new deployed contract's address to return it to the ...
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{ ...
0
votes
1answer
17 views

Does this Smartcontract work?

I have a contract, it only shows data on etherscan only "0x". I want to ask if it still works or not? and can interact with that contract? . contract is only 1 tx is to create smart contract
1
vote
1answer
214 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
1answer
19 views

Assigning addresses while publishing contract in Solidity

I was recently viewing a DApp on GitHub. The following is a part of .sol address contractOwner; address withdrawWallet; function contractName(address _contractOwner, address ...
2
votes
1answer
281 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
209 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: { ...
2
votes
1answer
35 views

How to deploy a contract with Rust?

I'm using Rust with crate web3 0.15.0. (Is there a better library to use?) My goal is to deploy contracts and call functions in them using programs I've written in Rust. I have two simple functions, ...
1
vote
1answer
112 views

Hardhat: Error: unresolved libraries, but why?

I'm attempting to deploy a contract using Hardhat (via scaffold-eth), but am getting the following error: Error: Factory contains unresolved libraries. You must deploy and link the following libraries ...
1
vote
1answer
68 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 --...
0
votes
1answer
114 views

Cannot figure out how to set constructors and ABI for a contract

So I've been breaking my head over this for the last 2 days. I cannot seem to figure out how to get the constructors and ABI set up properly. I'm testing smart contracts by copying Sushi contract from ...
3
votes
3answers
74 views

What are the available options (March 2021) for bridging tokens across the chains?

Actual problem in mind I would like to release a token for the Island DAO. I'm worried that ETH gas prices are prohibitively expensive - if I use ETH, the smaller guys will not come. But ETH is the ...
0
votes
1answer
67 views

What happens if someone DOS's my infura api link?

I have an infura link, and put it on my frontend as the default provider url. What happens if someone DOS's that link and uses up the daily api request limit? It's unclear how infura protects against ...
1
vote
1answer
138 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 ...
3
votes
0answers
24 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 ...
1
vote
1answer
53 views

Implementing AMM DEX similar to Uniswap/SushiSwap

I’m new to blockchain development and have been interested in the Uniswap/sushiswap/pancakeswap/etc. projects for some time. I’m trying to build my own project as a learning exercise. I’ve deployed ...
0
votes
1answer
111 views

loadScript returns undefined

I am using Ubuntu 20.04 for creating a private ethereum blockchain using geth. I am required to load the "Simple.abi" script present inside home/contract. But when I give the file-path in the ...
0
votes
1answer
18 views

Opinions on setting variables via constructor vs setter function?

I haven't found any opinions about this online so far, so I'm soliciting opinions here. What are the pros/cons of setting variables in the constructor of a Solidity contract versus having no ...
0
votes
0answers
54 views

Uniswap Router deployment error: “UniswapV2Router02” — Cannot create instance of UniswapV2Router02; no code at address 0xxxxxxxxx

I am trying to fork Uniswap and deploy on Ropsten testnet for educational and testing purposes. From what I gathered, it seems that we need to first deploy the UniswapV2Factory contract, followed by ...
2
votes
2answers
199 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
93 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
92 views

How to test your smart contract against currently existing ones on mainnet locally using Truffle?

Background I am fairly new to smart contracts and am currently experimenting using Ganache and Truffle to test on my local machine. My goal would be to have the smart contract interacting with other ...
1
vote
1answer
21 views

Error while deploying contract to the Ropsten testnet

I'm trying to deploy a contract (called "FilesDetailsManager") to the Ropsten Testnet using Truffle and Infura as provider. But when I type into terminal truffle migrate --network ropsten, I ...

1
2 3 4 5
24