-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERC DelegateProxy #897
ERC DelegateProxy #897
Conversation
Wondering if Maybe this isn't a good use case for this ERC though, most proxies are 1-1 (rather than 1-many). |
That's a good point @sohkai, things like ether-router would need this to work. I think we could make |
This previous ERC is worth looking at for historical context: #121 Proxy Standard. Although, I think there is some need to disambiguate the term Proxy. This ERC seems to be specifically about "proxies that delegate their own logic to another contract". Whereas the uPort proxy is moreso a "proxy that forwards transactions and calls from any ethereum account". Would it make sense to call this a "Contract Proxy" or "Computational Proxy"? |
I agree with @maurelian - another example of a contract that is a "proxy", but would not fit the description of this interface is the 0x TokenTransferProxy. Perhaps the standard interface could be named |
I agree on the name change to |
I would consider defining an EIP820 Interface. |
@zigguratt has called the particular kind discussed here a dispatcher. |
I agree with @maurelian here (and thanks, @veox). There are a couple of different things that could be called proxies. That's exactly why I referred to my implementation as a dispatcher. At the same time, it has the ability to upgrade the contract that it represents. The idea of swapping out a contract behind a dispatcher/proxy/delegate is a dangerous one. We discussed this at ConsenSys just a couple of day ago. My take on the subject was this (not including uPort's idea of a proxy):
I would love to be proven wrong, believe me. |
This is a courtesy notice to let you know that the format for EIPs has been modified slightly. If you want your draft merged, you will need to make some small changes to how your EIP is formatted:
If your PR is editing an existing EIP rather than creating a new one, this has already been done for you, and you need only rebase your PR. In addition, a continuous build has been setup, which will check your PR against the rules for EIP formatting automatically once you update your PR. This build ensures all required headers are present, as well as performing a number of other checks. Please rebase your PR against the latest master, and edit your PR to use the above format for frontmatter. For convenience, here's a sample header you can copy and adapt:
|
Your comment got somewhat lost and I just saw it. Thanks for the heads-up @Arachnid, it should be good now. |
Is anything more required from us before it can be merged @Arachnid? |
* Add ERCProxy draft * Add missing links * Re-format EIP897 * ERC897: add reference to implementations
Hi Jorge(@izqui ), the new rule is pull request can't be the "discussions-to" destination, could you mind update EIP-897 to find an official home for its discussion, given it's still in draft status? |
Hi. I'm searching ABI for the implementation contract at 0x4ef5123a30e4CFeC02B3E2F5Ce97F1328B29f7de |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lance from Philadelphia here
Goodnight, I would like to assemble a team for projects to create cryptocurrencies, tokens and Blockchain and digital banking. Partners and Partners for the Project. Shall we talk? |
CONTACT US AT SINGULARITY ASI INSTAGRAM |
Sounds great! Thank you and have a great night.
Lance Mitchell
…On Sat, Jul 15, 2023, 10:30 PM singularityasitoken ***@***.***> wrote:
Goodnight,
I would like to assemble a team for projects to create cryptocurrencies,
tokens and Blockchain and digital banking. Partners and Partners for the
Project.
Shall we talk?
—
Reply to this email directly, view it on GitHub
<#897 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BA76QHRMMT3TK2U3B6DOUDLXQNG4BANCNFSM4ER2J4BQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Preamble
Simple Summary
Proxy contracts are being increasingly used as both as an upgradeability mechanism
and a way to save gas when deploying many instances of a particular contract. This
standard proposes a set of interfaces for proxies to signal how they work and what
their main implementation is.
Abstract
Using proxies that delegate their own logic to another contract is becoming an
increasingly popular technique for both smart contract upgradeability and creating
cheap clone contracts.
We don't believe there is value in standardizing any particular implementation
of a DelegateProxy, given its simplicity, but we believe there is a lot of value
in agreeing on an interface all proxies use that allows for a standard way to
operate with proxies.
An example implementation of a DelegateProxy can be found in aragonOS or zeppelinOS.
Standardized interface
Code address (
implementation()
)The returned code address is the address the proxy would delegate calls to at that
moment in time, for that message.
Proxy Type (
proxyType()
)Checking the proxy type is the way to check whether a contract is a proxy at all.
When a contract fails to return to this method or it returns 0, it can be assumed
that the contract is not a proxy.
It also allows for communicating a bit more of information about how the proxy
operates. It is a pure function, therefore making it effectively constant as
it cannot return a different value depending on state changes.
Forwarding proxy (
id = 1
): The proxy will always forward to the same codeaddress. The following invariant should always be true: once the proxy returns
a non-zero code address, that code address should never change.
Upgradeable proxy (
id = 2
): The proxy code address can be changed dependingon some arbitrary logic implemented either at the proxy level or in its forwarded
logic.
Benefits
like Etherscan, it just shows the code in the proxy itself but not the actual
code of the contract. By standardizing this construct, they will be able to show
both the actual ABI and code for the contract.
Copyright
Copyright and related rights waived via CC0.