All Projects → dapphub → Ds Proxy

dapphub / Ds Proxy

Licence: gpl-3.0
a proxy object that can compose transactions on owner's behalf

Programming Languages

solidity
1140 projects

Projects that are alternatives of or similar to Ds Proxy

Bouncer Proxy
👮🏻🛰 Ethereum identity proxy contract that bounces meta transactions of etherless accounts.
Stars: ✭ 142 (+18.33%)
Mutual labels:  ethereum, proxy
Httpproxy
基于 Go 开发,支持 http/1.1 以上版本的 HTTP(S) 代理。(Why not try out Mika?)
Stars: ✭ 120 (+0%)
Mutual labels:  proxy
Mosaic Contracts
Mosaic-0: Gateways and anchors on top of Ethereum to scale DApps
Stars: ✭ 119 (-0.83%)
Mutual labels:  ethereum
Stocklook
crypto currency library for trading & market making bots, account management, and data analysis
Stars: ✭ 119 (-0.83%)
Mutual labels:  ethereum
District0x Network Token
Smart Contracts and web app for district0x contribution
Stars: ✭ 119 (-0.83%)
Mutual labels:  ethereum
Puresharp
Puresharp is a Framework that provides the essential APIs (AOP, IOC, etc...) to productively build high quality (.NET 4.5.2+ & .NET Core 2.1+) applications through reliability, scalability and performance without no compromise
Stars: ✭ 120 (+0%)
Mutual labels:  proxy
Free proxy website
获取免费socks/https/http代理的网站集合
Stars: ✭ 119 (-0.83%)
Mutual labels:  proxy
Hiveos Linux
Hive OS client for GPU rigs
Stars: ✭ 119 (-0.83%)
Mutual labels:  ethereum
Emacs Solidity
The official solidity-mode for EMACS
Stars: ✭ 120 (+0%)
Mutual labels:  ethereum
Gobetween
☁️ Modern & minimalistic load balancer for the Сloud era
Stars: ✭ 1,631 (+1259.17%)
Mutual labels:  proxy
Esp V2
A service proxy that provides API management capabilities using Google Service Infrastructure.
Stars: ✭ 120 (+0%)
Mutual labels:  proxy
Ethereumjs Blockchain
Project is in active development and has been moved to the EthereumJS VM monorepo.
Stars: ✭ 119 (-0.83%)
Mutual labels:  ethereum
Websockets
WebSockets Inception
Stars: ✭ 120 (+0%)
Mutual labels:  proxy
Metamask Mobile
Port of MetaMask Ethereum Ðapp browser for mobile devices (iOS only for now)
Stars: ✭ 119 (-0.83%)
Mutual labels:  ethereum
Core
OPNsense GUI, API and systems backend
Stars: ✭ 1,827 (+1422.5%)
Mutual labels:  proxy
Coinmon
💰 The cryptocurrency price tool on CLI. 🖥
Stars: ✭ 1,581 (+1217.5%)
Mutual labels:  ethereum
Testcafe Hammerhead
A powerful web-proxy used as a core for the TestCafe testing framework. 🔨 😃
Stars: ✭ 119 (-0.83%)
Mutual labels:  proxy
Go Web3
Ethereum Go Client [obsolete]
Stars: ✭ 120 (+0%)
Mutual labels:  ethereum
Etherscamdb
Keep track of all current ethereum scams in a large database
Stars: ✭ 121 (+0.83%)
Mutual labels:  ethereum
Chains
provides metadata for networkIDs and chainIDs
Stars: ✭ 117 (-2.5%)
Mutual labels:  ethereum

DSProxy

Execute transactions & sequences of transactions by proxy

This contract implements a very useful utility called a proxy. It is deployed as a standalone contract, and can then be used by the owner to execute code.

A user would pass in the bytecode for the contract as well as the calldata for the function they want to execute.

The proxy will create a contract using the bytecode. It will then delegatecall the function and arguments specified in the calldata. Loading in this code is more efficient than jumping to it.

Use Cases

1. Allow actions to be executed through the proxy identity

This can be very useful for securing complex applications. Because delegatecall retains msg.sender and msg.value properties, internal functions can be set to only accept calls coming from the proxy through an ownership model like ds-auth. In this manner as long as the proxy is not compromised, the internal system is protected from outsider access. Should the owner of the internal calls ever need to be changed, this is as simple as updating the owner of ds-proxy rather than manually updating each individual internal function call, making it much more secure and adaptable.

2. Execute a sequence of actions atomically

Due to restrictions in the EVM instruction set such as being unable to be nested dynamically sized types and arguments, 1 transaction could be done at a time. Since ds-proxy takes in bytecode of a contract, rather than relying on a pre-deployed contract, customized script contracts can be used. These script contracts share a very a important property in that they enable a sequence of actions to be executed atomically (all or nothing). This prevents having to manually rollback writes to contracts when a single transaction fails in a set of transactions.

Example Usage

Note: the examples assume the user is using Dapphub's dapp and seth

  1. Deploy DSProxyFactory. (Optional - DSProxy can be deployed directly)

    dapp create DSProxyFactory

  2. Call the build function in DSProxyFactory to create a proxy for you. (Optional)

    seth send <DSProxyFactoryAddr> "build()(address)"

  3. Create a contract and compile using solc.

    dapp build MyCustomContract

  4. Get the calldata for the function and arguments you want to execute

    seth calldata "<functionName>(<argType1>,<argType2>...<argTypeN>)(<returnArgType>)" <arg1> <arg2> <argN>

  5. Pass the contract bytecode and calldata to the execute function inside the deployed DSProxy.
    seth send <DSProxyAddr> "execute(bytes,bytes)(bytes32)" <ContractByteCode> <CallData>

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].