Questions tagged [proxy-contracts]

Contracts creating a transaction or call on behalf of another account

Filter by
Sorted by
Tagged with
9
votes
1answer
540 views

Difference between “specific” and “generic” proxy functions and how/when to use them

Hello I am trying to build a proxy contract and I've seen two approaches: 1- "Specific" proxy function, where the proxy function can only call a specific function of the other contract. Ex: (taken ...
7
votes
1answer
701 views

Using a high level delegate call in upgradable contracts since Byzantium

Since Byzantium we can implement upgradable proxy contracts much easier with the use of returndatacopy and returndatasize assembly instructions. This means we no longer have to register return types ...
7
votes
0answers
490 views

How can a proxy contract create another contract? [duplicate]

A simple proxy contract looks like: contract Proxy { function forward(address to, uint value, bytes data) { if (!to.call.value(value)(data)) { throw; } } } Using ...
4
votes
1answer
398 views

Calling a function on an existing contract

I'm trying to create a very simple proxy contract that forwards my transaction/call and nothing else. So User A > transaction to P(roxy)C > Call to Contract (msg.sender = user A) i've tried two ...
2
votes
2answers
396 views

What's the difference between Truffle Migrations and ZeppelinOS upgradeable contracts?

It was my understanding that Truffle migrations will move updated contracts to new addresses. As a developer, you can use this feature to update already deployed contracts with new code. ZeppelinOS ...
2
votes
2answers
86 views

How do Proxy Upgraded Logic Contracts Share Data

I have been looking at how to make my contracts upgradeable and looking through the Zeppelin docs and source code to try to wrap my head around this. One thing I cannot work out is: How do new logic ...
2
votes
1answer
365 views

Truffle react with Proxy Contract of OpenZeppelin

Is it possible to create a react app with truffle framework using the Proxy Contract of OpenZeppelin for upgradable contract? What I understood is that one should send a transaction at Proxy ...
2
votes
1answer
170 views

Modify Struct on Upgradeable Smart Contracts

