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
1
vote
1answer
438 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 ...
8
votes
4answers
2k views

Adding Wallet using web3.eth.accounts.wallet.add

On web3 0.20.1, I am using Infura to deploy a contract to Rinkeby. This probably requires me to add a wallet to web3.accounts to provide the gas needed. When I ran the following nodejs code, Web3 = ...
1
vote
1answer
15 views

cannot get state variable of a contract deployed from a factory contract in truffle

Hello I have 2 smart contracts - Children Factory and Child: pragma solidity 0.8.6; import "./Child.sol"; contract ChildrenFactory { Child[] public children; address[] ...
0
votes
0answers
12 views

How to call selfdestruct in my other contract on the same tx I deploy my new contract with Truffle?

Title says it all. I have a contract already deployed on the blockchain. Unfortunately I need to do some changes to it so will need to re-deploy it, and the previous one will become useless. I'd like ...
0
votes
2answers
325 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: ...
1
vote
1answer
242 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: ...
1
vote
2answers
25 views

Using solc to compile contract that imports local OpenZeppelin contracts

I am trying to compile and deploy a contract based on OpenZeppelin using Node.js app.get("/", (req, res) => { const input = fs.readFileSync("./BaseContract.sol", "utf8&...
0
votes
1answer
11 views

Ethers js deploy contract with balance, payable constructor

I have a smart contract with a payable constructor. I'm trying to figure out the syntax with ethers js how I can deploy the smart contract and send an initial balance with the deployment. const ...
2
votes
1answer
83 views

how do we use `commit/reveal` to count votes?

Let's say we are doing an election and it's easy to note that we need commit/reveal scheme to hide votes. So, we store hashes while users commit their votes. Now, let's say the election is over. How ...
1
vote
1answer
2k views

Deploying contract using byteCode

In that example you can see, how to deploy a new contract having just ABI and ByteCode (uses for copy and deploy contracts from mainnet to your testnet for example). /****** Deploying new contract ...
0
votes
1answer
40 views

Fork uniswap including interfcae

I am trying to fork uniswap. I have successfully deployed uniswap-core and uniswap-periphery on my local machine (ganache).For this, I could get many tutorials and articles. But could not find a ...
0
votes
1answer
336 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 ...
2
votes
1answer
293 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 ...
0
votes
0answers
11 views

tx.wait() never resolves using ethers library

I am using ethers library in my nodejs , and trying to call a function in smartcontract which looks like: const tx = await router.swapETHForExactTokens( amountOut, [bnb,...
0
votes
1answer
16 views

The second contract is not getting deployed in migration

const Input = artifacts.require("Input"); const Register = artifacts.require("Register"); module.exports = function (deployer) { deployer.deploy(Input, "test_name") ....
0
votes
1answer
96 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 ...
0
votes
0answers
25 views

Uniswap v2 running out of gas when deploying the Factory on ganache

I am trying to deploy the Uniswap v2 Factory contract on my ganache test network. I have compiled these contracts with my own compiler. But everything I attempt to deploy the Factory, I receive this ...
2
votes
1answer
234 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: { ...
0
votes
0answers
8 views

Option for Supply

I tried copy and pasting this one on remix then deployed it on the test net but unfortunately im not getting any info about the supply. Here's the link of the contract. https://pastebin.com/raw/...
0
votes
1answer
80 views

JSON-RPC Error - Exection Reverted (-32000) / Empty ABI

I am attempting to deploy a BEP20 contract on BSC testnet via Remix. I am using compiler v6.12 and am successfully compiling my Solidity. However, when I deploy the contract, I am receiving the ...
1
vote
3answers
1k views

Quorum - oversized data during contract creation - contract code size limit

While creating contract, I am getting the error "oversized data" during contract creation. Other than modifying the go-ethereum code file to increase the maxCodeSize, or splitting the contracts up, ...
1
vote
1answer
160 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
897 views

HELP I want a REFUND for my ethereum that has been sent [duplicate]

Yesterday I sent token and made a contract with Live edu ICO from MEW with an amount of 16.35+ ETH, the transaction status is success but the tokens was not shown in ICO due to the finished ...
0
votes
1answer
18 views

etherscan verification for newly deployed contracts

from my UI, I call a contract function through ethers.js that deploys a new contract. It's like user comes to the UI, clicks a button that calls a contract function and then, that contract function ...
0
votes
1answer
21 views

How to deploy a new version of a smart contract to a testnet?

So I have deployed a contract to the Rinkeby testnet but I have added some new features to it and I've tried deploying the contract again but it just says the following: √ Fetching solc version list ...
0
votes
0answers
26 views

How to call functions from a deployed NFT Contract in Solidity?

I already did a lot of researches to solve this problem. I want to call deployed NFT Contracts functions, for example this contract: https://etherscan.io/token/...
0
votes
1answer
27 views

Can you reserve your token name and symbol before releasing to mainnet?

Is it possible to list our token to reserve the name and symbol before our contracts are released on mainnet?
0
votes
1answer
44 views

Error! Invalid constructor arguments provided. Please verify that they are in ABI-encoded format

Update: so these 2 lines in my code seem to be causing the problem and removing them got everything to work but I still need to include them so if someone can figure out why they are breaking that ...
2
votes
1answer
311 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 ...
0
votes
0answers
18 views

Is it safe to publish to IPFS when deploying in Remix?

Could hackers use the metadata? Should I redeploy the contract? Since smart contracts cannot be changed it seems like a bad idea to let people see the source code/meta data despite mine being imported ...
1
vote
1answer
30 views

Brownie cannot locate deploy.py script

I have python installed on my system (Windows) with Anaconda from a prior course I had taken which may be the root cause of the issue. I'm at the stage where I need to run a deploy.py script to deploy ...
0
votes
1answer
100 views

How to connect to a peer in ethereum and then run contract on ethereum?

I have developed a smart contract and run it with remix in cases of javascript vm and web3 provider. Now, I want to run it such that my computer to be connected to real ethereum network. I think in ...
0
votes
1answer
116 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 "...
0
votes
0answers
19 views

Any way to revert setMaxTxPercent to original?

I deployed a token using cointool. Wanted to change the maxTxAmount - tried to do it from bscscan (write contract) instead of through cointool admin. I mistakenly thought setMaxTxPercent in the 'write ...
0
votes
1answer
21 views

Truffle compiler version not changing

truffle.js: var HDWalletProvider = require("truffle-hdwallet-provider"); var mnemonic = ""; module.exports = { networks: { testnet: { provider: () => new ...
1
vote
1answer
96 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 ...
2
votes
2answers
477 views

Updating Smart Contract in Quorum with no change to the smart contract address

Understand that a smart contract address is deterministically computed from the address of its creator and how many transactions the creator has sent and thus every new smart contract deployment will ...
0
votes
0answers
15 views

Not getting any output after deploying contract in rinkeby through web3.js. But in localhost using ganache-ui getting all the outputs

this is my contract - pragma solidity ^0.5.17; contract Lottery { address public manager; address payable[] public players; constructor () public { manager = msg.sender; } function enter() ...
0
votes
1answer
100 views

Is it possible to modify privateFor addreses in a private Smart Contract (Quorum)?

I know how a private smart contract works providing a list of accepted addreses to privateFor property, but what if I want to disable (or enable) any address visibility? Should I deploy a new Smart ...
0
votes
0answers
107 views

Not being able to retrieve the contract deployer's address

I want to retrieve the getManager address, which essentially deploys the contract. It works fine on remix but is not showing up on my localhost. // import logo from './logo.svg'; import './App.css'; ...
0
votes
2answers
3k views

Cannot read property 'deployed' of undefined issue

I am trying to launch an Election-Dapp. I have these dependencies installed: - Nodejs v9.11.1 - npm v5.8.0 - Truffle v4.1.3 - web3js v0.2 - ganache-cli Below is my solidity contract pragma ...
0
votes
1answer
15 views

Having trouble converting json to abi encoding

I'm trying to convert the following json to abi code using https://abi.hashex.org/ [ { "inputs": [ { "internalType": "string", "...
0
votes
1answer
192 views

getting error solidity-member-transfer-not-found-or-not-visible-after-argument-dependent

I am trying to create one contract for Lottary app however I am getting error as " browser/test.sol:103:9: TypeError: Member "transfer" not found or not visible after argument-dependent lookup in ...
0
votes
0answers
36 views

How to Verify smart contracts deployed on polygon scan?

we have deployed solidity contract to polygonscan, but for some reason, the smart contracts with imports cannot be verified. Has anyone else experienced this?
0
votes
0answers
12 views

Error in construtor when deploying: ERC20 approve method

I have this code in my constructor, which is raising an error on deployment: constructor(){ owner = msg.sender; wETH.approve(msg.sender, type(uint256).max); //Approve the owner to transfer ...
0
votes
1answer
50 views

Deploy address error Remix Solidity contract flashloan

I'm learning Solidity. Trying to implement this contract: Flashloaner.sol pragma solidity =0.6.6; import './UniswapV2Library.sol'; import './interfaces/IUniswapV2Router02.sol'; import './interfaces/...
1
vote
0answers
31 views

How much does it cost to deploy a smart contract on Etherum mainnet?

I've just completed building my first smart contract in Solidity and I am ready to deploy to the public. I want to deploy to mainnet but I'm being told that I don't have enough funds to deploy. On the ...
2
votes
2answers
735 views

How can I trigger a quorum private smart contract deployment from my js client app?

My question follows directly this answer to a similar question. I need for my client app users to be able to trigger private contract deployment. I've tried using privateFor with both the web3 and ...
0
votes
0answers
28 views

Truffle compiler version error

I keep getting an error that my truffle is currently running version 0.5.16. Error: Truffle is currently using solc 0.5.16, but one or more of your contracts specify "pragma solidity >=0.8.4&...
0
votes
1answer
26 views

Can you directly port ETH mainnet contract to BSC?

Can you directly port ETH mainnet contract to BSC ? Also, does Infura work with BSC ? Does Web3 work with BSC ?

1
2 3 4 5
26