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

difference between contract creation in web3 and in solidity

I created a contract named Pepito by calling new in web3: import Pepito from "./contracts_abi/Pepito.json"; const instance = new web3.eth.Contract( Pepito.abi, address,...
0
votes
0answers
28 views

Range error : Maximum call stack size exceeded

I am trying to deploy my contract written in solidity on a test network (Rinkeyby),But when i run the command "node deploy.js" i get the mentioned error in the title of this article which is ...
0
votes
0answers
14 views

Error at calling the memory function

I am using an remix ide for the smart contract development, at the time of compilation of the below code I am facing the error of expected primary expression. Could anyone help me out with this ...
0
votes
1answer
55 views

Unable to interact with a contract on Kovan network on Remix IDE

I am working on a project and I have successfully deployed a smart contract on Kovan test network, but for some reason, I am not able to interact with it in JS code. So, now I want to access it ...
0
votes
1answer
35 views

Deploy basic proxy with arguments

https://github.com/optionality/clone-factory/blob/master/contracts/CloneFactory.sol#L32 contains a code to deploy a basic proxy. This code misses a way to pass data to the proxied contract to init it. ...
1
vote
1answer
61 views

how to see contract that only has bytecode

I am looking at this contract - https://etherscan.io/address/0xf8681dad1ce4f1f414fb07fc07f81a3a82e91d8f#code but it turns out that there's only ByteCode and if I decompile it, the code it gives me is ...
0
votes
1answer
22 views

when do smart contract wallets need to sign transaction by themselves?

Do smart contract wallets ever store priv/pub keys or something ? Of course, It would be then seen on the blockchain if it did, but I am asking this because somewhere, I've read that sometimes smart ...
0
votes
0answers
17 views

wallet and smart contract connection

I am just here to make sure that i understand what smart contract wallet and what wallet means. These 2 guesses of mine are highly related so what my question is simple. Am I right about assuming the ...
1
vote
1answer
13 views

does selfdestruct clear/remove data?

I want to know if calling selfdestruct clears/removes data from blockchain or it still remains there. Looking at this link, CLICK HERE it says that data doesn't get removed. (first answer) Looking at ...
0
votes
0answers
16 views

parity hack - how does this work?

I am looking at the following contract https://eips.ethereum.org/EIPS/eip-1822#erc-20-token Look at the following line : Ensures no one can manipulate the Logic Contract. IMPORTANT: I am going to ...
0
votes
1answer
13 views

Factory Pattern Migration With Truffle

have a standard factory pattern for my contract and I am trying to get it up and running using Truffle Migrations. In my factory truffle migration script I have await deployer.deploy(ContractFactory); ...
0
votes
0answers
12 views

Use new to generate an instance of a sub-contract in a smart contract

When we write a smart contract, we can use the keyword new in the code to generate an instance of a sub-contract. I want to know whether the instance of this sub-contract has an address, and can ...
0
votes
0answers
33 views

store data in any slot

contract test { bytes32 private constant ownerSlot = keccak256("ownerSlot"); constructor(address _implementation) public { bytes32 s = ownerSlot; assembly { ...
0
votes
0answers
11 views

estimateGas - how does it work when there's an internal call?

I've read the following: The catch about gas estimation is that the node will try out your tx with different gas values, and return the lowest one for which your tx doesn't fail. But it only looks at ...
1
vote
1answer
18 views

bignumber in solidity - returned values

Let's say that Ethereum solidity returns a number from one of its functions and I get that into Javascript. Now ,because I write tests in my js application, I have to check if the returned value is ...
0
votes
1answer
21 views

solidity - check bignumber returned from solidity

I am using truffle, but that shouldn't make any difference here... When using contract's transfer mehtod, I want to pass a parameter - 1000000000000000000000000, but since this is too big, it results ...
0
votes
2answers
53 views

delegate call - msg.sender wrong value

pragma solidity >=0.4.22 <0.7.0; contract D { uint public n; address public sender; function delegatecallSetN(address _e, uint _n) public { _e.delegatecall(abi.encode(bytes4(keccak256(...
0
votes
1answer
36 views

ethereum - call and delegatecall not working

pragma solidity >=0.4.22 <0.7.0; contract D { uint public n; address public sender; function callSetN(address _e, uint256 _n) public { _e.call(abi.encode(bytes4(keccak256("setN(...
0
votes
0answers
12 views

what does link mean in truffle?

I saw the following : what does `deploy.link` exactly do in `truffle` I have safe.sol library safe { function safeMultiply(uint256 a, uint256 b) internal pure returns (uint256) { if (a ...
0
votes
1answer
11 views

truffle - should I create migrations files by myself?

I am using truffle. I run truffle compile and I get json files in build/contracts directory. Now, truffle says I should run truffle migrate , but in the migrations folder, I only got ...
0
votes
0answers
15 views

erc20 and tokensale how to use interface

I have ERC20 interface copied from here link - zeppelin Now, I have a contract called ERC20 which looks like this: contract ERC20Token is IERC20 { uint8 public decimals = 18; // other ...
0
votes
1answer
18 views

solidity - allowance delegation - what if the owner spent it already

So userA delegates his tokens to be spent by me to whoever I want. That's great. let's say userA's balance was 200Token. and he delegated 150 Token to me.. Now, userA can still transfer 180Token to ...
0
votes
0answers
15 views

deployment failed

Error: * Deployment Failed * "ERC20TransferLiquidityLock" is an abstract contract or an interface and cannot be deployed. Import abstractions into the '.sol' file that uses them instead of ...
0
votes
0answers
13 views

Is it possible for miner to tamper with the results when executing smart contracts?

When Miner A executes the smart contract, a result is generated and broadcast to the entire network. I want to know if this result may have been tampered with. If this is possible, how do other miners ...
0
votes
1answer
42 views

allowance - why not directly transfering?

I have a couple of questions relating ERC20... why is allowance needed ? It would be the same as if instead of approving my 10 tokens to some address to spend, I could directly transfer 10 tokens to ...
0
votes
1answer
33 views

execution reverted: DepositContract: reconstructed DepositData does not match supplied deposit_data_root

I am getting this error when deploying Goerli's Medalla Beacon Contract through Remix. execution reverted: DepositContract: reconstructed DepositData does not match supplied deposit_data_root input (...
0
votes
0answers
178 views

Timeout while attempting to connect and deploy in the Ropsten network

I am trying to deploy the contract in Ropsten network. It fails with the timeout error The same is deployed in Ganache without any issues. Please advice truffle-config.js require('dotenv').config(); ...
3
votes
0answers
49 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
23 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 ...
3
votes
2answers
29 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
14 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
30 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
61 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
86 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
63 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
36 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
58 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
16 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
60 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
38 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
167 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
32 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
26 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
10 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
32 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
18 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
28 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
18 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
161 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....

1
2
3 4 5
24