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
213 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
55 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,580
0 votes
1 answer
52 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
70 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
  • 528
0 votes
3 answers
6k 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
2 answers
199 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
2 answers
444 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
676 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
39 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
540 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
  • 1,018
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
228 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
697 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
1k 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
607 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
306 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
345 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
122 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
372 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
69 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
354 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
45 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
326 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
67 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
1 answer
117 views

how to do supportsInterface for non-abstract contract

I have the following scenario. contract GovernanceERC20 is ERC165Upgradeable, ERC20VotesUpgradeable, { bytes4 private constant GOVERNANCE_INTERFACE_ID; /// @inheritdoc ERC165Upgradeable ...
Giorgi Lagidze's user avatar
0 votes
1 answer
218 views

Truffle migrate - TypeError: migrations.setCompleted is not a function

I ran $ npx truffle migrate to deploy 2 contracts to Ganache but I got an error: This version of µWS is not compatible with your Node.js build: Error: Cannot find module './uws_darwin_x64_88.node' ...
aahd_fr's user avatar
0 votes
4 answers
418 views

Contract is below size limit, but Hardhat says it's not?

When I run npx hardhat compile, Hardhat says one of my contracts is above the size limit. But hardhat-contract-sizer says it's not. See below: Versions: hardhat-contract-sizer version: ^2.5.1 ...
António Gonçalves's user avatar
0 votes
1 answer
168 views

I'm trying to call a function from a deployed contract, But I'm getting the following error:

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? execution reverted: ERC20: insufficient allowance { "...
shamapumbu muzandu's user avatar
1 vote
0 answers
433 views

Goerli Eth being taken from my wallet

Every time I receive ETH from a Goerli faucet it is immediately transferred out of whatever wallet I transferred it to. At first I thought said issue was related to just one test account which had its ...
Beau Chaseling's user avatar
0 votes
0 answers
38 views

why not getting hex value and isBigNumber boolean value in timestamp?

Terminal when contract deployed 0xf33fd6e51aad88f6f4ce6ab8827279cfffb92266 has waved A message [ [ '0xf33Fd6e51aad88F6F4ce6aB8827279cffFb92266', 'A message', BigNumber { value: "...
vishal's user avatar
  • 23
0 votes
0 answers
73 views

Issues deploying large contracts with Web3.JS , but with Remix contract deploys perfectly

I am using solc npm package as compiler. It seems to compile fine. Maybe it's not a gas issue, but a problem with how I'm deploying multipart contracts in Web3 JS. //initial.js var output = JSON.parse(...
Padoga's user avatar
  • 101
1 vote
1 answer
3k views

Hardhat: how to deploy using a custom signer?

Normally, to deploy contracts to a network, we specify the private keys in accounts section of the network config, Like below, and these accounts get used in signing the transactions. module.exports = ...
Somjit's user avatar
  • 265
0 votes
1 answer
16 views

solidity doubt error unknown [closed]

ParserError: Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition. --> contracts/college.sol:104:1: | 104 | } | ^
david raj's user avatar
2 votes
2 answers
341 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
  • 273
0 votes
1 answer
32 views

Transactions with my contract are older than the contract itself

I have recently started my blockchain development journey and I can't seem to find an answer to my question. I have deployed a new contract (the same way as I did a few before) on 19.09.2022 13:25 yet ...
xirlit's user avatar
  • 1
1 vote
0 answers
195 views

bscTestnet hardhat deployment problem

I've been racking my brain for quite a while now. Before, I was able to deploy my code in bscTestnet with no problem, but recently, without changing any code it always stuck and it's not working. so ...
Lonewarp's user avatar
  • 151
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
0 votes
1 answer
8 views

Large Size Disparity Between Contract and Its Library Wrapper

I have this contract called Pool.sol, and an external library for deploying it: pragma solidity ^0.8.0; // Contracts import "../Pool.sol"; library DeployerOfPools { function deployPool(...
mermeladeK's user avatar
2 votes
2 answers
842 views

what is the biggest contract by byte code size and by storage size on the evm?

As the question suggests, I'm curious about how to find statistics for: what is the biggest contract by loc/bytecode size what contract is currently taking up the most storage space on the chain.
zcaudate's user avatar
  • 105
1 vote
1 answer
82 views

Pre-deployed implementation contracts for proxy pattern

I'm planning to deploy a few upgradeable OpenZeppelin contracts as UUPS proxies. To save money, I would like to find some existing implementation contracts that are already deployed, so I just have to ...
Jonah's user avatar
  • 655
0 votes
1 answer
129 views

" Returned error: intrinsic gas too low" trying to deploy a contract on rinkeby

I'm trying to deploy a contract on rinkeby testnet and I receive this error message: "Returned error: intrinsic gas too low". This is my code: web3.eth.getTransactionCount(address1,(err,...
Sergio Manuel's user avatar
1 vote
2 answers
234 views

how to i deploy a contract from the backend server?

I have a dapp that compiles a solidity smart contract in the backend server. I want the user to send a transaction that'll deploy the contract. Basically the user enters the name and the symbol as ...
eth_sign's user avatar
1 vote
1 answer
159 views

I can't manage to find the JVM(javascript Virtual Machine) as an environment to deploy my solidity smart contract on Remix IDE, Any idea why?

I can't manage to find the JVM(javascript Virtual Machine) as an environment to deploy my solidity smart contract on Remix IDE, Any idea why?
joe17ar's user avatar
  • 15
1 vote
2 answers
228 views

Searching lower value into array returns "Out of GAS" before complete the total loop

I developed a smart contract that store data in a struct array. Frequenlty the other function is calling the function getLowerLastDate() to known the lower LastDate and the related Wallet of all ...
Extrange planet's user avatar
1 vote
1 answer
545 views

Call contract artifacts with same names from different path in hardhat

I am trying to use a contract file with same name in 2 different folders: src/ ├── StfxVault.sol ├── gmx │ ├── Reader.sol │ ├── Stfx.sol │ └── interfaces │ └── IStfxGmx.sol ├── perp │ ├──...
abhi3700's user avatar
  • 189

1
3 4
5
6 7
35