Simplify StaticDelegateCall example in utilities doc

addresses PR review comment #4040 r1110324589
pull/4040/head
Vanya A. Sergeev 2 years ago
parent 5d2c45d772
commit 6bfc778cb1
  1. 12
      docs/modules/ROOT/pages/utilities.adoc

@ -203,23 +203,17 @@ interface IGadget {
function compute(uint256 c) external view returns (uint256);
}
contract GadgetStorage {
contract GadgetImplementation is IGadget {
uint256 internal _x;
}
contract GadgetImplementationA is GadgetStorage, IGadget {
function compute(uint256 c) external view returns (uint256) {
return _x * c;
}
}
contract GadgetImplementationB is GadgetStorage, IGadget {
function compute(uint256 c) external view returns (uint256) {
return _x / c;
}
}
contract DynamicGadget is StaticDelegateCall {
uint256 internal _x;
contract DynamicGadget is GadgetStorage, StaticDelegateCall {
address private _implementation;
...

Loading…
Cancel
Save