Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The act of pushing a compiled smart contract in byte code to the Ethereum blockchain.

2
votes
2answers
23 views

how do you sign transactions programatically?

imagine there's a dapp you're building and on your website users type the receiver address, the value and what you do is send from that user's address to the receiver's address the value ether. My ...
0
votes
2answers
18 views

This contract does not implement all functions and thus cannot be created. for myfirstcontract contract Bank is working [on hold]

pragma solidity ^0.4.24; contract Bank { uint private value; function Bank(uint amount) { value = 10; } function deposit(uint amount) { value += amount; } ...
1
vote
0answers
14 views

how to get public key from metamask? [duplicate]

I'm creating a dapp. and I need my users on my website to provide public keys. As I am lazy to write a script which generates public/private keys automatically, I want to suggest an idea that they use ...
0
votes
1answer
11 views

Account used to Deploy not same as account associated with contract

So I am testing out a new contract I have been working on in Remix. I expected that the Account I selected would be the one associated with the actual contract, but it is not. In fact, I tried it a ...
2
votes
1answer
24 views

Deploying smart contract through Truffle

I want to know when deploying smart contract using truffle, is there a way to do that without using the migration files? I won't be requiring the Migration features.
0
votes
0answers
18 views

How to create JSON file for an Rust Contract?

I'm trying to build my own Rust Contract. (I'm referring https://github.com/paritytech/pwasm-tutorial) But Json file is not creating and ABI is not generated. How can I fix this issue? Thanks in ...
1
vote
1answer
25 views

Copy state from one contract to another

I am experimenting with the zeppelin os upgradeable contracts but what I only need for my contract is to keep one specific state array when I deploy to another address. Avoiding proxy issues, upgrade ...
2
votes
1answer
59 views

call other contract's external function , the error: The contract code couldn't be stored, please check your gas amount

when I deploy a contract, the truffle frame told me this error :“The contract code couldn't be stored, please check your gas amount”。 the solidity code is: 1) Base.sol pragma solidity ^0.4.22; ...
1
vote
2answers
28 views

Make Truffle deploy a contract and pass it as an argument to another contract's constructor

I have two contracts, contractA & contractB. I want Truffle to first deploy contractA, then pass it as an argument to contractB's constructor. This is what I am currently trying, but contractB ...
1
vote
1answer
16 views

questions regarding how many bytes each type is

I have questions about how many bytes each type might be. Question 1) now() timestamp. i think it's uint which means uint256 which means 32 bytes? Am I right? Question 2) what does bytes32 mean? ...
0
votes
2answers
22 views

Extending Issued ERC 20 Token

I have already issued my ERC 20 token. But I want to add a time locking functionality to the token so the tokens issued during pre-sale / ICO will be time locked in user's wallets. Is this possible?
1
vote
1answer
30 views

Running out of gas when deploying contract in Ropsten Testnet

I am trying to create a Fomo3d clone contract in Ropsten testnet for debugging purpose. Here is the code: https://etherscan.io/address/0xa62142888aba8370742be823c1782d17a0389da1#code But I am ...
1
vote
2answers
28 views

Publishing contracts with libraries using web3.py

Im trying to publish contracts with libraries in them and im getting the below issue. Contracts without libraries publish just fine. Can someone who might have faced this issue before advise what the ...
1
vote
0answers
38 views

Unable to deploy contract due to extremely high gas estimate

I'm getting issues with the following contract for no obvious reason (I'm banging my head over this problem last 8 hours), I'm getting: Gas estimation errored with the following message (see below). ...
2
votes
1answer
24 views

Question about require keyword in solidity

Question 1) Let's imagine I have this code require(userVotes[msg.sender] == 0); presidents[_id-1].voteCount++; userVotes[msg.sender] = _id; so If I make a call to this function, and it doesn't pass ...
1
vote
1answer
23 views

mapping for msg.sender doesn't seem to work

