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

Questions tagged [contract-development]

Questions regarding the development of smart contracts

4
votes
0answers
370 views

Managing multiple Ether addresses in one contract?

Although I have a background in Bitcoin (creating the WLOX exchange platform), I am completely new to Ethereum. I am trying to find a way to manage multiple accounts/addresses as a pool to (1) be ...
4
votes
0answers
385 views

Event and/or watch does not work

I have a contract for a simple bidding scenario as below: pragma solidity ^0.4.9; /* Contract accepting biddings during 30 minutes */ contract SimpleBidding { address contractOwnersAccount; ...
4
votes
0answers
453 views

Ethereum and child chains like NXT/Ardor?

Doing some research on how we can implement this type of system with ethereum smart contracts. Currently the upcoming Nxt/Ardor system implements a child chain system where the main chain deals with ...
3
votes
0answers
70 views

How to parse through the logsBloom of a block or transaction using solidity

Currently trying to figure out how to parse through the logsBloom portion of block and transaction headers using solidity. I've researched the topic so far and have come to the understanding that RLP ...
3
votes
0answers
52 views

Methods and constants order in the contract ABI

Is it possible to annotate methods and constants order in the contract ABI before compilation?
3
votes
0answers
155 views

Benefits of library versus a plain contract (upgradeability)

I'm trying to find what the benefit is of a library. I found the following statements. (Please correct me if i'm wrong) Cost less gas to deploy Uses the storage of the calling contract the library ...
3
votes
0answers
146 views

Smart contracts and ICO questions

I am trying to learn and understand how ICOs and the smart contracts used in them work and I am having a hard time understanding the following: Take for example ParagoinCoin, you can see here that it ...
3
votes
0answers
479 views

Smart Contract for accepting multiple ERC20 Tokens

If I wanted a smart contract to send tokens based on the exchange price of the ERC20 token received, or any agreed upon value in US dollars how would I do so? For example, If i wanted my tokens to ...
3
votes
0answers
136 views

Identity valuation using smart contracts

Hi I'm currently exploring whether it makes sense to build a platform which would use a blockchain to verify a user and the data that they would add to the platform. Very simple example would be ...
3
votes
0answers
255 views

Storing a truffle contract interface in version control

What I'm doing When I compile and deploy a contract using Truffle, I get a .json build artifact that contains information about where the contract is deployed on the network (its address). So far I ...
3
votes
0answers
31 views

Is there any way to generate cheap proofs of Ethereum's state?

A contract on the Ethereum network can interact with other contracts within it without requiring any proof, because the system itself defines methods for cross-contract communication (SEND, CALL). ...
3
votes
0answers
294 views

How to debug Bad jump destination error

I am trying to work through the https://ethereum.org/token#improved-coin tutorial. I deployed the contract to testnet. Initialized tokens, set the buy and sell price. Now, one of my accounts has 50 ...
3
votes
0answers
118 views

Is there any reference on writing contracts directly with the bytecode language?

It would be great to have a complete reference of all the opcodes available, their exact effects and costs, and an example "Hello World" in ethereum assembly. Edit: this question isn't a duplicate of ...
3
votes
0answers
94 views

Contribute function of crowdsale is not working

I am having a crowdsale contract. I am trying to run contribute function using command: contractInstance.contribute.sendTransaction(101,{from:eth.accounts[0],value:200, gas:4000000}). It is creating a ...
3
votes
0answers
120 views

How to enable autobuy of Ethers in exchange of my CryptoCurrency?

I'm referring this page : https://www.ethereum.org/token#automatic-selling-and-buying My question is that how is it possible to integrate third party in our Smart Contracts to be deployed on Ethereum ...
3
votes
0answers
122 views

Using Mix IDE on a private testnet?

Is it possible to run/debug contracts in mix-ide on a private test net?
3
votes
0answers
128 views

How to use an accessor for imbricated data types?

I'm looking at information about accessors in solidity/js for more complex data structures than just a public array/mapping. How can i access the array in that code for: struct AnotherStruct {....} ...
2
votes
0answers
56 views

