Questions tagged [clone]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
40 views

Using meta transactions and a smart contract that creates contracts, how can I affect who the contract creator is?

I have a smart contract RevenueSplitter which is used to create ERC-721 contracts via a CollectionFactory using the minimal proxy pattern. We recently switched to using meta transactions to initiate ...
Paul Spencer's user avatar
1 vote
1 answer
30 views

Can a diamond Contract be cloned?

Error: invalid address or ENS name (argument="name", value=undefined, code=INVALID_ARGUMENT, version=contracts/5.7.0) So this is the error that occured. I am trying to implement diamond ...
Prajan Bhattarai's user avatar
0 votes
0 answers
36 views

How to change the chainId of a cloned blockchain?

I have two private networks running. A Main Net and Test Net. I am considering the possibility of occasionally forking the Main Net to a Test net so that i can test with the latest Main net data. I ...
CathalMF's user avatar
  • 253
1 vote
1 answer
204 views

Setting immutable variables using clones

I've created a factory where I can clone my smart contracts using the openzeppelin clones factory. The problem I'm facing is that my "child" or "initializable" contract needs to ...
gggggggggg's user avatar
1 vote
1 answer
35 views

Whitelist implementation of Ownable.sol

I'm creating a Whitelist dapp. I want users to have the ability to submit a form onClick/submit which will store a new list and deploy a contract that they own. I've come to the conclusion that a ...
padst3r's user avatar
  • 13
0 votes
2 answers
67 views

Do OpenZeppelin Clones support ancestor contracts?

I would like to know whether clones made using the OpenZeppelin Clones Library supports functions of inherited contracts (eg: using override functions, etc). I would like my cloned contract to make ...
ethereumboy's user avatar
1 vote
1 answer
128 views

How to correctly test the initialisation of a clone contract on Hardhat? (EIP-1167)

So I have created an 'implementation contract' and a 'clone factory' which creates clones of the implementation contract. I have tested the functionality of the CloneFactory and it works in Remix. ...
ethereumboy's user avatar
0 votes
1 answer
173 views

Cloning ERC20/ERC721

I'm using a Clone Factory pattern to create new instances cheaper. I realized that every field, preset or set in constructor, has default value. Let's assume that I have this contract: contract ...
Cezar's user avatar
  • 111
1 vote
0 answers
128 views

How does one indirectly initialize a parent contract using a function in the child contract? (EIP-1167)

So I am creating an implementation contract which I intend to clone multiple times. As per the EIP-1167 standard, I cannot use a constructor in the implementation contract and have to use an '...
ethereumboy's user avatar
1 vote
1 answer
223 views

Clone Contracts (EIP-1167): How to connect call functions from implementation contract?

I am building a dApp which makes use of the OpenZeppelin Clones Library (EIP-1167), which will allow my users to cheaply deploy clones and gain functionality of the implementation contract. I have ...
ethereumboy's user avatar
2 votes
1 answer
135 views

Solidity Clones Contracts: How to save deployer as a storage variable which can be called in created clones?

I am using the OpenZeppelin Clones Library so that users of my dapp can create clones of my implementation contract. My dapp will be following the EIP-1167 standard. For functionality, I will need to ...
ethereumboy's user avatar
1 vote
1 answer
332 views

How can I clone a contract (using Openzeppelin 'clones') which contains a chainlink vrfCoordinator address in it's constructor?

