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
1 answer
11 views

What `to` should be set when deploying contracts?

I'm deploying contract using eth_sendTransaction and compiled bytecode. So for example my transaction is: { from: "0x0000123...", data: "0x6000...", gas: "0x9999"...
user avatar
  • 81
0 votes
1 answer
24 views

How to deploy Ownable contract with Hardhat and Ethers?

When I deploy an Ownable contract via hardhat (hardhat-deploy in particular) to Optimistic Kovan, it doesn't seem to set the owner correctly, whereas when I deploy the same set of contracts via Remix, ...
user avatar
0 votes
1 answer
14 views

Is it possible to run hardhat node & hardhat deploy in Github Actions? | Github Action Stuck for hours

Currently using the code below for Github Actions to test local deployment. However, my github actions have been stuck for hours on Test deploy. Any ideas on how I can fix it? # This is a basic ...
user avatar
0 votes
1 answer
26 views

Can I deploy contract with go-ethereum and sign it via MetaMask?

I want to deploy contracts by using my go backend code with go-ethereum package. Since this part of the system will run as a central element (since it does a lot of other stuffs), I won't (and don't ...
user avatar
  • 1
0 votes
0 answers
18 views

Stack underflow (0 <=> 2) when creating new smart contract

I'm developing a contract and a Web 3.0 using Hardhat, Ethers.js, Node.js and Web3.0 (Metamask) to do ETH smart contracts and transactions and I'm getting a rare error when trying to execute the ...
user avatar
  • 1
0 votes
1 answer
19 views

invalid opcode: opcode 0x4b not defined when sending a new contract

I'm trying to create a new transaction and deploy it to the blockchain, but I'm obtaining this warning when I go to inspect the transaction result on etherscan: Warning! Error encountered during ...
user avatar
  • 1
0 votes
0 answers
14 views

Can one still bypass EIP-155 and deploy to the same chain-independent address from an EOA

I was trying to deploy a contract to a deterministic address using Nicks method. This works fine on Rinkeby and all the Ethereum-Testnets that I tried. However, it doesn't work on Mumbai and probably ...
user avatar
  • 147
0 votes
1 answer
38 views

solidity transaction error, The called function should be payable if you send value and the value you send should be less than your current balance

I want to write a contract using router from uniswap. But when swapping 1 token to another, I get an error The transaction has been reverted to the initial state. Note: The called function should be ...
user avatar
0 votes
0 answers
7 views

how can I put a URL in the image section of the metadata?

