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
2 answers
172 views

Why do I not see CREATE or CREATE2 opcodes in traces of contract creating transactions?

I am trying to see smart contract creations from opcodes in transaction traces with debug_traceTransaction. But traces of transactions that created contracts do not seem to include the CREATE opcode. ...
ruben's user avatar
  • 13
1 vote
2 answers
445 views

What are Solidity Events in Etherscan?

When you go to a deployment contract on Etherscan, which are 0x addresses just like wallets, they have a tab called "Events". What are Events and how come only these deployment contracts ...
user610620's user avatar
  • 1,486
1 vote
1 answer
32 views

delete keyword works wrong way

I have a storage dynamic array. uint[] public x1; It contains 4 elements (1,2,3,4) // Costs 22000 function test() { assembly { sstore(0,0) } } // costs 37000 function test() { delete x1;...
Giorgi Lagidze's user avatar
0 votes
0 answers
155 views

got this error while deploying my contract

please help me what is error in above code... this is my code.and it is exact same code what my course teaher taught. compile.js const path = require('path'); const fs = require('fs'); const ...
shivam kumar's user avatar
0 votes
3 answers
95 views

Why would an upgradeable smart contract or bridge not be preferred?

A hackathon shows preference towards a bridge smart contract that is not upgradeable. Why would developers view this as an advantage when building a protocol or dapp? Wouldn't it sound better to say ...
user610620's user avatar
  • 1,486
4 votes
1 answer
104 views

Clarification on EIP-3607

Are these scenarios possible in the existing EVM based systems: NOTE: I understand that the probability of this happening is very small, but EIP-3607 assumes this probability and tries to reduce the ...
user1395439's user avatar
1 vote
1 answer
1k views

How to pass Object as constructor arguments to a contract when using forge create

Simple deployment command of a contract with two constructor arguments using forge is as follows forge create src/Contract.sol:MyToken --constructor-args "My Token" "MT" But in my ...
Sunny Williams's user avatar
2 votes
2 answers
3k views

Hardhat deploy contract error: Error: cannot estimate gas; transaction may fail or may require manual gas limit

I want to deploy a FlashLoan smart contract using hardhat, and deploy the contract on hardhat network that fork by mainnet. But when I run the deploy script, keep showing Error: cannot estimate gas; ...
YUCHENG LIN's user avatar
0 votes
1 answer
65 views

How to use ERC20 token for a Safe Remote Purchase contract?

I found a smart contract which performs a Safe Remote Purchase. The currency which is used for the payment is ETH. Here is the code: // SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last ...
Federico Gentile's user avatar
0 votes
0 answers
31 views

getVersion not showing

I am following a solidity tutorial and I can seem to make the getVerison bottom on remix to work. In the tutorial it shows the version and in mine, after deployment it does not show anything. maybe ...
DJ Quimoso's user avatar
0 votes
1 answer
229 views

Invalid address error on a call of the contract which has been deployed and mined

