feat(xc_admin_common): add MigrateGovernanceAndWormhole governance codec - #3938
feat(xc_admin_common): add MigrateGovernanceAndWormhole governance codec#3938keyvankhademi wants to merge 3 commits into
Conversation
…e codec Add Target action 10 encode/decode for combined wormhole address, data sources, and fee updates used by the EVM Pro-compatible in-place upgrade.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const DataSourceLayout: BufferLayout.Structure<DataSource> = | ||
| BufferLayout.struct([ | ||
| BufferLayout.u16be("emitterChain"), | ||
| BufferLayoutExt.hexBytes(32, "emitterAddress"), | ||
| ]); | ||
|
|
||
| const FeeLayout: BufferLayout.Structure< | ||
| Readonly<{ newFeeValue: bigint; newFeeExpo: bigint }> | ||
| > = BufferLayout.struct([ | ||
| BufferLayoutExt.u64be("newFeeValue"), | ||
| BufferLayoutExt.u64be("newFeeExpo"), | ||
| ]); |
There was a problem hiding this comment.
🔍 Wire ordering (data-source chain/address, fee value/expo) not verifiable against sibling EVM handler
The wire format encodes each data source as emitterChain(u16be) then emitterAddress(32) and the fee trailer as newFeeValue(u64be) then newFeeExpo(u64be), matching the local SetDataSources/SetFee conventions. However the PR description states the format must match the Solidity parser in a sibling EVM PR, which is not present in this repo, so byte-for-byte compatibility with the on-chain handler could not be confirmed here. Worth confirming against the EVM handler PR before relying on cross-chain interop.
Was this helpful? React with 👍 or 👎 to provide feedback.
…rces codec Align payload with Solidity: wormhole address + data sources only.
…eAndWormhole Expand the wire format to include governance emitter and index alongside the wormhole address and price data sources.
Summary
MigrateGovernanceAndWormhole(Target action 10) encode/decode in@pythnetwork/xc-admin-common.wormhole(20) | dataSources* | governanceEmitter(chain u16 + addr 32) | governanceDataSourceIndex(u32)— no fee.GovernancePayload.test.ts.Sibling PRs:
Test plan
xc_admin_commongovernance payload tests10