I have this sandbox character(https://www.sandbox.game/model-viewer-light/?assetId=9894bf84-cc8e-455b-a4aa-e3a3f2955045), and I want to create an nft meatdata and use this link for the image part ...
user avatar
0 votes
1 answer
22 views

Any document for the layout of the smart contract binary?

I'm trying to write a disassembler to disassemble the binary code of smart contract. There are trailing bytes at the end, which causes disassemble problem. For example, the last few lines of this ...
user avatar
  • 183
0 votes
1 answer
44 views

Send ETH to Contract Fails in Tests

I'm trying to send ETH to a contract in tests using hardhat await owner.sendTransaction({to: greeter.address, value: "1000000"}), but it reverts with "function selector was not ...
user avatar
  • 1,166
0 votes
1 answer
17 views

Can't connect metamask to React app in production

I have a React app that can connect to my browser's Metamask in my development environment, but the version deployed on Netlify can't connect to Metamask. My code for getting my web3 provider is ...
user avatar
0 votes
0 answers
39 views

ERC721 Contract: Adding Contract Level Metadata?

I am trying to implement contract level metadata so "description", "image", external_link": etc show up on marketplaces, particularly OpenSea. I have done an extensive search ...
user avatar
0 votes
1 answer
41 views

How can i interact with my contract i deployed on rinkeby network and send eth to uniswap

I am practicing using the uniswap v3 router and i created a simple contract that attempts to swap a certain amount of ETH to dai. This is the function that does so function convertETHToDAI() external ...
user avatar
0 votes
0 answers
43 views

Alchemy pending transactions indefinetly

I changed literally nothing and the transactions for contract creations don't go through anymore. I'm using hardhat and deploying on mumbai. I have set blockGasLimit: 999999999999999,. Any ideas why ...
user avatar
0 votes
0 answers
18 views

Smart Contract Re-deployment on Ropsten Testnet

I have deployed the same Smart Contract twice on the Ropsten Testnet using Truffle (i.e. truffle migrate --compile-all --reset --network ropsten). The second deployment generated a new contract ...
user avatar
  • 281
0 votes
0 answers
20 views

How can I deploy a contract using hardhat to ethereum mainnet

My first trial, gave a pending status on etherscan which stayed for about 17hours before I canceled the transaction. https://etherscan.io/tx/...
user avatar
0 votes
0 answers
39 views

Embedded vs linked libraries

I recently became aware of linked vs embedded libraries. My understanding is that if your library uses public pure functions and/or manages storage, then you need to deploy and link the library to ...
user avatar
0 votes
1 answer
24 views

How to store contract state on multiple blocks?

Eth blocks have a clear block size and gas limit (of 30,000,000). Some contract states must require more memory than the defined block size, right? Now my question: can the contract state be saved on ...
user avatar
0 votes
1 answer
70 views

How to Change Wallet Address Used to Deploy Contract in Remix IDE

I am using Remix to deploy a smart contract. To test it out, I am connected to the Rinkey testnet on Metamask, and Metamask is connected to Remix. However, Remix thinkgs that I'm on the mainnet, and ...
user avatar
0 votes
0 answers
11 views

How to clone a contract binary using `client.SendTransaction` in go-ethereum?

I want to clone a contract from mainnet to the testnet for testing. The contract is not written by myself and it's not open source, so I tried to copy the "data" bytes from that deployment ...
user avatar
  • 183
0 votes
0 answers
11 views

How do front-ends deploy custom collections/contracts in a marketplace?

So I'm building a marketplace and one of the needs is that anyone can deploy a custom collection, even tried creating a deployed script same as in a normal deployment, but doesn't seem to be the ...
user avatar
0 votes
0 answers
28 views

My liquidity of my own contract got stolen

By this transaction https://bscscan.com/tx/0x1fd7e78163453a31245055fe7d3ad212fb23ef69b0c69e1316fe50a383d3a98e I try to understand how my tokens get out without my authorization and by far selling into ...
user avatar
0 votes
0 answers
14 views

How to deploy Smart Contract from RreactJS-App

To deploy my Smart Contracts to Ganache I was working with Truffle. Now I wanted to deploy the Smart Contracts via the ReactJS-app, so without typing "truffle migrate --reset" into the cmd. ...
user avatar
  • 27
0 votes
0 answers
14 views

TypeError: mnemonic.includes is not a function for kovan test net

I am executing the following code on my terminal " truffle migrate --reset --network kovan " to migrate my contracts to the test network. But I keep getting this eerror "TypeError: ...
user avatar
0 votes
1 answer
56 views

Deploy contract using second address in wallet using hardhat

I'm trying to deploy a contract using the second address in my wallet (Metamask), how can I achieve such thing from hardhat? This is my hardhat config: /** * @type import('hardhat/config')....
user avatar
0 votes
1 answer
64 views

Contract deployment on Polygon

I am trying to deploy a smart contract. My RPC provider is Alchemy and I am working on Polygon and Mumbai. When I try to deploy my contract on polygon it gives "transaction underpriced" ...
user avatar
0 votes
0 answers
13 views

Increasing Dividend allocation based on timeframe?

So working on a contract and trying to see if something could be implemented in regards to dividends. Currently I have a tax structure where, based on time x amount of days the tax gets reduced. I ...
user avatar
0 votes
0 answers
17 views

How do I call a script which deploys a contract to run a function? (React & Solidity)

My Issue I'm building a yield staking dapplication with React and Solidity. I built this by following a tutuorial. The dapp connects to the user's wallet and allows the user to stake their tokens for ...
user avatar
  • 1
0 votes
0 answers
15 views

How do miners rollback execution?

My initial expectation about how it would work in ethereum: A miner selects the transactions in the proposed block. If the miner's proposed block actually gets accepted into the chain via the ...
user avatar
  • 101
0 votes
0 answers
13 views

Truffle Import existing Contract

If a contract that is part of a project has already been deployed with remix for example. How is it possible to create a migration for this contract without redeploying it so that the whole project ...
user avatar
0 votes
0 answers
16 views

Can't set the value of a variable when passing encoded data as parameter with upgradeable contracts

I posted many days ago and I thought to have understood the answers but apparently here I am asking the same questions again! I have these contracts: // SPDX-License-Identifier: MIT pragma solidity ^0....
user avatar
1 vote
0 answers
39 views

Alchemy Mumbai endpoint not working from truffle

I am trying to deploy some smart contracts on Mumbai network from truffle using an Alchemy endpoint I just created. this is my truffle-config.js But I am getting errors all the time : Not to long ...
user avatar
0 votes
1 answer
23 views

Contract deployment with the user interface

My smart contract constructor function accepts 2 parameters for being deployed. I have developed a user interface for this contract by Hardhat, React, and Ethers. Now I want to create an HTML form on ...
user avatar
0 votes
0 answers
51 views

Brownie: replacement transaction underpriced

I have a stuck transaction in brownie, when I try to deploy another contract I have this error: ValueError: replacement transaction underpriced my deployment code is like this: dev = accounts.add(...
user avatar
0 votes
0 answers
25 views

How do you separate development environments between networks?

I'm utterly confused at how to properly navigate certain aspects of the development workflow between ethereum networks. How I understand it: network <-> front-end dapp LOCAL: hardhat localhost (...
user avatar
0 votes
2 answers
51 views

Deploying a Contract from a Contract

I'm new to Solidity and the whole blockchain environment. Learning it from a course. I have been assigned a task which is to: Make a parent contract that has the ability to deploy child contracts. ...
user avatar
  • 5
0 votes
1 answer
34 views

How to tell if a transaction is contract creation?

How can one tell if a contract creation took place during a particular transaction? In other words, what is the pattern that I should be looking for? In some cases I have seen the null address being ...
user avatar
  • 113
0 votes
1 answer
49 views

Using ERC20 inside ERC721

I have a big doubt. I'm building an application where the user can create their NFT, however, the payment that will be used to create the NFT will be my token that ERC20. My question is how do I use ...
user avatar
  • 121
0 votes
0 answers
26 views

Fantom Deployment with Truffle stuck in confirmation

I try to deploy a contract with truffle on FTM mainnet. But it looks like the transactions never get submitted. Output: Deploying 'Contract' ------------------------- ⠋ Blocks: 0 ...
user avatar
  • 101
0 votes
1 answer
34 views

Transfer ERC20 a wallet to another

Well, I need the following help. I'm developing a game, and in this game my ERC20 coin will have by default 1billion of the token in a wallet called "Rewards". That way, my contract for that ...
user avatar
  • 121
0 votes
1 answer
27 views

Unable to read functions from my other solidity contract files

I am following the Crypto Zombies learning project. It is a multipage project, where one file imports from the other and i am attempting to test it locally using hardhat. Now my issue is when i try to ...
user avatar
0 votes
1 answer
57 views

How do you interact with a deployed contract as the owner?

I'm using Hardhat as my development framework, but there are a few beginner questions that I have about interacting with a deployed contract that I couldn't quite find in the hardhat docs (or if this ...
user avatar
0 votes
2 answers
39 views

High gas cost, still fails

I'm trying to deploy a smart contract to the Ethereum mainnet. I paid about $161 in gas fees before the transaction failed, because it ran out of gas. I tried again with a higher gas limit, and it ran ...
user avatar
0 votes
0 answers
308 views

Uncaught (in promise) Error: Internal JSON-RPC error. { "code": -32000, "message": "Execution reverted", "data": "0x" }

After getting the contract I tried to call a function from the deployed contract Address. But it is giving me the following error: Uncaught (in promise) Error: Internal JSON-RPC error. { "code&...
user avatar
0 votes
0 answers
110 views

I want to deploy erc721 contracts from a simple or factory contract

I want to deploy erc721 contracts from my factory contract. But i am getting the following error in brownie- ValueError: Execution reverted during call: 'execution reverted: ERC721: transfer to non ...
user avatar
0 votes
1 answer
19 views

Less/more than equal gas cost

i've read on a blog that it is most costly gas wise to write eg. x <= y than x < y + 1, do you have any ideea if it's true and why would that be the case? Except that blog I couldn't find ...
user avatar
  • 1
2 votes
2 answers
241 views

how to precalcuate the deployed contract address

// SPDX-License-Identifier: MIT pragma solidity ^0.5.16; import "https://github.com/Uniswap/v2-core/blob/master/contracts/UniswapV2Pair.sol"; contract TestERC20 { address public _pair =...
user avatar
  • 123
1 vote
1 answer
17 views

What does storageroot look like in a new contract?

Are the keys and values all from the code? will the nonce or balance be the key? why there is a default value of storageroot since there are always somethings real?
user avatar
0 votes
0 answers
17 views

Is there such a thing like default contracts for OpenSea?

So I have been going trough https://docs.opensea.io/docs . And I slowly start to understand how stuff works. What I do not understand is Why I have to deploy my own contract. Why can't I use some ...
user avatar
  • 123

1
2 3 4 5
30