RegressionImplementation.sol 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.7.0;
  3. import "../proxy/Initializable.sol";
  4. contract Implementation1 is Initializable {
  5. uint internal _value;
  6. function initialize() public initializer {
  7. }
  8. function setValue(uint _number) public {
  9. _value = _number;
  10. }
  11. }
  12. contract Implementation2 is Initializable {
  13. uint internal _value;
  14. function initialize() public initializer {
  15. }
  16. function setValue(uint _number) public {
  17. _value = _number;
  18. }
  19. function getValue() public view returns (uint) {
  20. return _value;
  21. }
  22. }
  23. contract Implementation3 is Initializable {
  24. uint internal _value;
  25. function initialize() public initializer {
  26. }
  27. function setValue(uint _number) public {
  28. _value = _number;
  29. }
  30. function getValue(uint _number) public view returns (uint) {
  31. return _value + _number;
  32. }
  33. }
  34. contract Implementation4 is Initializable {
  35. uint internal _value;
  36. function initialize() public initializer {
  37. }
  38. function setValue(uint _number) public {
  39. _value = _number;
  40. }
  41. function getValue() public view returns (uint) {
  42. return _value;
  43. }
  44. // solhint-disable-next-line payable-fallback
  45. fallback() external {
  46. _value = 1;
  47. }
  48. }