@argonprotocol/mainchain 1.5.2-dev.87829152 → 1.5.2-dev.96d18bee
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -0
- package/browser/artifacts/contracts/ArgonBuyAndTransfer.sol/ArgonBuyAndTransfer.json +573 -0
- package/browser/artifacts/contracts/ArgonToken.sol/ArgonToken.json +11 -11
- package/browser/artifacts/contracts/ArgonotToken.sol/ArgonotToken.json +11 -11
- package/browser/artifacts/contracts/MintingGateway.sol/MintingGateway.json +357 -16
- package/browser/artifacts/contracts/ProxyArtifacts.sol/ProxyAdmin.json +3 -3
- package/browser/artifacts/contracts/ProxyArtifacts.sol/TransparentUpgradeableProxy.json +4 -4
- package/browser/artifacts/contracts/StabilizationPoolHook.sol/StabilizationPoolHook.json +699 -0
- package/browser/artifacts/contracts/StabilizationPoolSubscriber.sol/StabilizationPoolSubscriber.json +187 -0
- package/browser/artifacts/contracts/UniswapV4PriceQuoter.sol/UniswapV4PriceQuoter.json +391 -0
- package/browser/index.d.ts +6395 -675
- package/browser/index.js +4758 -987
- package/browser/index.js.map +1 -1
- package/lib/artifacts/contracts/ArgonBuyAndTransfer.sol/ArgonBuyAndTransfer.json +573 -0
- package/lib/artifacts/contracts/ArgonToken.sol/ArgonToken.json +11 -11
- package/lib/artifacts/contracts/ArgonotToken.sol/ArgonotToken.json +11 -11
- package/lib/artifacts/contracts/MintingGateway.sol/MintingGateway.json +357 -16
- package/lib/artifacts/contracts/ProxyArtifacts.sol/ProxyAdmin.json +3 -3
- package/lib/artifacts/contracts/ProxyArtifacts.sol/TransparentUpgradeableProxy.json +4 -4
- package/lib/artifacts/contracts/StabilizationPoolHook.sol/StabilizationPoolHook.json +699 -0
- package/lib/artifacts/contracts/StabilizationPoolSubscriber.sol/StabilizationPoolSubscriber.json +187 -0
- package/lib/artifacts/contracts/UniswapV4PriceQuoter.sol/UniswapV4PriceQuoter.json +391 -0
- package/lib/index.cjs +4976 -1229
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +6395 -675
- package/lib/index.d.ts +6395 -675
- package/lib/index.js +4741 -994
- package/lib/index.js.map +1 -1
- package/package.json +8 -7
- package/src/interfaces/augment-api-consts.ts +101 -1
- package/src/interfaces/augment-api-errors.ts +285 -15
- package/src/interfaces/augment-api-events.ts +301 -55
- package/src/interfaces/augment-api-query.ts +457 -59
- package/src/interfaces/augment-api-rpc.ts +0 -1
- package/src/interfaces/augment-api-tx.ts +349 -126
- package/src/interfaces/lookup.ts +1059 -320
- package/src/interfaces/registry.ts +110 -10
- package/src/interfaces/types-lookup.ts +1191 -351
package/README.md
CHANGED
|
@@ -53,3 +53,90 @@ interface IArgonCpiSnapshot {
|
|
|
53
53
|
tick: bigint;
|
|
54
54
|
}
|
|
55
55
|
```
|
|
56
|
+
|
|
57
|
+
## Ethereum Beacon Sync
|
|
58
|
+
|
|
59
|
+
Pass an execution source when building beacon sync or bootstrap transactions:
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
const transactions = await getNextEthereumBeaconSyncTxs(client, beaconApiUrl, {
|
|
63
|
+
executionRpcUrl,
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Gloas light-client headers contain an execution block hash rather than a payload header. The
|
|
68
|
+
execution RPC supplies the matching header bytes, which the client checks against that hash.
|
|
69
|
+
Original pre-Gloas payload-header responses can omit the execution source. Historical headers
|
|
70
|
+
upgraded to the hash-only format also need it. `getEthereumBeaconSyncBootstrapTx` accepts the same
|
|
71
|
+
third argument.
|
|
72
|
+
|
|
73
|
+
Existing verifier state migrates with Gloas disabled. Once its version and epoch are known,
|
|
74
|
+
governance can call `setGloasFork` as root without resetting the checkpoint, committees, or anchors.
|
|
75
|
+
That call preserves earlier forks and rejects changes to finalized Gloas history.
|
|
76
|
+
|
|
77
|
+
## Gateway Activity Proof Flow
|
|
78
|
+
|
|
79
|
+
Discovery, storage-witness capture, and relay preparation are separate operations. Apps own caching,
|
|
80
|
+
scheduling, RPC fallback, and submission:
|
|
81
|
+
|
|
82
|
+
1. Call `discoverMissingGatewayActivityLocators(...)` with a finalized execution block number plus
|
|
83
|
+
the minimum gateway activity nonce you care about. If you already cache finalized locators, pass
|
|
84
|
+
`afterLocatorIndex` to fetch only the new suffix.
|
|
85
|
+
2. Cache those finalized locator blocks in the app as you collect them.
|
|
86
|
+
3. If `supportsGatewayActivityStorageProofs(client)` is true, call
|
|
87
|
+
`captureGatewayActivityStorageProofs(...)` against a recent, mined execution block while the RPC
|
|
88
|
+
still has its state. This operation needs no Argon client or retained anchor. It captures the
|
|
89
|
+
selected slots in one `eth_getProof` request and verifies them against that block's state root.
|
|
90
|
+
4. Cache the returned enriched locator records in the app. Their witness block may not be finalized
|
|
91
|
+
yet; keep the finalized locator records separately so a witness can be replaced after a reorg.
|
|
92
|
+
5. Call `buildGatewayActivityProof(...)` with cached captures for storage runtimes, or plain
|
|
93
|
+
discovered locators for receipt-only runtimes. It prefers storage when supported, selects the
|
|
94
|
+
closest retained anchor, and attaches the bounded ancestry path. Storage relay preparation does
|
|
95
|
+
not refetch witnesses, logs, or contract state. Each payload proves one complete locator.
|
|
96
|
+
6. Submit receipt payloads to `proveGatewayActivity(...)` and storage payloads (identified by
|
|
97
|
+
`locatorIndex` in `payload.proof`) to `proveGatewayActivityStorage(...)`. Keep any
|
|
98
|
+
`deferredLocators` for a later attempt. Replace captures listed in `recaptureLocators` using a
|
|
99
|
+
newer execution block: they are orphaned or outside the retained anchor's ancestry bound.
|
|
100
|
+
|
|
101
|
+
For explicit proof selection, use `buildGatewayActivityReceiptProofPayloads(...)` with discovered
|
|
102
|
+
locators or `buildGatewayActivityStorageProofs(...)` with captured locators. Capabilities are
|
|
103
|
+
independent; a runtime may accept either format.
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
const captures = await captureGatewayActivityStorageProofs({
|
|
107
|
+
executionClient,
|
|
108
|
+
executionBlock: await executionClient.getBlock({ blockTag: 'latest' }),
|
|
109
|
+
gatewayAddress,
|
|
110
|
+
locators,
|
|
111
|
+
});
|
|
112
|
+
// Persist captures in the app, then prepare relay transactions when anchors become available.
|
|
113
|
+
const result = await buildGatewayActivityProof(client, {
|
|
114
|
+
executionClient,
|
|
115
|
+
gatewayAddress,
|
|
116
|
+
locators: captures,
|
|
117
|
+
});
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Storage proofs include the full locator's activity logs and its `activityRootSeed`, even when the
|
|
121
|
+
last proven nonce falls inside that locator. Only `payload.activities` and
|
|
122
|
+
`payload.gatewayActivityNonceRange` describe the newly applied suffix. No bootstrap call or stored
|
|
123
|
+
last-locator hash is needed.
|
|
124
|
+
|
|
125
|
+
Receipt inclusion alone does not make a log the next gateway activity. Undecodable or unrelated
|
|
126
|
+
gateway logs are rejected without pausing synchronization; decoded activities must have the next
|
|
127
|
+
contiguous nonce. A valid next activity that conflicts with local business state can pause syncing.
|
|
128
|
+
After repairing that state, an operator can unpause and rebuild from the current nonce. Storage
|
|
129
|
+
proofs still authenticate the full locator, but do not apply its already-consumed prefix again. If
|
|
130
|
+
expiry cleanup failed after the final activity was committed, unpause alone does not retry it: the
|
|
131
|
+
next successfully processed activity block retries cleanup at its authenticated block boundary.
|
|
132
|
+
|
|
133
|
+
Deferred locators are waiting for missing predecessors or an execution anchor. A locator that
|
|
134
|
+
exceeds the runtime's proof capacity is a configuration/support error, not deferred work: waiting
|
|
135
|
+
cannot make it fit. This flow targets the contract with its 128-activity per-block cap. The pallet's
|
|
136
|
+
integrity checks cover that hard cap, maximum-size events, encoded proof bytes, and provider
|
|
137
|
+
weights.
|
|
138
|
+
|
|
139
|
+
The client library does not keep a long-lived locator or witness cache. App-side code should own it,
|
|
140
|
+
scoped to the range between the last proven gateway locator and the latest collected finalized
|
|
141
|
+
Ethereum block. Keep locators whose blocks are not yet anchored on Argon, and pass the cached
|
|
142
|
+
locators into both gateway proof building and execution-header backfill planning.
|