How to implement percentage deposit function to smart contract

I need to implement on the deposit function when the ownerAddress is doing a deposit a 10% to be freeze in the smart contract and and if the ownerAddress want's to call the returnDeposit function by ...
2
votes
0answers
23 views

Need Help With Setting Up Multisig Wallet Contract

I need help with setting up ETH multisig wallet contract. I used Mist and I think it's very newbie-friendly. However, there are 3 issues that I encountered: I cannot set up more than 7 owners of the ...
2
votes
0answers
47 views

Why is putting data to storage more expensive during the deployment of contract than storing the same data by a method?

I am working with truffle and solidity (v0.4.23) and found out that when I pass in an argument of constructor some bigger amount of data (16kB) that are saved to storage of a smart contract, it is ...
2
votes
0answers
35 views

A token transfer enable/disable function works fine in 0.10.0 but not working in Mist 0.11.1

So i have this contract where i have a function to enable/disable transfer of the contract's token. it works fine in Mist 0.10.0 but when i try to call the disable/enable function, it gives me the ...
2
votes
0answers
36 views

Interacting with a complex deployed contract from my other contract

For example, I want to call a create market function from augur in my contract. I'm using the recommended pattern, but there are additional contracts that this function brings in, ex ICash, IMarket ...
2
votes
0answers
21 views

How does createProxyImpl work in ProxyFactory Contract?

