LayerXcom / verified-vyper-contracts

FVyper: A collection of useful Vyper contracts developed with formal methods
Apache License 2.0
55 stars 15 forks source link

[Proxy] Implement proxy contract #55

Open nrryuya opened 5 years ago

nrryuya commented 5 years ago

OpenZeppelin Proxy.sol

yudetamago commented 5 years ago

I found a delegation example in vyper test code https://github.com/ethereum/vyper/blob/50b57010ba60d9914a746488bbd939041e914301/tests/parser/functions/test_raw_call.py#L97

nrryuya commented 5 years ago

Gnosis Safe has a family of proxy pattern contracts. https://github.com/gnosis/safe-contracts/tree/development/contracts/proxies

yudetamago commented 5 years ago

specify target address and copy calldata on contract

pass target address and calldata from sender

yudetamago commented 5 years ago

Questions

nrryuya commented 5 years ago

msg.data is not supported in Vyper and there seems another discussion. Let's postpone this contract for now. https://github.com/ethereum/vyper/pull/896#discussion_r200004489

nrryuya commented 5 years ago

Impl in Solidity

nrryuya commented 5 years ago

After msg.data gets supported. https://github.com/ethereum/vyper/issues/1181