Questions tagged [contract-deployment]
The act of pushing a compiled smart contract in byte code to the Ethereum blockchain.
1,695
questions
2
votes
1
answer
111
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
...
0
votes
1
answer
198
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'
...
0
votes
3
answers
344
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
...
0
votes
1
answer
162
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
{
"...
0
votes
0
answers
417
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 ...
0
votes
0
answers
34
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: "...
0
votes
0
answers
72
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(...
1
vote
1
answer
2k
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 = ...
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 | }
| ^
2
votes
2
answers
270
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, ...
0
votes
1
answer
29
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 ...
1
vote
0
answers
175
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 ...
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 ...
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(...
2
votes
2
answers
681
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.
1
vote
1
answer
64
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 ...
0
votes
1
answer
112
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,...
1
vote
2
answers
203
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 ...
1
vote
1
answer
112
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?
1
vote
2
answers
220
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 ...
1
vote
1
answer
456
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
│ ├──...
1
vote
0
answers
16
views
Guidance in connecting multiple machines to a single blockchain
I'm seeking guidance with respect to the execution of a private blockchain. I have created a private blockchain using geth and deployed the contract using truffle. I am looking for a solution that ...
5
votes
3
answers
2k
views
Is possible to control "gasleft()" and exit of a loop before "out of gas" return?
A deployed smart contract has public view functions that searchs into mapping of struct with a for loop.
The problem is that in the 500 loop lap of data (there are 10,000 indexes and growing..) the ...
0
votes
0
answers
41
views
How to deploy contracts when approved by a DAO
Here's the flow I'm hoping to achieve:
Member proposes a contract to be deployed, including source code.
DAO votes on whether or not the contract should be deployed.
If the vote is approved the ...
1
vote
1
answer
34
views
Is it possible to import an existing contract without source code?
There's no source code saved from the creator and not verified in scope (it's Klaytn). And I got the ownership of the contract.
I want to import the contract and interact with it to run some functions ...
1
vote
3
answers
514
views
TypeError: Cannot destructure property 'getNamedAccounts' of 'hre' as it is undefined
Currently attempting to deploy my smart contracts for a DAO DApp. When running:
npx hardhat run scripts/deploy.js --network localhost
I receive the following error:
TypeError: Cannot destructure ...
0
votes
1
answer
249
views
Remix shows "creation of contract pending"
After deploying my contract, remix keeps showing " creation of contract pending ", not only this I am also getting a "Unhandled Runtime Error
Error: call revert exception " with my ...
0
votes
0
answers
336
views
HardhatError: HH700: Artifact for contract 'GovernanceContract' not found
Currently attempting to deploy my smart contracts. However, when running:
npx hardhat run scripts/deploy.js --network localhost
I am getting the following error:
HardhatError: HH700: Artifact for ...
2
votes
1
answer
1k
views
Error: call revert exception
I keep getting this unhandled runtime error with my code:-
" Unhandled Runtime Error
Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="...
1
vote
0
answers
464
views
Contract Deployment on mumbai testnet stuck at (pending)
Im running through some tutorials and all the contracts that I deploy to the polygon testnet always get stuck sitting there as (Pending). Any ideas why that would be?
Here's an example of one:
https://...
3
votes
1
answer
944
views
How difficult is it to deploy a contract to one specific address that you want?
Let's consider two scenarios:
Address X deployed Uniswap code to ETH mainnet with Create2 opcode to address Y
Address X deployed Uniswap code to ETH mainnet with Create opcode to address Z
I am an ...
3
votes
1
answer
140
views
Is there any difference between the "new Contract()" syntax and the assembly "create" opcode?
Is there any difference between the two following ways of creating a smart contract via a smart contract?
function create_v1() external {
Contract c = new Contract();
}
function create_v2() ...
0
votes
0
answers
55
views
Why function is not taking parameter
I have written following simple solidity code
pragma solidity ^0.4.0;
contract C1 {
function f() {
g(8) ; // simply passing an integer to another function
}
function g( uint x) returns (uint )
{...
0
votes
2
answers
1k
views
Ethers setup provider for mumbai testnet
I try to connect to mumbai testnet in javascript. I don't want to use alchemy, infura or something like this, but want to connect drectly. I already have deployed a smart contract to mumbai-testnet.
I ...
0
votes
1
answer
31
views
Problem with interacting with external contract
I've created universal contract that get balance of any NFT(I parse NFT contract address).
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
interface myInterface {
function balanceOf(...
1
vote
1
answer
467
views
How can I programmatically create new Gnosis Safe?
Is there documentation anywhere on how to create a gnosis safe programmatically with detailed information on how to construct parameters?
Here's what I tried in Remix (which i know is the incorrect ...
0
votes
1
answer
329
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. ...
1
vote
2
answers
556
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",
}
});...
0
votes
1
answer
43
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.
...
0
votes
1
answer
106
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....
4
votes
2
answers
517
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 ...
1
vote
1
answer
575
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 ...
1
vote
1
answer
881
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.
0
votes
1
answer
154
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 ...
0
votes
0
answers
92
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 &...
0
votes
1
answer
176
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 = <...
1
vote
1
answer
302
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/...
0
votes
1
answer
206
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....
0
votes
1
answer
119
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 ...
0
votes
2
answers
731
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:
...