Skip to content

Feat/evm mock - #464

Open
AK-APRIORIT wants to merge 7 commits into
StableTechnologies:mainfrom
AK-APRIORIT:feat/evm_mock
Open

AK-APRIORIT wants to merge 7 commits into
StableTechnologies:mainfrom
AK-APRIORIT:feat/evm_mock

Conversation

@AK-APRIORIT

@AK-APRIORIT AK-APRIORIT commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

⚠️This PR contains the test-only Pyth EVM mock infrastructure and is submitted solely for review and audit validation of the offline fixtures and live Shadownet evidence. It is not intended to be merged into main branch and does not add the mock contract or mock deployment to the production/Mainnet path

Components

Component Address / commit
TezFinOracle KT1Qtk9BdBFGBUXUw3xZVBSoAy28UQCW66DR
PythMock EVM 0xfFBc2f97f384876235ab82B2615013715F0c663e
EVM deployer 0x3766C7B66689b33395264DcAbfe4436E690D5A41
Michelson deployer tz1XTWbfhyWK9xmPAa6TyQUSv437JFgZDzgA
SmartPy 0.16.0
Protocol kathmandu
Michelson chain NetXtLrzvQDobza
EVM chain ID 127823
EVM RPC https://node.shadownet.etherlink.com
Michelson RPC https://michelson.etherlink.shadownet.octez.io

Michelson configuration operations

Step Operation
setPythCore oojEgkKVFzZ75Z7K2qKf4LFNicKYS1A3hLyhd1ksGBU81inVerC
setPythMaxAge oouhiXdSJbR2Pp7RHd4QxK7AW4NZc1cHak6DKrR9didkCSoAV9d
setFeedIds onx9o8YUirLgVRwZmqW2nexHaLsA7DqjqmShoCYe2Xuoc4yzuPR
configurePriceBounds ooBoeh4jkN65i17Pvbag9vUHPjsVYdNLzcFUuwUmTXN2SFJ54DB
configureMaxPriceAge onkb1DXsG8U2joaAA9fZ9GxfY8HWpScdkjz3eKT2h5UTHC914AR

EVM deployment

Action Transaction
Deploy PythMock 0x4718e14aba11f991f6f8a528aa08f627fedad2b585b1e1fcddb4ead276a85c8c

EVM fixture transactions

Fixture Transaction
Initial BTC valid price 0x7ef2e23f45b101d1073cdb7fbefb2b1cc4261e963b508fdc8c678d88d51c985b
Initial XTZ valid price 0x9972e182437eb006228d32eff761f3b07bc993b88a1fe45f1d0ab6496598478d
Initial USDT valid price 0xf3af6ed2e006382643f4897bae5eb0707b0f729eb0a6e8c6daeaa2472cb177e0
Enable ignoreAgeCheck 0xef0589575bfb8b5708298b7bbc66fcb8eb1e233f698439742af64f4dd4aabdac
Valid -> invalid 0xd5fe15b876602163d03b9d398be316427287b23fa194953eaac6503da48001eb
Invalid -> valid 0x82fa7a48be95f915f2c6c6b79d166e427b4130ce302015c6f21271330ff7b33e
Zero price 0x16f3662e12eb74c0e1610f0dcff1c5d88ffb8326a2de17b1f57e8f4549f23c21
Negative price 0x380391bc769a979e917139c0e5300029ff4a123be3f4e819a282c99d82a68009
Invalid exponent 0x3574b73d2e7b7bf953ac121ee951e9a2b612e1bce353d67ad3bb820278615632
Simulated revert: enable 0x2c229d8a4352b7bb4ec201f1b1ddf556e9e4b9b92c191683c3985ac38f672764
Simulated revert: disable 0x5c29dafc256e5bdc61c8211076481b4efab2c8ddd4b09cd04d9dc182ee1a757a
Validated stale fixture 0x0c67e00e98c5b480a9973f0865fb2b572b99dcc0bdeb27ec41cfb3d829924563
Validated rollback fixture 0xfb811983c7b45236dfc8f7a327f91eeb92aabf0bd0e2e6846be1d31642a90d48
Validated excessive confidence 0x6d2577791cb4c94064bb3ff8d24fecbaf556af0c7b1f98d8e0328a78cce0e84a
Validated bounds violation 0x05a9d17f67d0db2e52a24d49118004d2e71911b667f6a8e5675669d32ba7e52c
Validated deviation fixture 0xdddd9287d824a0bccd1743e28a8f4a501b88dca527de44d5e449af9daf70b538
Final stale fixture 0xb6f1f10f5a06ed3e52be10b601493931bf674b63c4d9c716a3963a1f2ad0957d
Final future fixture 0x8bf187044b44fdf8891065e5b25bfc397a351100d5b5d47a8848939df93a4788

Valid price results

Feed / mapping Normalized price Timestamp age Result
BTC/USD 6000000000000000 11s Passed
XTZ/USD 850000 11s Passed
USDT/USD 1000100 11s Passed
tzBTC -> BTC 6000000000000000 11s Passed
USDtz -> USDT 1000100 11s Passed
USDt -> USDT 1000100 11s Passed
WTZ/OXTZ/STXTZ -> XTZ 850000 11s Passed

Contract-level getValidatedPrice rejection results

Scenario On-chain rejection Result
Stale price STALE_ASSET_PRICE Passed
Timestamp rollback, non-zero previous timestamp ASSET_PRICE_TIMESTAMP_ROLLBACK Passed
Excessive confidence EXCESSIVE_PYTH_CONFIDENCE Passed
Price bounds violation ASSET_PRICE_OUT_OF_BOUNDS Passed
Price deviation ASSET_PRICE_CHANGE_TOO_LARGE Passed

Other rejection results

Scenario On-chain rejection Result
Valid -> invalid NON_POSITIVE_PYTH_PRICE Passed
Invalid -> valid Valid response Passed
Zero price NON_POSITIVE_PYTH_PRICE Passed
Negative price NON_POSITIVE_PYTH_PRICE Passed
Invalid exponent INVALID_PYTH_EXPONENT Passed
Simulated EVM revert PYTH_STATICCALL_FAILED Passed
Unknown feed UNSUPPORTED_PYTH_ASSET Passed
Future timestamp FUTURE_PYTH_PUBLISH_TIME Passed

Local validation

Check Result
Foundry tests 13 passed, 0 failed
Python ABI fixtures 17 fixtures + decoding checks passed
SmartPy TezFinOracleTest.py Passed
Production compile Passed
Operation-size check 29527B / 32768B
Shell/Node syntax checks Passed

user added 7 commits September 14, 2026 14:48
…oy TezFinOracle

- add configure_pyth_oracle.js (staged setPythCore/setPythMaxAge/setFeedIds/configurePriceBounds/configureMaxPriceAge admin sequence)
- add verify_shadownet_pyth_oracle.js (read-only live smoke test: native feeds, proxy/alias mapping, getPrice vs get_price_with_timestamp, getValidatedPrice)
- add e2e/shell_scripts/shadownet_pyth_smoke_test.sh orchestrating the full flow
- add contracts/tests/fixtures/pyth_abi_fixtures_test.py
- extend TezFinOracleTest.py with L2 proxy-mapping equivalence checks
- redeploy TezFinOracle to Shadownet and run the staged Pyth activation sequence

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant