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
0 votes
1 answer
8 views

"yarn hardhat run scripts/propose.ts --network localhost" - Console.log not working?

Can anyone spot some an issue that may be preventing my console.log to work in this file i have created in my script folder? What i am doing is first opening terminal #1, and running npx hardhat node. ...
user avatar
0 votes
2 answers
15 views

Contract Deployment "not enough funds for gas" Arbitrum

I am trying to deploy a contract using the following code: const Contract = await ethers.getContractFactory("Contract", { libraries: { UtilsLibrary: "0xF...e", } });...
user avatar
0 votes
1 answer
15 views

Unable to deploy smartcontract using web3j and Rinkbey infura

I'm trying to deploy a smartcontract on Rinkbey. I've followed the official documentation and some tutorials. I implemented the following code in my android studio but contract.deploy returns nothing. ...
user avatar
0 votes
0 answers
6 views

Deploying to mainnet with 'hardhat test' opposed to 'hardhat run' -- is there a downside?

Both hardhat run + hardhat test deploys to the chain. I have a few blindspots and don't know how the optimizer works. Is there a downside to deploying to mainnet with hardhat test?
user avatar
  • 166
0 votes
0 answers
7 views

Getting error while deploying VRFCooridnatorV2Mock

this is deploy script for mock const{getNamedAccounts, deployments, network, ethers}=require("hardhat"); const baseFee=ethers.utils.parseEther("0.25"); const gasFee= 1e9; module....
user avatar
0 votes
0 answers
5 views

Contract Deployment Stops without any error - Nethereum

I'm trying to deploy and interact with the smart contract using Nethereum. But code execution stops at below line, without any error. var transactionReceipt = await deploymentHandler....
user avatar
  • 341
2 votes
1 answer
56 views

Convert EOA to contract account

EIP-2026 mentions several ways of creating a new account. One way is by: (...) converting a non-countract account into a contract account (...) Is this a hypothetical scenario or could this be done ...
user avatar
  • 452
0 votes
1 answer
16 views

Ethereum smart contract size limit? Official docs and accepted SE answers seem to me to contradict eachother

The first thing I read when Googling the question is this - https://ethereum.org/en/developers/docs/smart-contracts/ - says there is a 24KB limit. But, on reading a couple answers, such as here - A ...
user avatar
  • 115
1 vote
1 answer
17 views

hardhat deploy with specific account

I am trying to find out is it possible to set specific account from which to deploy contract in hardhat. Does hardhat supports this by default or I need to include some other package.
user avatar
  • 11
0 votes
1 answer
14 views

i have been trying to deploy mocks for my hardhat-raffle , but i encountered this problem

const { network, ethers } = require("hardhat") const {developmentChains} =require('../helper-hardhat-config') const BASE_FEE=ethers.utils.parseEther("0.25") // 0.25 is the premium ...
user avatar
0 votes
0 answers
5 views

Getting a "TypeError: this.interface.encodeDeploy is not a function" error when trying to deploy contract with ethers.js/metamask in browser

I'm attempting to deploy a contract with ethers.js in browser. The code is as follows const provider = new ethers.providers.Web3Provider(window.ethereum); await provider.send('eth_requestAccounts', [])...
user avatar
  • 1
0 votes
0 answers
22 views

TypeError: helloWorld.helloWorld is not a function

Hi I created pretty simple contract - // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; contract HelloWorld { function helloWorld () public view returns (string memory) { return &...
user avatar
0 votes
0 answers
30 views

Huff deployer deployed more than one contract with foundry script

