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