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
0answers
5 views

What happens in the account state when we pre-send ethers to a smart contract?

I'm asking this question in relation to this one : pre_sending Ether where the OP asked in a comment of the answer about what happens at the low-level when pre-sending ethers to a smart contract. As ...
0
votes
1answer
13 views

Pass mapping as constructor parameter

I'd like to save the contract addresses from DAI and UNI into a mapping when calling the smart contract constructor depending on the network. Below is a minimalistic example that works fine: contract ...
2
votes
1answer
21 views

Can I change the comments in a contract and still pass Etherscan verification?

Suppose that you have a contract, someone audited it, and you would like to use that specific version for compilation and deployment to Ethereum. Now, you want to verify the source code on Etherscan, ...
1
vote
0answers
12 views

Deploy contracts without deploying Migrations

I would like to deploy my contracts to mainnet using truffle. I figure it's the easiest and safest way to do it since I already deploy to testnet using truffle. The problem is I don't want to deploy ...
0
votes
0answers
6 views

Issues with autogenerated go file while using abigen

I have a simple sol file message.sol pragma solidity >=0.5.10; contract Message { string public message; constructor(string memory initMessage) public { message = initMessage; ...
1
vote
1answer
42 views

Deploy from Remix to Quorum using password? “authentication needed: password or unlock”

I can SSH into the box that is running Quorum: run geth with the flag --allow-insecure-unlock geth attach new-node-1/geth.ipc personal.unlockAccount(eth.accounts[0]) I'm interested in knowing if I ...
1
vote
1answer
44 views

What is mined? Transaction or block?

Until today, I thought the transactions are just gathered until big enough to construct a block. Once it is constructed, the ethereum miner will race to find a secret nonce, and the block will be ...
1
vote
0answers
20 views

Can I deploy a smart contract from studio.ethereum.org to mainnet?

I found this website quite useful: studio.ethereum.org. However, it seems that I cannot deploy smart contracts from there to mainnet. Is this correct, or is there a way to do it?
1
vote
1answer
43 views

Storage Address of Smart Contract Variables

I need to know storage address of solidity smart contract variables before its deployment. how can I get this?
0
votes
0answers
28 views

Can we deploy old deployed NFT contract to Ethereum 2.0?

I have already deployed contract on Ethereum. Now I want to deploy it on Ethereum 2.0, is it possible? According to some resources Ethereum 2.0 does not support for smart contract deployment. Thank ...
1
vote
1answer
30 views

Infura: certificate has expired error when deploying on Rinkeby

I was trying to deploy some contracts on Rinkeby using Infura, and got the following error: Error: certificate has expired\n at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34)\n at TLSSocket....
0
votes
1answer
13 views

Trying to do interaction between 2 contracts. But compilation failure showing should be declared Abstract

WinCon.sol EnemyCon.sol To create interaction, I am creating interface for EnemyCon in WinCon.sol, but Remix is throwing compilation error stating "EnemyCon should be marked abstract". I ...
0
votes
1answer
47 views

What happens if someone DOS's my infura api link?

I have an infura link, and put it on my frontend as the default provider url. What happens if someone DOS's that link and uses up the daily api request limit? It's unclear how infura protects against ...
0
votes
0answers
22 views

How do I verify a contract that has imports on etherscan?

There is an answer from 2017 here saying that it's not possible but it's been 3 years since then so hopefully there is progress. My Vyper contract looks something like this: import ERC20 as ERC20 ...
0
votes
0answers
57 views

What factory (UniswapV2Factory) shoud I use when deploy Sushiswap clone?

Hi I'm forking Sushiswap and about to deploy contract to mainnet. While I'm writing deploy_contract.js in Truffle. Which Factory shoud I use in my migration code? I saw several code example but ...
1
vote
0answers
28 views

Private PoA deployment leads to 'invalid gas used' error

I'm trying to deploy a contract to a private clique chain running on two devices (laptop and raspi). Deploying the contract when running multiple nodes on a single device worked fine as per usual, ...
0
votes
1answer
18 views

Cannot verify source code smart contract on Etherscan! PLEASE help me

Link for the contract on Etherscan: https://ropsten.etherscan.io/address/0x339237da476f50777da2d04b05037a805e46fcdb Arguments Type: String,String, uint8 ~ "FinanceToken", "MYFI", &...
0
votes
0answers
9 views

How to deploy a compiled stateless contract and which doesn t have creation code/transaction?

I got a deployed contract bytecode from an internal project which I d like to publish on the mainnet. The problem is it s just the bytecode without the creation code. Is there a simpler way to deploy ...
2
votes
1answer
28 views

the same struct in array and mappings

Let's say I have a struct. struct test { uint x; } test[] all; mappings(uint => test) map; function bla(){ test memory structTest = test(5); all.push(structTest); map[10] = structTest; ...
0
votes
0answers
14 views

How deployment in the ETC network is cheaper than in the ETH network?

What factors differ in deployment & transaction cost in ETC compared with ETH network? I checked the gas for deployment in ropsten and kotti which costs the same at a gas price of 20 gwei. In what ...
1
vote
1answer
24 views

how to transfer from contract to another account or contract

I have a function: function sendEther(address payable _to, uint amount) public payable returns (bool) { bool success = _to.send(amount); return success; } Now, how transferring ...
0
votes
0answers
11 views

solidity call function how gas gets forwarded

It's said that: someAddress.call.value(y)() will send the provided ether and trigger code execution. The executed code is given all available gas for execution making this type of value transfer ...
0
votes
0answers
32 views

Deploying Smart Contract On Infura (Kovan Testnet) Using Web3 & Truffle HDWalletProvider

For better or worse, I'm following a tutorial from late 2018 to help me understand how to deploy a smart contract on Kovan testnet. I'm aware versioning might be an issue, so before I show the deploy....
0
votes
1answer
28 views

Who communicate on a private ethereum network?

I'm new to Go-Ethereum (GETH) and would like to ask a question that may seem quite dumb. Let's say that I create my own private ethereum blockchain with GETH (I created accounts, the genesis block...),...
0
votes
1answer
32 views

Free transaction on a private ethereum blockchain

I have developed a Dapp powered by Ethereum with truffle. And I want to deploy it on a private blockchain. But I have one question to ask before that. My question is: can I make in sort that my Dapp ...
1
vote
0answers
13 views

Is there a way to deploy contracts with circular reference in 2 steps using create2?

Circular reference meaning contracts know each other addresses. So instead of deploy foo deploy bar(foo.address) foo.init(bar.address) Use some clever tricks to have only 2 deploy steps without an ...
0
votes
1answer
29 views

how do i pass by reference?

I have a couple of questions. First: So, In a function, i created memory array. I want to pass this memory by reference to another function.. function test2() public returns(uint a) { uint[2] ...
1
vote
0answers
36 views

copy array from storage to memory

uint[2] testStorage; function assemblyStorage() public returns (uint a, uint b){ testStorage[0] = 5; testStorage[1] = 10; uint[2] memory testMemory = testStorage; ...
0
votes
1answer
29 views

why does this contract ask to increase gas limit?

string test; function assemblyStorage() public payable returns (string memory a){ test = "good"; assembly { a:=sload(0) } } I am trying to return the string ...
1
vote
0answers
18 views

why do i have to specify memory in arguments?

My function body looks like this: function element(uint a, uint b, uint[2] memory c) public returns(uint e, uint f, uint g, uint k) { I am wondering why do I put memory keyword before c ? I know that ...
1
vote
0answers
17 views

why mload(0) returns wrong number?

int x; // Storage slot #0 mapping (uint => uint) y; // Storage slot #1 uint [] z; // Storage slot #2 function element() public returns (uint a, uint b, uint c) { z.push(45);...
1
vote
0answers
46 views

how do storage and memory variable work?

So, in an ordinary programming language, we have stack and heap. Reference types such as array gets stored in heap. and the variable which holds the address(pointer) of this array is stored in stack.. ...
2
votes
1answer
26 views

where does function variables get created?

function element() public returns (uint) { uint test = 20; return test; } Where would test variable be created ? in memory or stack ? The funny thing is from testing assembly, I can see that it'...
1
vote
1answer
32 views

sload. assembly with struct - not working in solidity

struct S { uint128 a; uint128 b; } S test1; function assemblyStorage() public returns (uint a, uint b, uint c, uint d, uint f, uint g){ test1 = S(5,10); assembly { a:=sload(0) } } ...
1
vote
1answer
22 views

how does memory layout work?

I am trying to understand how https://solidity.readthedocs.io/en/v0.7.2/internals/layout_in_memory.html works. function test(uint a) public { uint test1 = 20; uint[1] testArr; testArr[0] = ...
1
vote
1answer
24 views

How is caller's data related to bytecode?

I know that smart contract is deployed as bytecode. When we call a function from application, we use the encoding with the help of ABI and we get some bytes. let's say 220 bytes. These are the bytes ...
1
vote
1answer
40 views

contract inline assembly - return array parts by using assembly

I've a couple of questions. mload function returns the data that resides on the address we pass to mload. Is this correct ? add function is used to give us the address from 0 to whatever we pass. ...
0
votes
1answer
24 views

why separate assignments are better than single?

I've read that: It is more gas efficient to initialize a tightly packed struct with separate assignments instead of a single assignment. Separate assignments makes it easier for the optimizer to ...
1
vote
1answer
44 views

how does contract cost less gas in structs?

I have a couple of questions. we have int types as uint8, uint16, uint32, etc. I read that : Normally there's no benefit to using these sub-types because Solidity reserves 256 bits of storage ...
1
vote
0answers
33 views

How to test your smart contract against currently existing ones on mainnet locally using Truffle?

Background I am fairly new to smart contracts and am currently experimenting using Ganache and Truffle to test on my local machine. My goal would be to have the smart contract interacting with other ...
0
votes
0answers
163 views

Get private key of smart contract through remix

When I deploy a contract on to an eth network through remix, is there a way I can export that contract's private key out of remix?
0
votes
1answer
31 views

TypeError: Cannot read property ':Lottery.sol' of undefined. Please help in solving this!

I am a newbie and have just started building contracts. I am getting this error for this contract. Kindly help in solving this Code- For compile.js const path = require('path'); const fs = require('fs'...
0
votes
1answer
43 views

Error on calling initialize after deploying upgradable contract

I have deployed my contract to mainnet,All thing was fine but after I tried to call initialize method I got error and I think proxies not initiated How can I do now? I lost some Ether and nothing ...
1
vote
1answer
9 views

Deployed bytecode size seems to mismatch contract code size

I See some very weird solc behaviour with regards to compiled bytecode size. A much shorter contract compiles to bigger byte code. short contract: compiles into 439 bytes. while this longer one ...
1
vote
2answers
47 views

What's the advantage of interacting with a smart contract from another smart contract (instead of just calling it using something like Web3.js)?

I've noticed there are lots of tutorials online that talk about deploying a smart contract that allows them to interact with other smart contracts e.g. deploying a smart contract to interact with ...
0
votes
1answer
38 views

Cannot figure out how to set constructors and ABI for a contract

So I've been breaking my head over this for the last 2 days. I cannot seem to figure out how to get the constructors and ABI set up properly. I'm testing smart contracts by copying Sushi contract from ...
0
votes
0answers
34 views

Transaction error thrown with Vyper smart contract in MetaMask

I am trying to troubleshoot a problem I'm having with a crowdsale contract (written in Vyper). The contract compiles fine, and I can deploy the contract to Rinkeby without any problems, however when I ...
0
votes
1answer
23 views

How to check if the newly mined block contains a contract deployment using infura sdk?

I am trying to implement following scenario. Get a notification every time a new block is mined. Loop through/filter all the transactions in the newly created block. Check if the any transaction ...
1
vote
1answer
20 views

Find freshly deployed contracts on ethereum network

Hi folks is there a simple way using which I can find the latest contracts being deployed(for an erc20 token) on the ethereum network, I mean may be etherscan.io or something where I could see that ...
0
votes
1answer
45 views

How to verify transactions on ethereum blockchain?

I have a smart contract deployed in which there is a variable A whose value is updated through a public function fun_update(). I want to get all the addresses which updated that variable A through the ...

1
2 3 4 5
22