From e0569e6d27835e5c1b6747f441002e01cb268c33 Mon Sep 17 00:00:00 2001 From: Gorka Date: Wed, 18 Mar 2026 16:50:52 -0300 Subject: [PATCH] fix(lifecycle): use snake_case event names to match Soroban serialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Soroban serializes contractevent struct names as snake_case symbols, not PascalCase. ContractInitialized → contract_initialized, etc. --- lifecycle/ci-setup.ts | 4 ++-- lifecycle/ci-test.ts | 2 +- lifecycle/main.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lifecycle/ci-setup.ts b/lifecycle/ci-setup.ts index baed25c..376bae4 100644 --- a/lifecycle/ci-setup.ts +++ b/lifecycle/ci-setup.ts @@ -75,7 +75,7 @@ async function main() { await deployChannelAuth(server, admin, NETWORK_PASSPHRASE, channelAuthHash); const deployEvents = extractEvents(authDeployTx); - const initResult = verifyEvent(deployEvents, "ContractInitialized", true); + const initResult = verifyEvent(deployEvents, "contract_initialized", true); if (initResult.found) console.log(" ContractInitialized event verified"); // Step 2: Deploy Channel (Privacy Channel) @@ -99,7 +99,7 @@ async function main() { server, admin, NETWORK_PASSPHRASE, channelAuthId, provider.publicKey(), ); const addEvents = extractEvents(addTx); - const addResult = verifyEvent(addEvents, "ProviderAdded", true); + const addResult = verifyEvent(addEvents, "provider_added", true); if (addResult.found) console.log(" ProviderAdded event verified"); // Write provider.env (read by provider-entrypoint.sh) diff --git a/lifecycle/ci-test.ts b/lifecycle/ci-test.ts index 3c9f8b6..a78d965 100644 --- a/lifecycle/ci-test.ts +++ b/lifecycle/ci-test.ts @@ -130,7 +130,7 @@ async function main() { Keypair.fromSecret(providerSecretKey).publicKey(), ); const removeEvents = extractEvents(removeTx); - const removeResult = verifyEvent(removeEvents, "ProviderRemoved", true); + const removeResult = verifyEvent(removeEvents, "provider_removed", true); if (removeResult.found) console.log(" ProviderRemoved event verified"); const elapsed = ((Date.now() - startTime) / 1000).toFixed(1); diff --git a/lifecycle/main.ts b/lifecycle/main.ts index 185ae96..245074b 100644 --- a/lifecycle/main.ts +++ b/lifecycle/main.ts @@ -83,7 +83,7 @@ async function main() { ); const deployEvents = extractEvents(authDeployTx); - const initResult = verifyEvent(deployEvents, "ContractInitialized", true); + const initResult = verifyEvent(deployEvents, "contract_initialized", true); if (initResult.found) console.log(" ContractInitialized event verified"); // ── Step 2: Deploy Channel (Privacy Channel) ────────────────── @@ -124,7 +124,7 @@ async function main() { ); const addEvents = extractEvents(addTx); - const addResult = verifyEvent(addEvents, "ProviderAdded", true); + const addResult = verifyEvent(addEvents, "provider_added", true); if (addResult.found) console.log(" ProviderAdded event verified"); // ── Start provider-platform for payment flow ────────────────── @@ -220,7 +220,7 @@ async function main() { ); const removeEvents = extractEvents(removeTx); - const removeResult = verifyEvent(removeEvents, "ProviderRemoved", true); + const removeResult = verifyEvent(removeEvents, "provider_removed", true); if (removeResult.found) console.log(" ProviderRemoved event verified"); // ── Summary ──────────────────────────────────────────────────