I'm trying to clone a Lottery contract which contains Chainlink VRF Coordinator address as part of the contructor. This is the constructor of the main contract which I'd like to clone: constructor(...
ethereumboy's user avatar
0 votes
0 answers
168 views

factory implementation etherscan verification

I have a contract and its factory. The factory allows cloning of the contract through EIP-1167. Although I can deploy the factory and verify it easily on etherscan: hardhat verify --network <...
Syffys's user avatar
  • 121
1 vote
1 answer
739 views

Clone a Smart Contract

I'm an artist trying to publish his own contract. I don't have solidarity knowledge, but I can read/understand codes in general. So I found this collection minted yesterday: https://etherscan.io/...
design7's user avatar
  • 11
0 votes
0 answers
396 views

Consequtive Cloning via Clone proxy of the OpenZeppelin

I have used the Clone proxy of the OpenZeppelin in my smart contract letting it somehow duplicate itself whenever running the clone function. However, by clicking my clone function I am given the ...
Sina Rahimi's user avatar
1 vote
1 answer
231 views

Cloning while providing arguments for construction function

I am trying to clone my contract by using Clones.sol from OpenZeppelin. The cloning procedure is successful, although I cannot pass them my desired arguments which should be provided for construction ...
Sina Rahimi's user avatar
0 votes
1 answer
227 views

How to test clone contract functions?

I have a clonable contract which I'm passing to the clone factory contract and I'm trying to access the functions inside it but for some reason only the view functions work. this.nft = await NFT....
Icarus23's user avatar
  • 341
0 votes
2 answers
148 views

Somebody created a clone of my ERC20 token on the binance.mainnet - is this common?

I am not sure why, but when I googled my project I noted that an ERC20 token with the exact same name as mine was created on the binance mainnet and has even been traded/exchanged on pancake v2 I ...
Leonardo Botha's user avatar
1 vote
1 answer
93 views

Updating multiple cloned contracts

A quick question: if a contract factory has generated quite a bunch of contracts by cloning, and one parameter is desired to be updated across all such cloned contracts, what is the best approach for ...
Maxareo's user avatar
  • 633
1 vote
2 answers
2k views

Calculate deterministic address with Create2 when cloning contract with Factory pattern

There is an existing unanswered question from another author with the same problem, I am creating a more detailed one with the hopes both can be closed. I have a solidity contract based on the ideas ...
Franco's user avatar
  • 155
0 votes
0 answers
268 views

Smart Contract - How to Copy or Clone it?

All - Could someone tell me if it is possible to copy or obtain a smart contract code that has been proven to work on the blockchain in the past. I have a block number and the smart contract address, ...
Karl A's user avatar
  • 1
0 votes
1 answer
75 views

full stack dapp clone example elastic supply algorithmic stablecoin

I'm new to vyper (but have some python experience), I would like to clone a very simple dapp to have a look at the full stack of an ethereum dapp from back end (write compile and deploy a simple ...
Carlo Travaglio's user avatar
0 votes
1 answer
91 views

Can a Quorum network be cloned?

I wanted to know if a Private Protected Network be cloned/replicated to have a backup of the network, which would be helpful in times of network failure. Also is there a possibility of backup of data ...
Geethapriya G H's user avatar
2 votes
0 answers
163 views

How i can calculate deterministic address from contract clone (create2) [duplicate]

Is there any way to calculate the deterministic address of a contract cloned by a Factory through create2? I have this contract Factory contract ForwarderFactory { function cloneForwarder(address ...
Gustavo Toledo's user avatar
1 vote
0 answers
69 views

Verify but keep coding hidden

Can I verify my Smart Contract on Etherscan but still hide the coding to prevent others from cloning the smart contract?
M T Akhtar's user avatar
5 votes
1 answer
2k views

Clone factory and constructor arguments

In my project I'm using an EIP-1167-enabled Clone Factory: function createClone(address target) external returns (address result) { bytes20 targetBytes = bytes20(target); assembly { let ...
Radek_pl's user avatar
  • 761
1 vote
1 answer
610 views

No web3.min.js while download Zip file from Github

I am following a youtube tutorial to make a simple dApp. In this tutorial he is telling to get Web3 from GitHub. I downloaded the Zip of Web3 from the GitHub and i get following folders and file after ...
Zeeshan Ahmad Khalil's user avatar
1 vote
1 answer
1k views

What is cheapest way of creating clone of existing smart contract's

I do need to deploy a lot of similar smart contracts. With Solidity it's quite easy, but expensive :( I'm doing: contract One { ... } contract Builder { function create(uint8 amount) public ...
Jaro's user avatar
  • 111
1 vote
1 answer
2k views

How do I clone a struct in solidity?

I want to be able to trigger runTest() and return false. I'd need to clone the struct at some point but I'm not sure how to do it in solidity. I thought passing it to another function as memory would ...
okwme's user avatar
  • 293