I deployed private test network, but at this moment have an issue to call the contract method. Contracts had been successfully deployed on the ```private testnet`` with help of hardhat: npx hardhat ...
Gleichmut's user avatar
  • 472
1 vote
1 answer
325 views

What happens to already deployed smart contracts?

I am new to this..but we can redeploy contract multiple times, only issue will be u will not be able to remove the old contract you deployed..it will still be there. My only concern is where the ...
Anurag Parothia's user avatar
0 votes
1 answer
345 views

how to emit an array of addresses in a solidity event

Good Morning Everyone, I have created a dAPP that sends ether to multiple addresses at once....but I have one issue, I am trying to create an event where all information about the transactions is ...
EniKay's user avatar
  • 3
0 votes
0 answers
86 views

Solidity Error: Error: expected array value

I'm pretty new and learning along the way but I'm getting a Solidity error, no matter what I try I'm getting this error. Not sure what I should to fix. Error: expected array value (argument=null, ...
Frantz M.'s user avatar
1 vote
1 answer
33 views

Interconnected ERC20 and ERC721 contract deployment order

I have custom ERC20 and ERC721 Contract, now my aim is to publish ERC20 token but have a function that only accepts my ERC721 contract address as msg.sender to mint the token and send it to its ...
clarkthompson23's user avatar
1 vote
1 answer
229 views

Compiled smart contract successfully but when I try to deploy it to goerli nothing happens

I'm working on a tutorial project and complied my smart contract successfully but when I try to deploy the contract I get 2 warnings from node and that's t, no error or any message or anything, the ...
Prajwal K's user avatar
0 votes
0 answers
14 views

Deploying an upgradeable contract only deploys 2 contracts and not 3

I have a problem. I've deployed an upgradeable smart contract. As you know it deploys 3 contracts- admin, proxy and implementation. I found out that my private key was compromised and I created a new ...
Stas Simon's user avatar
1 vote
1 answer
149 views

Calling other smart contract onlyOwner question

can someone explain me why can't i call Kill contract from Helper contract if i set modifier and constructor to owner == msg.sender in Kill contract ? When i try to call from Helper its reverting and ...
kapitankot's user avatar
2 votes
4 answers
876 views

How can I create a Factory of TransparentUpgradeableProxy?

I have the following code for a Factory that creates instances of a contract that is Upgradeable. I understand that, in order to achieve this, one of the options I have is to use ...
Falcon Stakepool's user avatar
0 votes
1 answer
131 views

ParserError: Expected

keep getting error message below: from solidity: ParserError: Expected '{' but got 'function' --> contracts/GabeCoin.sol:126:5: | 126 | function mintBatch(address to, uint256[] memory ids, ...
Frantz M.'s user avatar
0 votes
1 answer
20 views

How can we transfer ethereum to contract which is deployed on polygon mainnet

So, suppose i designed a lottery contract which need 2 ethers to participate in lottery. Now because polygon has low gas fee i decided to deploy contract on polygon mainnet. But now im little bit ...
Nitesh Sawant's user avatar
0 votes
1 answer
183 views

Error value out of bounds for callbackgasLimit

i have my simple contract for a lottery system /** * @title Lottery * @notice Enter lottery by paying some amount * @notice pick a random number( verifiably random) * @notice winner be selected ...
kaay's user avatar
  • 7
0 votes
1 answer
41 views

Is it possible to call a function at the time of deployment if it is not in constructor?

This code is from UniswapV2Pair.sol constructor() public { factory = msg.sender; } // called once by the factory at time of deployment function initialize(address _token0, address ...
Yilmaz's user avatar
  • 1,540
0 votes
1 answer
45 views

Blockchain development bootcamp

I'm facing an issue in deploying a smart contract on the blockchain TypeError: Cannot read properties of undefined (reading 'args') at main (/mnt/d/Practice/LEarn/BlockChain/Trading/blockchain-...
Manisha Singh's user avatar
0 votes
1 answer
62 views

Can I set the value of contract address to the value I want?

When I deploy a contract, a contract address is created. At this time, can I set the value of address to the value I want? Additionally, can anyone explain how the contract address is determined?
imelon2's user avatar
  • 455
0 votes
3 answers
4k views

Differences between ethers.getContractFactory( ), new ethers.Contract( ), and new ethers.ContractFactory( ) in ethers library

I have encountered a situation in my script that made me think I don't know the exact use case of the lines below. (1) const sampleContract = await ethers.getContractFactory("Sample") (2) ...
Sina Rahimi's user avatar
0 votes
1 answer
160 views

Deploy upgradable contracts using Remix

How can I deploy a contract that has the initialize method from Remix? I have just seen here that Remix now supports this feature but I haven't found any example I could follow.
Falcon Stakepool's user avatar
0 votes
1 answer
360 views

How to initialize a smart contract using Remix?

I have a contract that has this constructor: constructor(address _nativeTokenWrapper) TokenStore(_nativeTokenWrapper) initializer {} And this initialize function: /// @dev Initiliazes the ...
Falcon Stakepool's user avatar
2 votes
1 answer
602 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
0 votes
2 answers
32 views

Uint Variables Division result in 0 (Point Number)

I am trying to calculate a proportional reward by using the percentage of a wallet balance compared to a token's total supply. uint256 reward = walletBalance / totalSupply * rewardPool However, the ...
noob's user avatar
  • 11
0 votes
3 answers
440 views

How to deploy smart contracts to any arbitrary available address like it was done through a regular transaction on Optimism?

Well, I’m not talking about the mainnet but an ᴇᴠᴍ compatible ʟ2 still using an Ethereum smart‑contract for storing its state : Optimistic Ethereum. A recent contract creation on Optimism seems to ...
user2284570's user avatar
0 votes
1 answer
6 views

How can I get the plugin address of my aragonOSx plugin?

When you deploy your plugin you get the address, so you know your plugin address, but there are no functions on the contracts (that I can see) that matches repo names with addresses. Is the idea that ...
juliette_chevalier's user avatar
0 votes
1 answer
7 views

why do we need the pluginSetup address and the pluginSetupRepo when deploying an aragonOSx plugin?

why do you need to pass both the pluginSetup address and the pluginSetupRepo? the repo contains the latest and previous versions, whats the rationale or im i misunderstanding how those work? they all ...
juliette_chevalier's user avatar
0 votes
1 answer
199 views

Invalid opcode when executing a contract method

I'm currently running a geth node in full mode. Later on, I've succesfully deployed this contract in Ropsten network. > deployed_contract { abi: [{ anonymous: false, inputs: [{...}, {...}...
javierhersan's user avatar
0 votes
1 answer
574 views

Why do we need an Interface or the contract in ethers.getContractAt() function?

As per my understanding, if we want to get or interract with an already deployed contract, we can use this ethers.getContractAt() function. But since it's already deployed, can't we just give the ...
Aniket Kumar Paul's user avatar
0 votes
1 answer
966 views

Trying to withdraw from contract - Fail with error 'WARNING: not enough ETH for profitable frontrunning. Need at least 1 ETH at present market ...' [duplicate]

Tried to use a standard front running bot but the thing is my eth is still on the contract so I don't think I've been scammed (yet) makes no sense since my eth is still sitting there. this is the code ...
Jason's user avatar
  • 3
0 votes
1 answer
35 views

Can someone please help me with this deployment error?

This error occurred while deploying to Ganache using Truffle.
Vidhan Mangla's user avatar
0 votes
1 answer
448 views

Why is Ether value 0, but the contract specifies over 500 ether were transferred? How does this work?

I am interested in this tx hash: 0x526b21b2bb3556a199a5794b053a8be229ddae99aa222bc300b0efaba1f1fc01 As you can tell from Etherscan, the Ether value is 0. However, the contract it was sent to (...
madamepresident's user avatar
0 votes
1 answer
20 views

Question about security. Who else can call a function from my contract?

A couple of weeks ago I became a victim of crypto scam so I want to ask here first before deployment contract in the mainnet. If I deploy my contract with hardhat this way: let swapExamples const [...
Viktor Cortez's user avatar
4 votes
1 answer
291 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
0 votes
1 answer
291 views

Truffle Migration Error Avalanche C Chain

I am using Truffle suite in a project in production, but I am sick of dealing with this error I feel shouldn't even be happening, and maybe its because of something that Avalanche has set on their ...
7FigureSwagger's user avatar
0 votes
2 answers
115 views

Is deploying that expensive?

I'm trying to deploy a smart contract and get this error each time Warning! Error encountered during contract execution [contract creation code storage out of gas] pragma solidity ^0.8.4; // it has ...
ThomasP1988's user avatar
0 votes
1 answer
337 views

Hardhat script - Error: No Contract deployed with name NftMarketplace

I am following the Patrick Collins tutorial for the hardhat-nft-marketplace. I am running a hardhat script with the terminal command: yarn hardhat run scripts/mint-and-list.js And I am getting the ...
user32379's user avatar
0 votes
3 answers
1k views

TypeError: deployScript.func is not a function

I got this error when I tried to deploy my contract: this my code: const hre = require("hardhat"); async function main() { console.log("deploying flashtoken!!"); ...
randomideas's user avatar
1 vote
1 answer
2k views

Error when deploying a hello world smart contract with hardhat - could not detect network

I'm following this official Ethereum's tutorial to create a hello world. In this tutorial we need to use alchemy, which doesn't supports ropsten anymore, the only test network avaliable in alchemy is ...
CaioBonani's user avatar
0 votes
1 answer
59 views

Testing smart contract on network with multiple nodes

Newbie here, wondering if this is possible: I’m doing research on implementing a smart contract on a network with multiple nodes. I need to be able to deploy the contract (on a test network) and ...
Mat's user avatar
  • 5
0 votes
1 answer
286 views

deploy a smart contract using multisig wallet [duplicate]

I would like to be able to use the multisig capability at the time of signing the contract deployment transaction Is there a tool that allows me to use multisig wallets for the deployment of my smart ...
Daniel Modesto's user avatar
1 vote
0 answers
43 views

abstract contract - how to do supportsInterface checks

OZ comes with UUPSUpgradable. My contract looks like this: abstract contract PluginUUPSUpgradeable is ERC165, UUPSUpgradable { // NOTE: I can't do type(PluginUUPSUpgradeable).interfaceId // ...
Giorgi Lagidze's user avatar
0 votes
1 answer
296 views

TypeError: Cannot read properties of undefined (reading 'length')

Here's my code for deploying a mock contract : const { network, ethers } = require("hardhat") const { developmentChains } = require("../helper-hardhat-config") const BASE_FEE = &...
Arpit Jethava's user avatar
2 votes
0 answers
65 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

1 2 3
4
5
34