Skip to content

Commit 28d0629

Browse files
author
escursionista
authored
our proposed abstraction of deposit/withdraw
1 parent 807d246 commit 28d0629

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Preamble
2+
3+
ZEIP: <to be assigned>
4+
Title: <ZEIP standard deposit and withdraw functions>
5+
Author: <Gabriele Rigo, [email protected]>
6+
Type: <Standard Track>
7+
Category (*only required for Standard Track): <Interface>
8+
Status: Draft
9+
Created: <2017-09-07>
10+
Requires (*optional): <EIP number(s)>
11+
Replaces (*optional): <EIP number(s)>
12+
13+
14+
## Simple Summary
15+
define standard and abstracted deposit and withdraw interface functions for allowing interaction between contracts
16+
## Abstract
17+
lack of accepted standards makes it very difficult for smart contracts to communicate with each other. the standard deposit and withdraw functions are designed as abstracted, could potentially be further abstracted. They allow for deposits and withdrawal of Ether and ERC20 tokens and allow an external contract/application perform success test.
18+
19+
## Motivation
20+
set a standard in defining these two very commonly used functions, help developers build intercommunicating applications.
21+
## Specification
22+
the solidity code:
23+
```
24+
function deposit(address _token, uint _amount) payable returns (bool success) {}
25+
function withdraw(address _token, uint _amount) returns (bool success) {}
26+
```
27+
use: for ETH movements, address _token == 0
28+
29+
## Rationale
30+
use less size in smart contracts and generalize, setting a universally valuable standard.
31+
## Backwards Compatibility
32+
no issue with backward compatibility
33+
## Test Cases
34+
NA
35+
## Implementation
36+
NA
37+
## Copyright
38+
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

0 commit comments

Comments
 (0)