Linked Questions

0
votes
1answer
476 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 ...
129
votes
2answers
26k views

Are there well-solved and simple storage patterns for Solidity?

Simple and appropriate data organization can challenge Solidity newcomers. It wants us to organize everything in ways many of us aren’t accustomed to. Are there well-solved general patterns for ...
15
votes
2answers
5k views

How to pass constructor parameters to a contract using Truffle?

I am using testrpc and truffle for deploying contracts.I want to pass constructor parameters while deploying. contract User { string public userName; function User(string ...
1
vote
2answers
1k 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 ...
2
votes
2answers
698 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
2answers
991 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 { ...
2
votes
2answers
723 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 ...
0
votes
3answers
542 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
1answer
789 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/...
1
vote
1answer
404 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 ...
0
votes
1answer
374 views

Deploying contract template using web interface & Metamask

I have a contract template. The idea is to enable visitors to my website to customise and deploy the contract using Metamask by providing a set of constructor variables and outputting the resulting ...
1
vote
1answer
322 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 ...
0
votes
2answers
224 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); ...
1
vote
1answer
153 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
120 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 ...

15 30 50 per page