| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- // contracts/Setters.sol
- // SPDX-License-Identifier: Apache 2
- pragma solidity ^0.8.0;
- import "./PythState.sol";
- contract PythSetters is PythState {
- function setInitialized(address implementatiom) internal {
- _state.initializedImplementations[implementatiom] = true;
- }
- function setGovernanceActionConsumed(bytes32 hash) internal {
- _state.consumedGovernanceActions[hash] = true;
- }
- function setChainId(uint16 chainId) internal {
- _state.provider.chainId = chainId;
- }
- function setGovernanceChainId(uint16 chainId) internal {
- _state.provider.governanceChainId = chainId;
- }
- function setGovernanceContract(bytes32 governanceContract) internal {
- _state.provider.governanceContract = governanceContract;
- }
- function setPyth2WormholeChainId(uint16 chainId) internal {
- _state.provider.pyth2WormholeChainId = chainId;
- }
- function setPyth2WormholeEmitter(bytes32 emitterAddr) internal {
- _state.provider.pyth2WormholeEmitter = emitterAddr;
- }
- function setWormhole(address wh) internal {
- _state.wormhole = payable(wh);
- }
- function setLatestPriceInfo(bytes32 priceId, PythStructs.PriceInfo memory info) internal {
- _state.latestPriceInfo[priceId] = info;
- }
- }
|