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

Is there any API for contract deploy in ropstan testnet? [duplicate]

To deploy contract through API on ropsten is there any API?
0
votes
1answer
162 views

web3.eth.getAccounts() never give any output

const deploy = async () => { **var acct = await web3.eth.getAccounts();** console.log("ac", acct); } deploy(); even the console is not getting printed,what could be the reason? ...
0
votes
2answers
457 views

How to pass arguments to the constructor while testing an contract using web3

I need to test my contract using web3 and ganache-cli. In my contract, I have to send an argument to the constructor function. How to do it while deploying it with web3. factory = await web3.eth....
0
votes
1answer
504 views

How to deploy a smart contract using Infura and web3js@1.x.x on NodeJS?

I have an application written in NodeJS that each time it starts has to deploy a smart contract. Once the contract is deployed this application will interact with it making some transactions and ...
0
votes
1answer
40 views

Is it okay to define the following smart contract that a accepts funds from two parties?

I want to deploy a smart contract that receive funds from two parties. The contract is initialized with some ethers from person (call it revealer), and another Recipient (name it fineRecipient) who ...
2
votes
0answers
41 views

Why I can't use two functions with same name, but different parameters

I have a function which returns address but it gives me error if I try to read it. I'll explain by a quick example: Solidity: contract TestOneReturn { mapping(uint => uint) m_Data; ...
1
vote
0answers
321 views

web3.eth.getAccounts() : Cannot read property 'map' of undefined

const HDWalletProvider = require('truffle-hdwallet-provider'); const Web3 = require('web3'); const provider = new HDWalletProvider( 'passphrase', 'rinkeby.infura.io/v3/mytoken' ); const web3 = new ...
0
votes
1answer
22 views

Condition for changing a smart contract

I'm developing an application using smart contracts. I wonder if it is possible to establish different states for a contract, for example: User 1 determines a condition X, but also determines that ...
0
votes
0answers
22 views

Contract deployed address

Is there a way to save the deployed contract address into a variable. Something related to a constructor that save the deployed address into the variable?
1
vote
2answers
48 views

What is the difference between these 2 smart contracts?

I noticed some smart contracts have there name,symbol, and supply set up like this example #1 and setup a defined constructor. Notice, they did not fill in the "string public symbol", "string public ...
1
vote
2answers
21 views

What is the difference?

I noticed some smart contracts have the wallet address of the creator in the smart contract to send the tokens to the wallet like example #1: Example #1: constructor() public { symbol = "...
0
votes
0answers
83 views

Contract deployment not working anymore

So I have this following code that was working a couple of weeks ago and today I decided to run a few tests and it just doesn't do its job anymore. function approve(rid, guest_wallet, ctr_key, dti, ...
0
votes
1answer
187 views

DeployError: Provided address is invalid,the capitalization checksum test failed,or its an indrect IBAN address which can't be converted

