diff --git a/ZEIP-draft_deposit_withdraw_abstraction.md b/ZEIP-draft_deposit_withdraw_abstraction.md new file mode 100644 index 0000000..47d7d38 --- /dev/null +++ b/ZEIP-draft_deposit_withdraw_abstraction.md @@ -0,0 +1,38 @@ +## Preamble + + ZEIP: + Title: + Author: + Type: + Category (*only required for Standard Track): + Status: Draft + Created: <2017-09-07> + Requires (*optional): + Replaces (*optional): + + +## Simple Summary +define standard and abstracted deposit and withdraw interface functions for allowing interaction between contracts +## Abstract +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. + +## Motivation +set a standard in defining these two very commonly used functions, help developers build intercommunicating applications. +## Specification +the solidity code: +``` +function deposit(address _token, uint _amount) payable returns (bool success) {} +function withdraw(address _token, uint _amount) returns (bool success) {} +``` +use: for ETH movements, address _token == 0 + +## Rationale +use less size in smart contracts and generalize, setting a universally valuable standard. +## Backwards Compatibility +no issue with backward compatibility +## Test Cases +NA +## Implementation +NA +## Copyright +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).