state Variable is this : mapping(address=>uint) public userVotes; now i have a function : function votePresident(uint _id) external { presidents[_id-1].voteCount++; userVotes[msg....
1
vote
1answer
31 views

How to solve Error: Invalid JSON RPC response on DigitalOcean

I have deployed my dapp front end and backend on Digital Ocean. On running the server.js I am getting below error (node:30490) UnhandledPromiseRejectionWarning: Error: Invalid JSON RPC response: "" ...
1
vote
1answer
23 views

why doesn't it take any gas when making public view function but still writing in storage?

I have four questions. I hope you can help me. Good idea questions, maybe this will help others. Thanks in advance. Question 1) I know that if you don't write anything to storage, then That function ...
0
votes
1answer
19 views

does it cost gas when executing view or pure function in solidity?

Let's suppose i have the following code in ethereum's solidity function: function getArray() external pure returns(uint[]) { // Instantiate a new array in memory with a length of 3 uint[] memory ...
1
vote
1answer
23 views

Why does adding a string state variable cause out of gas error?

So when I try to add two (or even just the one) state string variables to the Boostr contract (title & description) I get the following error There was a problem deploying the contract: Error: ...
1
vote
1answer
16 views

ethereum smart contract code question

pragma solidity ^0.4.24; contract MemoryAndStorage { mapping(uint => User) users; struct User{ uint id; uint balance; } function addUser(uint id, uint balance) ...
1
vote
1answer
32 views

What value to set for Web3 provider when dapp is deployed to Heroku or other Hosting site

I am trying to host my dapp on Heroku and smart contract on Rinkeby network. My dapp has a front end in node.js and jquery and an express backend server that I use to listen to solidity events and to '...
1
vote
0answers
37 views

Gas estimation error in functions with external calls

My front + smart contract is working on localhost. Now, I deployed at Rinkeby and all functions that has external calls are not working. Metamask says there will an exception even before the ...
1
vote
1answer
12 views

binary size of contract

If one imports another contract and instantiates it with 'new', then I assume the binary of that imported contract must be fully included in my contract (increasing its deployment size accordingly). ...
2
votes
1answer
43 views

How to add website link to erc20 token on etherscan.io

How can we add this official site link to our deployed contract? Like in the image below: Here is my deployed contract address: https://etherscan.io/address/0xab73a739729a21b2299761408507556d2719af89#...
2
votes
2answers
26 views

Smart contract - require token balance in constructor

I want to build a smart contract which can only be constructed, if there's an amount x of a specific ERC20 token available to spend for this contract. So either the contract has to be allowed to spend ...
2
votes
2answers
23 views

How can we deploy smart contract, its front end and backend server based on Mongodb to Rinkeby [closed]

I have designed a dapp (based on nodeJS and Mongodb) which uses IPFS, Oraclize, a front end and off chain Mongodb server (based on mLab). Till now I was using Ganache for all local testing and ...
0
votes
1answer
17 views

Does an Ethereum contract address hold two different kinds of files, one for the contract bytecode and another for the ABI?

Does an Ethereum contract address hold two different kinds of file, one for the contract bytecode and another for the ABI?
1
vote
1answer
12 views

Implications/Impact Analysis of increasing the transaction size to 64KB in tx_pool.go to support bigger bytecodes deployment

As I have increased the transaction size to 64KB in tx_pool.go and rebuilt geth to support bigger bytecodes deployment (i.e., bigger, more complex and sophisticated smart contracts), would like to ...
0
votes
0answers
17 views

Minimize the deploy cost of multiple-instance contracts

I am going to create a contract root with MANY child contracts. Is there a recommended way to minimize the deploy cost of the child contracts? One possibility is to write some of the functions of ...
0
votes
1answer
39 views

Truffle Migrate SyntaxError: Invalid or unexpected token

I am trying to follow the truffle pet shop tutorial and I am doing my first truffle migration. After this command: truffle migrate I get this error: SyntaxError: Invalid or unexpected token ...
0
votes
1answer
34 views

contract compiles and fails to deploy on Remix or local

GitHub File Link I can compile and deploy CredentialOrgFactory, and compile CredentialFactory but not deploy REMIX error: creation of CredentialFactory pending... [vm]from:0xca3......
0
votes
1answer
40 views

Infura not broadcasting my transactions

I am using Infura with the mainnet and web3py to interact with smart contracts and send transactions. Last week this same code worked fine, but today, trying to send the transaction for the deployment ...
0
votes
0answers
10 views

How parameters encoded?

I have a function in smart contract: function ERC20Token(uint256 _initialAmount, string _tokenName, uint8 _decimalUnits) I am using web3j to encode the function with params (100, "KToken", 100) and ...
0
votes
0answers
55 views

web3 remix cannot deploy contract

I have a problem when deploying smart contracts on remix. When I click create, I can see that transactions are passing through, from the blockchain explorer. I clicked multiple times, and this is the ...
0
votes
1answer
11 views

If a contract didn't allocate initial supply,what will happen?

Please Have a look at this contract 0x253b898233d2f29ed9c8d499789d651cf9d1818c created this contract,but if you check its source code,you will notice that the contract name is uppercased: Yet the "...
0
votes
1answer
31 views

Contract deployment out of gas, but was created anyway?

I have deployed a contract with Parity on Kovan, which did not show up in the contracts menu after contract deployment was done. I had to watch it manually to be able to see it in the contracts menu. ...
0
votes
4answers
45 views

Is our smart contract required gas,every time it executes.

form my understandings, after the first execution of a smart contract, the network will return the remaining gas to the contract sender. if so, how will the contract obtain gas for future execution??...
0
votes
1answer
53 views

Quorum - oversized data during contract creation - contract code size limit

While creating contract, I am getting the error "oversized data" during contract creation. Other than modifying the go-ethereum code file to increase the maxCodeSize, or splitting the contracts up, ...
0
votes
0answers
18 views

Etherscan: Verify and Publish Source Code - Error! Library Name and Address was provided but not used in the contract

Tried to verify my Smart Contract on Etherscan for Ropsten. Smart Contract is a library which actually also imports another library (which is already verified). Getting following error Error! The ...
1
vote
2answers
37 views

Ownership isn't allocated in the contract?

I've taken the below contract as an example from a tutorial and changed items highlighted in bold, as per IDE errors. What the contract should do is allocate ownership of the item to the account that ...
0
votes
1answer
27 views

Contract structure for storing user application

I have a Nodejs application in which users fill up multiple forms and that data is saved to the centralized DB i.e MongoDB. Admin can review the user data and can push the user data to Blockchain to ...
0
votes
1answer
125 views

Deploying contract with parameters using web3.js and Node.js

I try to deploy a ERC721 contract. Which is from OpenZeppelin. My contract constructor wants two input string fields. constructor(string _name, string _symbol) public { name_ = _name; ...
0
votes
0answers
16 views

Remix IDE: Pass address as parameter / argument - difference double quote with and without

It seem's like Remix let's me deploy with parameter 0x2140eFD7Ba31169c69dfff6CDC66C542f0211824 but also with "0x2140eFD7Ba31169c69dfff6CDC66C542f0211824" Where is the difference using the double ...
0
votes
1answer
29 views

Can we store a deployed contract address in Remix Solidity IDE?

Suppose I need to use deployed addresses of three different contracts in any other program, then every time I need to copy the address from previous deployed contract and paste it, so is there any ...
1
vote
1answer
17 views

Ethereum Contract Simplify

I'm confused about 'contracts' in Ethereum. When do I need a 'contract'? For the scope of my app: I want user to be able to generate ETH address, receive and send out ETHER and I should be able to ...
0
votes
0answers
36 views

Remix - Solidity IDE web3Provider issue

I am facing issue when i change the environment to WEB3Provider and deploy it to get account (to use in my JS file for GUI) then it shows me red cross in the console. Below is the screen shot of my ...
0
votes
3answers
60 views

How to allow an account to withdraw from another one?

The goal is to create a contract which allows party B to withdraw from party A's account according to some formula. I don't want to use an escrow model, rather just to: Let A attest that they are ...
0
votes
0answers
41 views

Listing all the smart contracts deployed on ethereum [duplicate]

I want to list all smart contracts deployed on a private Ethereum chain, using Nethereum, and also those which were deployed by a certain address. I have seen here and here but I cannot get anywhere ...
0
votes
0answers
22 views

Contract Deployment Through MyEtherWallet calculation Gas Limit -1

I found a similar question here, which still have not any solution. I compiled a contract in Remix and also deployed it in Testnet by signing transaction through Metamask. It worked fine. Now I ...