PythState.sol 851 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // contracts/State.sol
  2. // SPDX-License-Identifier: Apache 2
  3. pragma solidity ^0.8.0;
  4. import "./PythStructs.sol";
  5. contract PythStorage {
  6. struct Provider {
  7. uint16 chainId;
  8. uint16 governanceChainId;
  9. bytes32 governanceContract;
  10. uint16 pyth2WormholeChainId;
  11. bytes32 pyth2WormholeEmitter;
  12. }
  13. struct State {
  14. address payable wormhole;
  15. Provider provider;
  16. // Mapping of consumed governance actions
  17. mapping(bytes32 => bool) consumedGovernanceActions;
  18. // Mapping of initialized implementations
  19. mapping(address => bool) initializedImplementations;
  20. // Mapping of cached price information
  21. // priceId => PriceInfo
  22. mapping(bytes32 => PythStructs.PriceInfo) latestPriceInfo;
  23. }
  24. }
  25. contract PythState {
  26. PythStorage.State _state;
  27. }