Questions tagged [proxy-contracts]

Contracts creating a transaction or call on behalf of another account

Filter by
Sorted by
Tagged with
1
vote
1answer
190 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 ...
1
vote
2answers
427 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
3k 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 , ...
0
votes
1answer
19 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
29 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
49 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() ...
2
votes
2answers
241 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 ...
1
vote
1answer
133 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://...
0
votes
1answer
290 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, ...
7
votes
1answer
634 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 ...
1
vote
1answer
158 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, ...
0
votes
1answer
35 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/...
1
vote
0answers
61 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: ...
0
votes
1answer
128 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 ...
9
votes
1answer
494 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 ...
0
votes
1answer
268 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 ...
0
votes
1answer
216 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 ...
1
vote
1answer
119 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 ...
2
votes
0answers
105 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
1answer
123 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 ...
0
votes
1answer
200 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 ...
1
vote
1answer
228 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 ...
0
votes
1answer
70 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?
4
votes
1answer
380 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 ...
7
votes
0answers
487 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 ...