laconicd/tests-solidity/suites/staking/contracts/proxies/ThinProxy.sol
Brett Sun c9639c3860
tests: add solidity test suites (#487)
* tests: add solidity test suite

* tests: remove require strings

* Update tests-solidity/init-test-node.sh

* Update tests-solidity/init-test-node.sh

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-09-01 17:16:28 -04:00

28 lines
687 B
Solidity

pragma solidity ^0.5.17;
import "../lib/os/DelegateProxy.sol";
import "../lib/os/UnstructuredStorage.sol";
contract ThinProxy is DelegateProxy {
using UnstructuredStorage for bytes32;
constructor(address _implementation) public {
_implementationSlot().setStorageAddress(_implementation);
}
function () external {
delegatedFwd(implementation(), msg.data);
}
function proxyType() public pure returns (uint256) {
return FORWARDING;
}
function implementation() public view returns (address) {
return _implementationSlot().getStorageAddress();
}
function _implementationSlot() internal pure returns (bytes32);
}