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 [factory]

The tag has no usage guidance.

1
vote
1answer
17 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
2answers
49 views

Self Destruct Transaction

how to make transaction like THIS TRANSACTION anyone can help me how to build it
1
vote
0answers
39 views

web3js get all properties of contract in one promise

I'm implementing an app with a Factory design pattern. My Factory is creating instances of myContract, that I load thanks to myContract.at(address) like below: this.myContract = TruffleContract(...
0
votes
1answer
20 views

Sending contract's source code to deployed contract in order to deploy it

I am writing a factory contract in solidity. I want to be able to add some more contracts to be deployed by the factory after it has been deployed. I thought sending the contract's source code to my ...
5
votes
1answer
330 views

Contract factory function running out of gas during Truffle test

Using openzeppelin library and truffle I am trying to make a Contract Factory that creates ERC20 tokens. I prefer to test it with Truffle using solidity and not javascript. Here is the code from the ...
1
vote
0answers
18 views

Can Factory Contract Be Used As Parent/Child Function?

I am attempting to modify the contract below; the way it is set up at the moment is so that the contract can be deployed, and then anytime a user wants to create a campaign, they can do so without ...
0
votes
0answers
76 views

When exactly do events fire

I have a web3J application that is supposed to deploy a contract (by calling a function on another contract) then listen for the contractCreatedEvent that is fired by the factoryContract and then call ...
1
vote
1answer
67 views

tx.origin for factory

I want to use a factory so that people can create a standardized contract. People should be able to transfer money directly by this creation which led me to the problem of the msg.sender during the ...
1
vote
0answers
131 views

Can't transfer balance from contract to parent contract

I'm having trouble transferring remaining funds from a Contract to it's controlling Contract Factory. I'm trying to do the following. Create a new Service with Factory->createService() Add funds to ...
3
votes
1answer
171 views

Remix and Contract Factories

I built out a fairly complex contract factory and I noticed the factory was only creating instances of itself, not the "child" contract. After observing this I figured I was doing something wrong so ...
0
votes
0answers
112 views

Crowdsale Generated from Factory Contract is not Transferring Tokens or No tokens are there

I am developing a Dapp in which clients can create multiple crowdsales of their own using my Dapp web interface. I have a factory contract through which multiple crowdsale contracts are generating. ...
0
votes
1answer
177 views

Factory Contract Not generating Tokens

Hi I am new to DApp development. I am using a Factory contract and that factory contract is creating multiple tokens contract. When I create a new token contract it generates the transaction but when ...
0
votes
1answer
485 views

web3: call function in contract that creates another contract and returns address [duplicate]

from what I (quickly) looked up, payable functions do not return values to the web3 API. In my particular use case, I have a 'Master' contract that serves as a factory for other contracts, and stores ...
1
vote
1answer
22 views

Endowing Contract Created via Factory with Specific Arguments

I'm trying to make a factory contract that accomplishes two things: Create contracts and endow them at creation with specific parameters Maintain a mapping of structs with info of all created ...
1
vote
1answer
304 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
61 views

Is it possible to change the bytecode a factory is using to create child contracts?

Normally a factory includes the bytecode of any contract it creates. Now let's think about a scenario where there is an update of the child contract code necessary. I don't want to change existing ...