I have the following code: var account = web3.utils.toChecksumAddress("0x249eb..") const accounts = await web3.eth.getAccounts(); let Contr = new web3.eth.Contract(abi, {from: account, gas: 47000, ...
2
votes
1answer
308 views

Why do truffle compile or migrate commands fail silently?

Truffle v5.0.3 config: truffle-config.js module.exports = { // See <http://truffleframework.com/docs/advanced/configuration> networks: { development: { host: "127.0.0.1", //also ...
0
votes
1answer
44 views

ERC223 Token doesn't transfer while working with data field in transfer() function

Instead of showing tokens the output shows Internal transactions or just contract interactions. what changes are needed to transfer tokens to any other ERC223 receiver contract? function transfer(...
0
votes
1answer
31 views

How to map one to many

I am working on rent agreement and I have a situation here One landlord can have multiple properties every property have different details (property details, values) now I want to link property ...
2
votes
1answer
433 views

Cannot deploy contract on private network with truffle: gas required exceeds allowance or always failing transaction

I'm writing a contract based on the ring mixer contract from here https://ropsten.etherscan.io/address/0x5e10d764314040b04ac7d96610b9851c8bc02815 I've tested it with ganache. Everything worked fine ...
1
vote
0answers
34 views

Passing constructor arguments in the NewContractCreation in go-ethereum

I am trying to create a transaction to deploy a contract using the types.NewContractCreation() method in the core folder of go-ethereum. However I don’t understand how to pass the parameters of the ...
1
vote
0answers
38 views

All gas consumed when deploying contract

When deploying a contract, my transaction fails (flag status set to 0) and all gas is marked as used. What could be the possible reasons? Any help appreciated Edit with the solidity code in ...
1
vote
2answers
30 views

Call to smartcontract without address

Lately I had a conversation with someone who says that it is possible to make a call to the smart contract without giving the address. He said it's possible to send certain parameters and by them the ...
0
votes
1answer
39 views

Import a contract hosted on a testnet from it's address

I have a smart contract that imports another, and I'm wondering how to deploy them to a testnet. Right now, one contract imports the other locally; import "./firstContract.sol" contract ...
0
votes
0answers
75 views

getting error solidity-member-transfer-not-found-or-not-visible-after-argument-dependent

I am trying to create one contract for Lottary app however I am getting error as " browser/test.sol:103:9: TypeError: Member "transfer" not found or not visible after argument-dependent lookup in ...
0
votes
1answer
239 views

Getting error : Error encoding arguments: SyntaxError: Unexpected number in JSON at position 47

While developing a Smart Contract with Solidity on Remix, after creating the contract I'm trying to calling function setGrantAddress: mapping (address => uint256) public balanceOf; but when I call ...
0
votes
1answer
109 views

Unable to input address[] parameter in remix

I need help for deploy below smart contract on remix IDE. I have facing a problem as I need to input to 'setgrantaddress' as address[], How to input data in it? There is two file name owned.sol and ...
0
votes
1answer
106 views

Calling a contract's function with input parameters and passing ether from Geth/Web3

I have deployed a smart contract which basically splits the incoming funds to the specified addresses based on the entered ratio parameter. Please find the code below: pragma solidity ^0.4.23; ...
1
vote
1answer
563 views

Remix - Contract creation initialization returns data with length of more than 24576 bytes. The deployment will likely fails). What can be done?

I get the following error when deploying my contract in Remix: Contract creation initialization returns data with length of more than 24576 bytes. The deployment will likely fails. More info: eip-...
0
votes
1answer
79 views

Error: Returned error: VM Exception while processing transaction: revert

pragma solidity ^0.5.0; contract MultiSignatureWallet { uint constant public MAX_OWNER_COUNT = 2; event Confirmation(address indexed sender, uint indexed transactionId); event Revocation(...
1
vote
1answer
63 views

Zero knowledge contingent payment on etherum?

I know that bitcoin supports Zero knowledge contingent payment (ZKCP) , can etherum support such ZKCP Payment ?
1
vote
1answer
215 views

Importing in SOLC to deploy smart contract

I don't run an Ethereum framework like Truffle and I want to deploy a smart contract using infura node. The smart contract is very simple: pragma solidity ^0.5.2; import "http://github.com/...
0
votes
1answer
410 views

TypeError: Return argument type bytes32 is not implicitly convertible to expected type (type of first return variable)

I have one issue while deploying the below contract.could anyone help me to find the issue as unable to find issue. pragma solidity >=0.4.22 <0.6.0; contract Lottery { address payable[] ...
0
votes
1answer
460 views

Contract deployment using web3.eth.contract(abi) with constructor arguments

I'm trying to deploy the following smart contract: pragma solidity ^0.5.00; contract TestContract { address public owner; string public word; constructor(string memory _word) public{ ...
0
votes
2answers
41 views

Optimization Exception Remix Editor

I am trying to compile my solidity code in remix editor. I keep getting this error "Optimization exception during compilation". I was using solidity version 0.5.2 till day before yesterday. Now, It is ...
1
vote
2answers
67 views

How truffle selects the address with which it deploys a smart contract with and where does it gets it's private keys?

I am reading truffle tutorials for deployment smart contract to gauche, I've never deployed any smart contract to real network. Now when migrate (deploy) a smart contract I get these info: ...
0
votes
2answers
46 views

Can smart contract send tokens/eth if it doesn't have a send function?

Let's assume you just created 1,000 tokens at address 0x012345. You, the owner of 0x012345 sent by mistake all tokens and 1ETH to a smart contract with address 0x987654. This smart contract doesn't ...
1
vote
1answer
92 views

What does etherscan mean by “Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)”?

I'm inspecting a contract on etherscan, at the following URL: https://etherscan.io/address/0x5cb5f46a655c02889172323760d12d0e5d83cdaf#code At the bottom of the web-page, I see two sections: ...
1
vote
1answer
68 views

How can I retrieve the constructor arguments used during contract deployment

I know how to extract the constructor arguments out of the transaction object returned from a contract-deployment operation. It is explain in web3.js official documentation here. But this is not an ...
1
vote
0answers
46 views

`etherlime deploy` fails with Error: invalid sender

I am trying to deploy a contract with etherlime to a private permissioned Quorum network: etherlime init --> OK etherlime compile --> OK etherlime deploy --> Error Error: Compilation ...
2
votes
0answers
113 views

I want to use Ledger Nano S to deploy the contract, but not working

I wanted to deploy the contract with the Ledger Nano S wallet, but not working on truffle. I installed npm package 'truffle-ledger-provider' and followed the practice. But I got an error ...
1
vote
0answers
50 views

state channel between smart contracts

In my scenario, there are data sellers and data buyers which might be persons or organizations. I would like to create a smart contract for data seller and another smart contract for data buyer where ...
1
vote
1answer
187 views

Error that contract is not convertible to expected type address

In older solidity compilers this code snippet works. In newer compilers, I get an error. Can someone what I need to change so it works again? I get the following error message: "Type contract ...
0
votes
1answer
36 views

When does a Smart contract get executed/called

I'm fairly new to Ethereum and Smart Contracts. After i publish a Smart Contract on the Chain, on what ways or how will it be executed? Who can call my Smart Contract? And under what conditions? I'm ...
1
vote
1answer
36 views

General question about totalSupply: fixed since first moment (aka Bitcoin) or indefinite (aka Ethereum)?

In an answer to a general question about totalSupply, I gave some rough indication about the aim of token deployer vs totalSupply: Why is the totalSupply of this token statically initialized to ...
1
vote
2answers
72 views

What is the main use of approveAndCall() function and _extraData?

function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); if(!...
0
votes
1answer
85 views

Why is the totalSupply of this token statically initialized to 5500000000?

contract UnixERC20 is StandardToken { function() { throw; } string public name; uint8 public decimals; string public symbol; string public version = 'H1.0'; ...
0
votes
3answers
206 views

Contract methods calls return empty array

I'm quite stuck with this issue. It seems like it must work, but it doesn't :D Have a contract on rinkeby network which is working perfectly through remix(load by address) and truffle console. ...
0
votes
1answer
50 views

Error while deploying smart contract- This contract does not implement all functions and thus cannot be created

I have written and complied a smart contract written in Solidity for token and crowdsale. Compilation was successful with no errors in Remix IDE. Here is my smart contract pragma solidity ^0.4.25; ...
1
vote
1answer
169 views

Infura not broadcasting contract deployment transaction

I am attempting to deploy a contract via an Infura node, and I am the point where a txhash is generated from the sendSignedTransaction() web3 function. However, after the txhash is generated nothing ...
0
votes
1answer
258 views

ethers.js ContractFactory not deploying

After following the ethersjs 4.0 documentation I am not able to deploy a contract. When running browserify I get an "Unexpected Token" error message at the line let contract = await factory.deploy("...
1
vote
3answers
70 views

Understand a smart contract semantics

I am writing to understand a smart contract which seems quite "meaningless" to me. The contract is at (https://etherscan.io/address/0xd4fa166d5ffe8f78230fc05e6850881dc08b2da2#code) but indeed over ...
1
vote
1answer
99 views

contract does not gets deploy to rinkeby via Infura

I am trying to deploy my contract to Rinkeby network via Infura. But it actually does not get deploy to network when i run node deploy.js terminal does not spit out the address at which it is deployed....