ReceiverState.sol 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // contracts/State.sol
  2. // SPDX-License-Identifier: Apache 2
  3. pragma solidity ^0.8.0;
  4. import "./ReceiverStructs.sol";
  5. contract ReceiverEvents {
  6. event LogGuardianSetChanged(
  7. uint32 oldGuardianIndex,
  8. uint32 newGuardianIndex
  9. );
  10. event LogMessagePublished(
  11. address emitter_address,
  12. uint32 nonce,
  13. bytes payload
  14. );
  15. }
  16. contract ReceiverStorage {
  17. struct WormholeState {
  18. ReceiverStructs.Provider provider;
  19. // contract deployer
  20. address owner;
  21. // Mapping of guardian_set_index => guardian set
  22. mapping(uint32 => ReceiverStructs.GuardianSet) guardianSets;
  23. // Current active guardian set index
  24. uint32 guardianSetIndex;
  25. // Period for which a guardian set stays active after it has been replaced
  26. uint32 guardianSetExpiry;
  27. // Mapping of consumed governance actions
  28. mapping(bytes32 => bool) consumedGovernanceActions;
  29. // Mapping of initialized implementations
  30. mapping(address => bool) initializedImplementations;
  31. }
  32. }
  33. contract ReceiverState {
  34. ReceiverStorage.WormholeState _state;
  35. }