function createProxyImpl(address _target, bytes _data) internal returns (address proxyContract) { assembly { let contractCode := mload(0x40) // Find empty storage location using "...
2
votes
0answers
62 views

What is a cheap way to store mnemonic generator list of 1024 words in smart contract?

What is the cheapest way to store a list of 1024 words for a mnemonic generator, and why? These ideas had a gas cost of 165720 GAS for a string array, and 42300 GAS for storing all the words in a ...
2
votes
0answers
62 views

Can a token store funds like an escrow and still meet ERC standards?

In one of my contracts, a user creates an escrow that stores some important information. These escrows are bundled together and passed to another contract, which sends the user tokens. The tokens are ...
2
votes
0answers
138 views

Is there a comparison of Ethereum smart contracts to other platforms that also have smart contracts?

Doing some research in the smart contracts arena. But is there an in depth comparisons with the pros/cons of each implementation of smart contracts in other blockchains as compared to Ethereum smart ...
2
votes
0answers
17 views

completely disable contracts on a private network

I'm running a private network I've forked from Ethereum. I'm wondering if the code is so tightly coupled I won't be able to disable contracts or if I could possibly find a line or 2 of code to take ...
2
votes
0answers
223 views

withdraw eth from contract

I have contract and function which accepts ether. How can I transfer ether from contract to any other wallet? I'm using ganache-cli. Function work, and I spent 10 eth on contract(private network). ...
2
votes
0answers
493 views

contract.method.getData getData is undefined

When I use contract.method.getData(params) it throws an error getData is undefined. I searched on github and saw someone used request instead, and I used contract.method.request and it has successed! ...
2
votes
0answers
202 views

Create a child contract from parent contract via remix

I was trying to create a new contract from another one like this: pragma solidity ^0.4.8; contract Child { address public owner; function Child() public { owner = msg.sender; } }...
2
votes
0answers
310 views

Working with time in smart contracts

I know there have been quite a few questions surrounding time, and the use of block.timestamp. However, I still have a few questions design-wise. At what point exactly is it 'dangerous' to use block....
2
votes
0answers
38 views

Where does Ethereum Dapps go in known design paterns

I am doing a Dapp for a school project and I am supposed to choose a design pattern to work with. I want to know the possibilities for design patterns concerning the ethereum dapps, or if they have ...
2
votes
0answers
148 views

Arabic letters not read by web3.toUtf8

I am using arab letters in bytes32 data stored in a smart contract, when reading the data and converting to utf-8 with web3.toUtf8() i get errors like unknown utf character or Invalid continuation ...
2
votes
0answers
140 views

Alternative solution for loops in subscription smart contract design

I am a new developer, working on a smart contract mostly for my own learning. I am developing a Smart Contract to handle subscriptions. The contract has the below features. Subscribers can subscribe ...
2
votes
0answers
43 views

Why would a contract throw after it has executed the last line of code?

I'm debugging a contract function with Truffle. It always throws the following error: Error: VM Exception while processing transaction: revert However, I'm certain that the function has reached the ...
2
votes
0answers
135 views

Call several endpoints in an Oraclize nested query and return an array

I am trying to get an average of ETH/USD conversion rate through Oraclize. My query works well when calling one single HTTP endpoint but I would like to call several endpoints within the same query ...
2
votes
0answers
63 views

Is it possible for a mapping to run out of space?

Can storage mappings in a contract run out of space? Say that mapping was keyed to an address and the value as the following struct: User bytes32 name uint8 age Theoretically, if there was a ...
2
votes
0answers
49 views

Smart contract state storage under the hood and scalability

I know smart contract state is being added in block, Does this true always ? When I add or update an array of struct in contract what happens under the hood ? Is there any limit for such data ...
2
votes
0answers
226 views

Usage regarding for loop in solidity contract

I am trying to integrate for loop in my smartcontract for adding details to a struct. I have implemented for loop using frontend by calling the function in smartcontract one by one. struct details {...
2
votes
0answers
430 views

Do we have to have a fallback function in our smart contract?

I have a smart contract that has only one payable function and one that pays, as follows: contract DAO_Test{ // define something function buyToken() payable external returns(bool){ ...
2
votes
0answers
58 views

Contract Development Problem in Parity

I run Parity on the command line using: parity --chain dev I run this so I can develop and test smart contracts. The problem is, whenever I try to develop a Smart Contract by clicking Contract -> ...
2
votes
0answers
79 views

How does the increasing array size affect contract throughput?

I was working with arrays in my contract and I came across the fact that I'm deleting the middle element from an array and because I don't want to ruin the order I don't shift the last element to the ...
2
votes
0answers
80 views

Can a smart contract in Go language be deployed to azure ethereum consortium blockchain? If yes, how?

I have a smart contract(created in GO language) working for IBM bluemix blockchain. This work was done by a separate team.I need to create a replica of the same using a Azure Ethereum blockchain. I am ...
2
votes
0answers
94 views

How is Ethereum integrated into real world (situations)?

For example, there exists a smart contract for marriage, known as I want half. Does the corresponding property have to exist in Ethereum too? Where will the contract gain knowledge about the IRL ...
2
votes
0answers
1k views

How can we lock an ERC20 token in a contract and generate another ERC20 token proportionally over the locked duration?

"Gnosis tokens (GNO) are the generator for Wisdom token (WIZ) creation. WIZ can only be created via activating the utility of the Gnosis (GNO) tokens. This is done via a smart contract system. The ...
2
votes
0answers
702 views

TypeError: Cannot access member 'code' of undefined

I am new to geth command line for testnet in Windows. I got an error when trying to deploy this contract example ---------------------------------------------- source = "contract test { function ...
2
votes
0answers
108 views

Global variable problem, event is missing and not fired

I have a contract like below: contract SimpleBidding { address contractOwnersAccount; // request information address public client; uint barcode; // bidding information ...
2
votes
0answers
420 views

What is the simplest way to allow a contract to pay for gas?

EIP86 and abstraction discussion is exciting for the future, but what are the things we could change first, to allow a contract to pay for gas? For example, for the withdraw transactions on BabyZoE, ...
2
votes
0answers
172 views

Contract to contract interaction using Mist

In the following the example of interaction between two contracts based on the example: Basic example of interaction between 2 contracts? contract C1 { function f1() returns(uint) { ...
2
votes
0answers
39 views

In solidity, struct has some mistaken?

contract MyContract { struct Posposal{ uint posposalId;//防止复核数组变动时 address voteSponsorAddr;//投票发起人 bytes1 description_;//投票内容信息 0 转币 以后扩展 uint userId;//投票给目标以太币地址所对应的id uint ...