Questions tagged [contract-deployment]
The act of pushing a compiled smart contract in byte code to the Ethereum blockchain.
1,695
questions
3
votes
0
answers
490
views
How to deploy smart contract with raw transaction
I want to deploy transaction with raw transaction without using hardhat or web3 method.
my code looks like this.
// constructor params
const name = 'My Contract';
const symbol = 'MC';
const maxSupply =...
0
votes
1
answer
66
views
How to create instance of contract that deployed by another contract?
Lets say i've deployed an contract using a function in another contract:
function createCollection(
uint256 _price, uint256 _maxSupply, string memory _name, string memory _symbol, address ...
1
vote
1
answer
178
views
How to compile with --bin option in solcjs?
I want to compile using --bin option because I want to get to see the bytecode of the compilation.
Using solc I know it is something like this: solc --bin
How can I achieve this using solcjs?
1
vote
1
answer
2k
views
Error when trying to deploy a smart contract using deploy-zksync
I am getting the following error after running yarn hardhat deploy-zksync:
Running deploy script for the Greeter contract
An unexpected error occurred:
Error: Bytecode length in 32-byte words must be ...
0
votes
1
answer
259
views
What is the format of the private key required to deploy using deploy-zksync?
I am trying to deploy a very basic smart contract using zkSync. This is the code, from they docs:
deploy.ts
import { Wallet, utils } from "zksync-web3";
import * as ethers from "ethers&...
1
vote
1
answer
42
views
How can I precompute the address of contract and use it for the deployment of a second contract?
When I deploy the dao with the DaoFactory, I also want a second second plugin installed, which relies on the address of the first plugin...
What do you recommend?
Should I deploy the second plugin ...
0
votes
0
answers
62
views
Calling emergency withdrawal on deployed unpublished smart contract Binance
Does anyone know how to call emergecny withdrawal function on a contract that is live and in use but not published on BSC Scan?
Example: 0x7F62c957151810cD743e5707465F4937422300cC is live but not ...
0
votes
0
answers
24
views
Can anyone help me write this for the Ethereum blockchain?
const fs = require('fs')
const Web3 = require('web3')
const { Client, NonceTxMiddleware, SignedTxMiddleware, LocalAddress, CryptoUtils, LoomProvider } = require('loom-js')
function loadAccount (...
1
vote
2
answers
59
views
Why does deploying a contract causes two transactions?
I am new to Ethereum, learning about smart contracts.
I have a simple hello world contract.
# @version ^0.3.7
@external
@pure
def hola() -> String[5]:
return "hola!"
Currently, I'm ...
0
votes
0
answers
10
views
How to instantiate an instance of a contract with ETH? [duplicate]
I have two contracts:
contract Example {
using Address for address payable;
uint256 constant ETHER_IN_TARGET = 10e18;
Target payable targetContract;
constructor() payable {
...
1
vote
1
answer
100
views
getting an error in ethers.js deploy script
My code is
const path = require("path")
const { ethers } = require("@nomiclabs/hardhat-ethers")
const fs = require("fs")
require("dotenv").config()
module....
1
vote
1
answer
126
views
contracts being deployed via 0x61088480
Lately I am coming across different deployment tx data patterns. I am already familiar with how the free memory pointer is shifted from the usual 80 when there are immutables in the code (great ...
0
votes
1
answer
58
views
freeCodeCamp.org - doing javascript tutorial and contract won't deploy on VS
I am trying to deploy a SimpleStorage.sol contract using a deploy function on VS.
Error message is:
Error: invalid bytecode (argument="bytecode", value="[{\"inputs\":[{\"...
1
vote
0
answers
36
views
System contracts vs solidity contracts
How to convert a solidity smart contract into a system contract? It would be for an Ethereum Fork, we want to implement a smart contract as a system contract.
Also would it be possible to update the ...
0
votes
0
answers
48
views
Change an Ethereum Fork's source code to update a specific smart contract code while keeping same address? How to do it (on a fork)
I would like to know how we can update a specific smart contract code on an Ethereum fork or Ethereum Classic fork.
The smart contract address should remain the same in order to keep same data storage....
0
votes
1
answer
37
views
How Can i make (my token / eth ) paring as / usdt [closed]
I launch new token /eth how can i make it /usdt
0
votes
0
answers
32
views
contract.methods can not define contract
The problem that I am having is that my contract method is not responding when I'm trying the mint function on my localhost and I'm constantly getting an error on the website saying:
Uncaught ...
0
votes
3
answers
483
views
How can i input 0.001 value in solidity?
I want to list token on marketplace and price in form 0.0001 or 0.2 etc
how can i do that ?
solidity just unit.
thanks a lot.
0
votes
1
answer
300
views
Subgraph indexing error, mapping aborted with ethereum value is not an address
Subgraph indexing failing due to mapping abortion with reason - ethereum value is not an address, from one of the handlers. I understand the issue if from the handlePaymentExpenseCreated() function ...
0
votes
1
answer
95
views
Passing bytes32 to constructor
I have s constructor that takes a bytes32 parameter and assign its value to the jobID variable
contract APIConsumer {
bytes32 public jobId;
constructor( bytes32 _jobId) {
jobId = ...
0
votes
2
answers
199
views
Could not create addresses from your mnemonic or private key(s)
I'm trying to use truffle to deploy a smart contract onto the ethereum blockchain. There are four commands to make this happen:
truffle compile
truffle migrate --network mainnet
truffle test
truffle ...
1
vote
3
answers
767
views
Testing upgradable contracts with hardhat-deploy
I want to properly and efficiently test a smart contract upgrade with hardhat-deploy.
Currently, I'm experimenting with hardhat forking, both networks that is localhost and hardhat networks.
I've ...
0
votes
0
answers
138
views
Unable to call contract function because Metamask doesn't pop up though it's connected to Remix
I've been having this issue for a while. Whenever I try calling a function or deploy a contract using Remix, the Metamask doesn't pop-up, even though if Metamask is connected to Remix. The only thing ...
1
vote
2
answers
876
views
Foundry scripts run with an unknown tx.origin address. How do I change it?
I am running a foundry script that deploys some contracts and calls them. I start my run function with
function run() public {
uint256 deployerPrivateKey = vm.envUint("...
-3
votes
2
answers
219
views
PLEASE HELP! Contract deployment to Money.sol remixetheriumcompiler- contract interaction start . IDK crypto I need to recover my funds [duplicate]
I recently had a loss in my family and was trying to raise some extra funds quickly. I was given this instruction, and when I called to withdrawal I realized it was trying to take the funds from my ...
0
votes
2
answers
428
views
How to scan all contract created events?
I'm attempting to index all contracts ever created on Ethereum mainnet.
Transactions without a to are transactions in which a contract is created. The new contract hash can be found in the ...
2
votes
0
answers
334
views
How to deploy a contract with linked libraries and a different version in `foundry test`
I need to deploy a contract with an incompatible version number to my test script. The natural solution is to use deployCode, however, this contract also requires certain libraries. The following ...
0
votes
1
answer
40
views
deployment errors in code due to constructor arguments
here is the contarct I am trying to deploy:
// Raffle
// Enter the lottery (paying some amount)
// Pick a random Winner (verifiably random)
// Winner to be selected every x-minutes -> completely ...
0
votes
1
answer
83
views
Getting existing address while deploying contract on polygon mumbai using hardhat
I deployed a contract on polygon mumbai using hardhat and later when i verify the contract, i got this error
Error in plugin @nomiclabs/hardhat-etherscan: The address ...
0
votes
0
answers
26
views
solidity - why returned data not includes length
Let's imagine the following:
/// to.call calls this function
function fail() { revert("test"); }
//
(bool success, bytes memory response) = to.call{value: 0}(data);
The way I understand is ...
0
votes
1
answer
88
views
Check if contract already deployed in Brownie
im writing a script in python and brownie to deploy my smart contract to a testnet but i want to set an if statement for not deploying the smart contract if its already deployed .
I know that deployed ...
1
vote
2
answers
59
views
Unable to get value from a smart contract
I try to deploy a smart contract on a private block chain (geth started with --dev). However, even if my contract is as simple as possible, I cannot get the stored value.
pragma solidity ^0.8.8;
...
0
votes
0
answers
73
views
Error while deploying 00-deploy-mock.js
local network detected! Deploying mocks
An unexpected error occurred:
Error: ERROR processing /home/surajsahoo/hh-fcc/hardhat-fund-me-fcc/deploy/00-deploy-mocks.js:
Error: invalid BigNumber value (...
1
vote
2
answers
47
views
Get the address of a deployed contract with etherjs
I am trying to deploy a contract from within another contract.
function createCollection(string memory _name, string memory _tokenName) external returns(address nftAddress)
{
return address(...
0
votes
1
answer
33
views
Name has to refer to a struct, enum or contract
I am building an NFT marketplace. I have an NFT contract and MarketPlace contract.
This is my NFT contract:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/...
0
votes
0
answers
391
views
How to setup a Factory for an upgradeable smart contract deployed with UUPS Proxy?
I am trying to create a Factory for the following smart contract:
SmartWallet.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.11;
// ========== External imports ==========
...
0
votes
1
answer
176
views
How to encode a call to deploy a proxy inside a smart contract?
In hardhat, I am deploying an upgradeable smart contract using this script:
const v1contract = await upgrades.deployProxy(
V1contract,
[
"...
1
vote
1
answer
545
views
How to find the address of the owner a of smart contract if it does not have any owner description
How to find the address of the owner of a smart contract if it does not have any owner-related description like no address assignment, for instance how to find the owner of the following smart ...
0
votes
0
answers
13
views
Difference between deployed object and current object?
I have a problem understanding the concept of deployed object. Kindly follow the link:
Executing reentrancy on Truffle Console: attacker not stealing 5 ether , why only 2 reentrant calls?
The link ...
1
vote
2
answers
194
views
Send both erc20 and native ether to contract on deployment
I'm trying to send LINK (erc20) and Ether (goerli in this case) to my contract on deployment. I understand how to do this for native/testnet ether. But how do I combine them to send erc20 and ether at ...
1
vote
0
answers
113
views
Fetch predefined account in hardhat and deploy contract from that address
I'm trying to deploy a smart contract from my frontend. Using the hardhat account which I defined in hardhat.config.js using the private key, and setting an argument (raffleOwner) as the address of ...
0
votes
0
answers
170
views
Deploy a smart contract from a (nuxt) frontend
I'm trying to create a site where users can deploy smart contracts with arguments that they choose. For this project, I'm using nuxt, wagmi and hardhat. I know how to deploy my smart contracts with ...
0
votes
0
answers
30
views
How to deploy an upgradable token without the proxy
I have an existing token deployed with a proxy. My deploy script looks like this:
const deployGovernanceToken: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
// @ts-ignore
...
0
votes
2
answers
230
views
What is the way to verify eip 2535 proxy contracts with ethercan when deploying with foundry script?
I used the --verify command but it doesn't show verified on etherscan.
1
vote
2
answers
260
views
Is it possible to use CREATE2 to replace a contract deployed with CREATE (self-destruct + same wallet to deploy)?
the wallet A deploy a contract using CREATE(wallet,nonce) to the X address.
the contract at X can be self-destruct.
Is it possible for the same wallet A to deploy to the X address a new contract using ...
1
vote
2
answers
469
views
Is there any automatic solution to remove comments and console.log from solidity files?
still learning Solidity and all ecosystem around it and I still thinking about the best way how to perform deployment.
I have my solidity contracts (using HardHat suite) where I have some console.log ...
0
votes
0
answers
69
views
Can't deploy contract into a private Ethereum network by Geth as the web3 provider
I've set successfully a private Ethereum network by Geth and now I need to deploy contracts there. I use web3.js for interacting to the network and use each Geth node as the web3 provider for each ...
0
votes
1
answer
248
views
Can't deploy contract from another contract using hardhat
I have two contracts, one serves as a contract factory (A) for the other (B). When I try to deploy (B), I don't receive an error, but the contract doesn't get deployed.
contract A {
function ...
1
vote
0
answers
26
views
NodeJS doesn't log any thing on the console for contract deployment
I'm deploying smart contract into a private Ethereum network by web3js and the web3 provider is a Geth node. According to the deployment code, NodeJS should log the deployed contract address on the ...
0
votes
1
answer
114
views
How to connect a local hardhat contract with the new version of moralis stream?
The server option has been removed from moralis which was easier to work with. But now it has a stream option. I have already set up the mongodb database, local server etc..
To create a new stream ...