I have reviewed some techniques around Upgradeable smart contracts from starting point(Elena Dimitrova's Eternal Storage) to zeppelinOS's Unstructured Storage pattern. As I understood from posts that ...
2
votes
2answers
31 views

will I change the ABI when using a Proxy pattern?

I would like to ask you a question about the Proxy Patterns. Suppose I published an erc20 token contract(version1) and also I am using Proxy contract. If I change or add a new function the this logic ...
2
votes
0answers
111 views

ZeppelinOS: zos push --network mainnet returns nonce too low

Im trying to deploy a set of contracts. These are the steps I've followed (the same steps work fine in infura v3 ropsten): zos add Result: { "name": "0.1.0", "version": "0.1.3", "contracts"...
2
votes
2answers
512 views

Ethereum Solidity Contracts w/ Fiat Money

Is there anyway to fix a price for a ERC20 token? It seems like a major problem with blockchain and crypto is all of the volatility, which is why I am hesitant to use it for applications even though ...
1
vote
1answer
306 views

forward revert message from low level solidity call

I'm working on a proxy contract that will perform calls as follows: bool success; bytes memory returndata; (success, returndata) = _to.call.value(_value)(_data); require(success); this works great, ...
1
vote
1answer
280 views

On the unstructured storage upgrade pattern, why do we have to follow the structure of the previous contract?

ZeppelinOS has adopted the unstructured storage proxy pattern to upgrade contracts. In the blog post that introduces this pattern, they say: "The only thing you will have to care about is that ...
1
vote
1answer
169 views

Zepplin Proxy Code Pattern

I am trying to understand the Zepplin proxy code pattern so i deployed two contracts using remix Token.sol (logic contract - basic ERC20 contract) AdminUpgradeabilityProxy.sol (From zepplin) https://...
1
vote
1answer
4k views

getting error nonce too low , but nonce is proper stuck since one day

I am working with web3.js since sometime now , but now i am stuck with nonce too low error , the nonce is proper also i have checked private key and other addresses , they also seem to proper , ...
1
vote
0answers
116 views

Proxy contract DELEGATECALL to pass a DYNAMIC array to a function in the target contract

I'm trying to get a Proxy contract to correctly do a delegatecall to a function in another 'target' contract. The problem is, that I need to pass a dynamic array as the parameter to this function. Q: ...
1
vote
1answer
137 views

Creating new proxy using Zeppelin OS always use the same amount of gas

I'm building upgradeable infrastructure for the project and noticed that creation of proxy using Zeppelin OS always uses the same amount of gas. How I understand, during the setting implementation ...
1
vote
1answer
216 views

Calling onlyowner functions using owner's private key

I need to call a function with onlyOwner modifier in my smart contract via web3.js. I want a user of my site to be able to send their information to a white list, but it sends the transaction from ...
0
votes
1answer
34 views

Upgradable contract proxy pattern: Get the invoked method name in the fallback function

I have a proxy smart contract and I would like to get the name of the called method in the fallback function. Is there a way? For example, if I call the function getName() (stored in the logic ...
0
votes
1answer
75 views

What happens with the balance of a contract after it is upgraded using ZeppelinOS?

ZeppelinOS implements upgradeability of smart contracts through the use of a proxy and unstructured storage. If the contract holds some ether, what happens with that ether after it is upgraded?
0
votes
1answer
12 views

Verifying Proxy contracts on EtherScan

How one can verify a proxy contract, like OpenZeppelin Upgrade Proxy, on EtherScan?
0
votes
1answer
25 views

Dynamic Delegate Proxy contract

I'm familiar with proxy contracts in solidity using the 'delegatecall' to separate out the proxy contract from the logic contract. Is there a simple way to choose the logic contract based on an ...
0
votes
1answer
36 views

Unstructured storage proxies. Variables not being overwritten?

When using delegate call I was under the impression that storage slots declared in the proxy will be overwritten by the implementation. Unstructured storage implementations declare bytes32 variables ...
0
votes
1answer
47 views

How “factory” codes are used in proxy contracts?

What is this factory_ exactly in the following piece of code? constructor(DSProxyFactory factory_) public { factory = factory_; } https://gist.github.com/Sowmayjain/...
0
votes
1answer
37 views

Call Result Returning Wrong from Proxy Contract [closed]

I published my proxy (AdminUpgradeabilityProxy) and logic contract to Ropsten Test network. But my call result is returning wrong value through the my proxy contract. For example I call to ...
0
votes
2answers
108 views

onlyOwner check fails using Proxy Contract

I was testing delegate calls with the proxy pattern for the upgradable contract. Things were going good till the time I added onlyOwner modifier. My Contracts pragma solidity 0.5.8; contract ...
0
votes
1answer
81 views

Help me Understand the flow of this smart contract

I have 2 smart contract, below is the implementatin of them : 1) import "./MaintainableUpgradeabilityProxy.sol"; function _createProxy(address implementation, address serviceRegistry) internal ...
0
votes
0answers
20 views

VM Exception on variable assignment

I'm encountering a problem related to the gas (I guess). Please note that I'm using the proxy pattern for upgradeable smart contracts: CODE EXAMPLE HERE - Explanation from Openzeppelin I'm trying to ...
0
votes
0answers
99 views

One Proxy delegate contract to ten another proxy contracts

I'm trying to figure out why this code reverts. I need to make 10 bottles. This is how I do this: deploy Logic contract deploy 10 Proxy contracts call "upgrade" at each Proxy and pass Logic address ...
0
votes
1answer
37 views

How do you pause a Proxy-Logic pattern?

Suppose we have a Proxy contract that forwards to call to a Logic contract by using delegatecall. If we pause the Proxy, users will still be able to directly interact with the Logic contract. While ...
0
votes
1answer
63 views

Proxy function clashing - what kind of danger comes exactly with it?

I read that if I am using proxy, there is a chance of function clashing. Let's say in my contract there is a function with a signature: proxyOwner() ...
0
votes
1answer
162 views

Proxy Contract Not Updating Store Data

I want to setup a proxy contract that my users can interact with. The proxy contract is a store contract with stores the user's age for now. When I call writeData to update my age, I expect it to call ...
0
votes
1answer
263 views

Staking Contracts

Is there an ERC token which can provide staking functions? I have a use case where as a crypto trader I desire to create tokens for issuance in a pool. The members of the pool will purchase the tokens ...
0
votes
1answer
352 views

Contract not using Upgraded Proxy Contracts

There's 2 contracts A and B, A imports B, where B is a library that can be upgraded. To achieve this, I tried replacing B with a proxy contract and a delegate contract. We now have contracts Foo, ...
0
votes
1answer
262 views

Upradeable proxy library throws on any function, how to connect proxy and maincontract

I'm trying to implement a proxy library through the techniques researched by openZeppelin using proxies. I have 4 contracts 1. Library with logic 2. Library containing the interface for the logic ...