I have a foundry solidity script for deploying my huff code. function run() external { vm.startBroadcast(); MyContract( HuffDeployer .config() ...
user avatar
0 votes
1 answer
27 views

Mint _msgSender() on contract on deployment

I'm starting up with solidity and I'm deploying my smart contracts using web3 with the following function: deployContract(args) { var web3 = <MY-WEB3-PROVIDER>; var privateKey = <...
user avatar
  • 103
0 votes
1 answer
45 views

Getting the address of a contract before its deployed with brownie

While working with the lens protocol contracts I saw that they were able to precompute the address of a contract using hardhat with the following code import { hexlify, keccak256, RLP } from 'ethers/...
user avatar
0 votes
1 answer
19 views

How to listen to events to sort an array

I read this article on sorting an array off-chain using event listeners, but my array doesn't appear to be sorted in time when the array is called in typescript. This is my contract: pragma solidity 0....
user avatar
0 votes
1 answer
23 views

What determines when etherscan will automatically verify a contract?

As I understand it, etherscan will look at the bytecode and automatically verify contracts similar to ones its seen before. My question is, how does it make this decision? Does it verify only ...
user avatar
  • 27
0 votes
2 answers
30 views

Question about REMIX Deployments Environments

I'm currently learning to code with Solitidy. In the video I'm watching, in the first example, the contract was deployed using JavaScript VM environment, but I don't have that one. My options are: ...
user avatar
2 votes
1 answer
141 views

How did the contract size grow after removing couple of lines?

This is surely not a general case, but a specific one. I have a large smart contract (22.572 KB) and I am trying to make it smaller. Here is a chunk of the contract: modifier onlyValidTokenId(...
user avatar
0 votes
2 answers
22 views

initial transaction reverted, but cannot rebroadcast due to error: Transaction with the same hash was already imported

I'm trying to deploy my project to Kovan and the initial deployment tx reverted, but any attempt to deploy again is stopped by this error. Shouldn't the fact that my initial tx failed remove it from ...
user avatar
0 votes
1 answer
56 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 (...
user avatar
0 votes
1 answer
16 views

Receiving an error for invalid number of arguments from Hardhat contract deployment?

Receiving this error from Hardhat's logger when attempting to deploy an ETH smart contract using Hardhat locally. I'm attempting to run two different contracts through Hardhat's deploy.js script. ...
user avatar
0 votes
0 answers
17 views

usr/local/lib/node_modules/truffle/build/4889.bundled.js:21755 throw new Error("Could not find artifacts for " + import_path + " from any sources"); ^

I'm trying to run https://github.com/dappuniversity/governance However I keep running into this issue when I deploy the contracts I'm running everything out the box without making any changes at all ~...
user avatar
  • 1
0 votes
1 answer
37 views

The constructor of function 01-deploy-fund-me.js expect 1 argument but got 42

I am at moment 10:59:00 in the tutorial https://www.youtube.com/watch?v=gyMwXuJrbJQ&list=PLMippBqdcHKavY7WqPnoWbRgkgjn0dq9v&index=27&t=297s&ab_channel=freeCodeCamp.org, I try tu run: ...
user avatar
  • 1
0 votes
1 answer
19 views

How does one deploy Gnosis safe on a custom subnet EVM

I am currently creating documentation for my organization regarding deploying a gnosis-safe on a custom EVM. I'm having difficulty with interacting with the safe once it's deployed and would like some ...
user avatar
  • 1
1 vote
2 answers
25 views

Why do smart contracts have to be deterministic?

I was wondering why smart contracts have to be deterministic. As I understand it, to deploy a smart contract you just send it as the payload of a transaction without specifying a recipient. It's then ...
user avatar
  • 27
1 vote
2 answers
25 views

How do I check contract deployment status?

If I send the transaction to create a contract and don't want to wait around for it to be deployed, how can I later check to see if it's deployed, given that the contract address is provided only once ...
user avatar
  • 115
0 votes
0 answers
14 views

Create2 gives different addresses on different networks

I'm trying to deploy a contract on two networks with the create2 method. I'm using same arguments in Goerli and Rinkeby, however I'm still getting two different addresses for the same contract. Here ...
user avatar
  • 111
0 votes
2 answers
31 views

How are there contracts on mainnet that exceed contract size limit?

As far as I know, there is a contract size limit on mainnet of 24577 bytes. But I can see contracts with larger deployed bytecode, e.g., https://etherscan.io/address/...
user avatar
0 votes
1 answer
109 views

Polygon Mumbai - transaction pending infinetly when interacting with contract

I am trying to implement a ERC721 NFT smart contract at polygon mumbai network. First of all, contract code is here: https://github.com/Lorenzobattistela/melk-smart-contract When I first deployed with ...
user avatar
0 votes
1 answer
13 views

Injected remix is using metamask's private key?

When I want to deploy smart contract by hardhat i need to put the private key ,is there any way to deploy smart contract like remix do in injectedweb3 (without using private key )? how remix can ...
user avatar
0 votes
0 answers
35 views

Hardhat, creating complex task

I want to write a task responsible for taking some parameters(taskArgs), creating some structs according to these parameters (these structs objects are the parameters for my contract that i want to ...
user avatar
0 votes
0 answers
16 views

How do my contracts in one .sol file deploy correctly? And how to verify on etherscan?

Ok so I have multiple contracts in one .sol file. Specifically I have 4 contracts: 2 of them are the "main" contracts and the other 2 are kind of like "helper" contracts inherited ...
user avatar
0 votes
1 answer
26 views

Access deployed contracts on Ganache local blockchain - BrownieEnvironmentError: Functionality not available in local environment

Using a generic SimpleStorage.sol contract and a deploy.py I'm able to create a contract on a Ganache local blockchain and access it during execution. On brownie console is possible to do the same ...
user avatar
1 vote
0 answers
23 views

Contract verification. How can I check contract already verified or not (with code)?

I use: await hre.run("verify:verify", { address: CONTRACT.address, constructorArguments: [ARGUMENT] }); but sometimes it returns: Reason: Already Verified I want to ...
user avatar
  • 11
0 votes
0 answers
48 views

ERROR processing when testing the contract - TypeError: Cannot read property 'length' of undefined

I am getting the following error while trying to test a FundMe contract. I am following: Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course by Patrick ...
user avatar
0 votes
0 answers
25 views

Deploy Contract that uses a Library with public functions

I had to split my contract into multiple smaller contracts due to Contract Size Limits. According to ethereum.org tutorials, Using a Library with public functions will reduce your contract size So I ...
user avatar
0 votes
0 answers
24 views

Deploying Smart Contracts with Geth - instance address 'undefined'

Preface: I've read quite a few similar issues here but I can't seem to find the solution to this, so I think I must be doing something fundamentally wrong. First of all, I would like to stress that I'...
user avatar
0 votes
1 answer
16 views

Interacting with contracts – automaticly setting an address on deployment

I have 2 contracts that can interact with each other: contract ContractFoo { address private _contractBarAddress; constructor() { } function setContractBarAddress(address _address) public ...
user avatar
  • 101
2 votes
1 answer
114 views

Upgradeable proxy contracts- Seperating logic, functionality, & storage contracts. Examples? Resources?

I understand one of the best ways to make your contracts upgradeable is to separate into 3 separate contracts and send via delegate call from the proxy to the functional contract. The design is ...
user avatar
0 votes
1 answer
28 views

Is A New Instance of an Already Verified Contract Considered Already Verified

While testing some deployment and verification scripts, we deployed a smart contract and verified it on testnet etherscan. Then redeployed the smart contract again and tried to verify the new contract ...
user avatar
0 votes
0 answers
20 views

why would I need to call `ens.resolver()` on chain?

I was reading the following link and somehow, the question popped up in my head. It suggests that - transforming from string name to bytes32 _node should happen off-chain. Let's just assume that this ...
user avatar
0 votes
1 answer
114 views

Error HH8 Invalid account: #0 for network: bsctest - Expected string, received undefined

i'm following this tutorial https://github.com/KelvinThai/PancakeSwapFork/commit/39aa3a21aea481a17ee0da6160054ada2bba6f71?diff=unified#diff-...
user avatar
0 votes
0 answers
14 views

UUPS Upgradeable Smart Contracts - How to Fund Them with Ether Upon Initialization

When I deploy a non-upgradeable contract, I fund it with Ether in this manner: const MyContractFactory = await ethers.getContractFactory("MyContract"); const myContract = <MyContract>...
user avatar
1 vote
2 answers
33 views

Smart contract is not available on the blockchain during the constructor call

I have the following sample code: // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/ERC20....
user avatar
0 votes
1 answer
96 views

Downsides of using ERC721A over ERC721?

At our project we're still contemplating wether to ERC721A over ERC721Enumerable. It's important for us to have stability. So has ERC721A proven so far that it's stable? I'm looking forward to answers ...
user avatar
  • 101
0 votes
0 answers
15 views

Can I leave a gap between token indexes?

I am writing an ERC721 smart contract for minting a collection of 10000 NFTs + 100 reserved for the owner. However I was wondering if it could be done by reserving token ID's 0-99, which can be minted ...
user avatar
  • 101
0 votes
1 answer
79 views

New contract deployment pattern (0x60c06040)?

I've been monitoring new contract deployments simply by looking for leading 0x60806040 pattern in a transaction's data field (example). However, I've noticed there is a similar pattern that is less ...
user avatar
  • 115
0 votes
1 answer
13 views

Mınt Gas Fee Problem

We have started the Mint sale of our new collection on Ethereum, but we cannot solve the gas fee problem. There is an unbelievably high gas fee. What should we do? Did we do something wrong in the ...
user avatar
0 votes
1 answer
17 views

How to find error from the return of function call?

The code is based on ethers.js. meBid is a function in a contract which places bid for user. Here is the function declaration in contract: function meBid(address _bidItemAddress) external noBidder ...
user avatar

1
2 3 4 5
31