Abstract
Upgrade the current Pyth oracle contract on Blast to be able to collect a share of the gas fees spent when updating a price on-chain.
Rationale
Collect the revenue generated from usage of the oracle by downstream applications at no extra cost to users (paid out from the centralized sequencer revenue).
Description
This proposal is to update the Pyth contract on Blast to enable gas fee claims (as part of sequencer revenue sharing). After we upgrade the contract to this version, we call the new added function which enables the gas fee claims (to the contract itself) and later we can add functionality to claim them.
Implementation Plan
-
Discuss Proposal:
9JFcL29kfJATziNqFSWgpPuTw82n3ZwiqM4DniFEs1su
among the Pyth community -
Implement the proposed Code change in accordance with the Blast docs
Proposal id: 9JFcL29kfJATziNqFSWgpPuTw82n3ZwiqM4DniFEs1su
Branch: chore/evm/blast-claim-gas
- Verify the implementation following the guide below:
- Make sure you have node-js, forge and jq installed.
node-js: installnvm
from here. Install node-js 18 (nvm install 18; nvm use 18
).
forge: install it from here
jq: install it from here - Clone the
pyth-crosschain
repo (git clone https://github.com/pyth-network/pyth-crosschain.git
). Go to thepyth-crosschain
directory and run the following command:npm ci && npx lerna run build
- Go to the proposal code branch (
git checkout <branch name>
) - Get the on-chain implementation code digest by going to the
contract_manager
directory and runningnpx ts-node scripts/check_proposal.ts --cluster mainnet-beta --proposal <proposal id>
- Get the source code digest by going to the
target_chains/ethereum/contracts
directory and runningnpx truffle compile --all && cat build/contracts/PythUpgradable.json | jq -r .deployedBytecode | tr -d '\r\n' | cast keccak
- Check the hash digest from the on-chain implementation (from step 4) matches the hash digest from the source code (from step 5).
p.s: the codes above are not merged in our contract because these are one-off and cannot be in our generic smart-contract. We will store the diff in the repo like this one.