Linked Questions

1
vote
1answer
93 views

Building a recursive smart contract — is it possible?

I would like to create a sort of tree type hierarchy of contracts. Think of it like a multi-level-marketing scheme -- the person at the top will receive X. For each of the k people he recruits he ...
3
votes
1answer
366 views

How to build an Ethereum hot wallet for an exchange

I’m developing an exchange. When a new user register on website we will create new eth wallet for them. When they deposit USDT on their wallet how can I transfer that USDT amount to another address (...
0
votes
1answer
232 views

One smart contract deployed on 2 nodes will have same address?

Let's get creation of a smart contract address out of the way: The address for an Ethereum contract is deterministically computed from the address of its creator (sender) and how many transactions ...
1
vote
1answer
130 views

Truffle - call migration file multiple times

I would like to execute migration file "6_deploy_and_register_group.js" every time when I need to create a new group. Is this a proper way to use migrations? If yes, how can I make it working? ...
0
votes
3answers
637 views

Dynamically create smart contract structure based on user input

I would like to create a smart contract based on user input. User would provide some information/data from the UI, and based on the information provided my smart contract logic would get defined, and ...
1
vote
0answers
134 views

What is a common pattern to work with a large number of complex Things: make a Thing a contract, or a struct in a mapping?

In order to build a somewhat complex Dapp, I need to manage "Contributions". To do this, I roughly see two patterns: A Factory-pattern, in which each Contribution is it's own Contract/Instance. A ...
1
vote
1answer
418 views

How do I know which transaction generated a contract in Factory pattern?

By factory pattern I mean a contract able to deploy other contracts like in this question: simple bakery factory pattern Each time I trigger factoryInstance.newContract(args).then(promise); I get ...
1
vote
2answers
2k views

Mapping to contract

Solidity documentation says it is possible to use anything as mapping value, which I assume includes a contract: _ValueType can actually be any type, including mappings. but I couldn't find an ...
1
vote
1answer
795 views

How to generate new address for new contract created by constructor

I'm trying to resolve a problem and google is not useful this time. On my localhost truffle + testrpc I have a contract which returns a new instance of a new contract. import 'contracts/...
0
votes
2answers
228 views

Capture events from a state variable which is a contract

I developed a contract which uses another contract in it state variable, but looks like the events from the contract in the state variable aren’t dispatched. contract A { event Hello(uint num); ...
2
votes
2answers
749 views

Creating Contract instances from contract methods

I've been working on the concept of building a MUD type game using Blockchain as the data storage. Note - this is a private network - so ether cost is not really a huge issue for me. Given a contract ...
2
votes
2answers
747 views

How to access Objects from different Contracts

Goal: I want to create a solidity programm that includes 3+ contracts. This means I have one contract (lets call it master for now) which aims at setting everything up. This means this contract has a ...
0
votes
1answer
489 views

Is it possible to create a smart contract that makes other smart contracts [duplicate]

I am wondering if I could make a smart contract that makes other smart contracts when prompted to. For example, I send a transaction to smart contract A telling it to make smart contract B. And smart ...
0
votes
2answers
1k views

Contract changing another contract's state

In my system, users can request to be verified by a trusted contract. When a user creates an account he deploys this contract (omitting non-related parts) pragma solidity ^0.4.11; contract User { ...
1
vote
1answer
323 views

How exactly can we deploy a contract on a button click from a front end when we are using nodejs and running testrpc?

I want to deploy my contract by taking in parameters from the webpage and they serve as parameters for my contract's constructor and when I click on a button I should be able to deploy the contract on ...

15 30 50 per page