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
3 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
32 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
19 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
25 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
23 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
0answers
12 views

Buidler + Aragon: deploy contracts from a separate package [closed]

I have a Buidler package with smart contracts. It uses Buidler Deploy. I also have a Buidler + Aragon app package. I need the second package to be able to compile and deploy contracts from the first ...
0
votes
1answer
13 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
27 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
13 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
19 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
8 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
18 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
25 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
30 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
12 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
22 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
30 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
17 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
31 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
24 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
24 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
21 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
21 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
38 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
23 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
39 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
26 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
155 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
25 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
35 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
40 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
28 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
31 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
20 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
44 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 ...
0
votes
2answers
35 views

Stuck ETH in Smart Contract

Can somebody please help me? Created and deployed a smart contract and now ETH is stuck in it and won’t show in the creator’s account. any way to get it using the creator’s PK? Need help so badly, ...
0
votes
1answer
23 views

Can we not allow to read/write contract from ethereum explorer?

Is there any way to not allow reading and writing contract from ethereum blockchain explorer? One can view contract code, ABI, and every other information once the owner verifies contracts. Is this ...
1
vote
0answers
86 views

How to deploy uniswap contract with open zeppelin?

I was following the quick start here which suggests to "Deploy the UniswapV2Factory" under the writing tests header. I'm using OpenZeppelin and have Ganache running but I wasn't able to ...
1
vote
0answers
12 views

Transaction from non-miner node is not getting mined sometimes

I have a private Ethereum network containing 2 nodes,NodeA and NodeB. When I initiate a sendTransaction from NodeA(non-mining node) to deploy Ethereum contract using JSON-RPC, the transaction hash is ...
1
vote
1answer
32 views

Truffle - deploy and interact with a contract locally from a script

I have created a contract, wrote a migration and a test. When I run truffle test the contract is deployed locally and then the tests are run against it. All is working fine. I also added a function to ...
0
votes
1answer
12 views

How to deploy smart contract using Remix 0.8.0 and MetaMask?

How do I deploy a contract on a test network using Remix 0.8.0 and MetaMask on a Firefox or Chrome browser?
0
votes
0answers
13 views

Can you use biconomy or GSN to pay for gas when deploying a contract?

I'm building a small dapp to allow users to deploy smart contracts without needed gas, where I'll use GSN or biconomy. I'm not sure you can use meta-transaction services like these for transactions ...
0
votes
1answer
19 views

Function not returning address when using web3 provider

I have a contract that works fine when only using remix. I needed to test the block size and block number. here someone suggested me to use ganache which I did but now I don't get the output I'm ...
0
votes
1answer
14 views

Etherlime Infura Rinkeby deployment causing ECONNREFUSED 127.0.0.1:443

I’m trying to deploy to Rinkeby using Infura (using Etherlime), but am getting a strange error: 'Error: connect ECONNREFUSED 127.0.0.1:443\n' + ' at TCPConnectWrap.afterConnect [as oncomplete] (...
1
vote
1answer
20 views

Get deployed contract dynamically in node JS

I am using Node JS and ethereum smart-contract. Every time contract gets deployed new addresses generated. Is there a way that node JS always gets an updated address of a contract? Any API so that I ...

1
2 3 4 5
22