Skip to content

Conversation

jeffrifwaldsmartcontract
Copy link
Contributor

@jeffrifwaldsmartcontract jeffrifwaldsmartcontract commented Sep 30, 2025

All of the triggers here pass with cre-cli and match the output of the Go PoR workflow with exception of updateReserves. I keep getting an execution reverted error on that step. I need to confirm, but looking at the Go generated code, there is a ReservesProxy, so it might be faking the call.

I'll see if I can confirm what is going on the Go side, but the updateReserves call txHash message is always Write report transaction succeeded at" txHash=0x0000000000000000000000000000000000000000000000000000000000000000, so that might mean I'm missing something.

@jeffrifwaldsmartcontract jeffrifwaldsmartcontract marked this pull request as ready for review September 30, 2025 05:18
@jeffrifwaldsmartcontract jeffrifwaldsmartcontract requested a review from a team as a code owner September 30, 2025 05:18

const totalReserveScaled = (reserveInfo as unknown as ReserveInfo)
.totalReserve;
const totalReserveScaled = BigInt(reserveInfo.totalReserve * 1e18);
Copy link
Contributor Author

@jeffrifwaldsmartcontract jeffrifwaldsmartcontract Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scale here to 18 decimals instead of in fetchReserveInfo to match the Go workflow

.result();

const txHash = resp.txHash;
// TODO: Why does the writeReport fail with an "execution reverted" error?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ernest-nowacki I can't tell if the abi function is not correct or if the Go side is doing something tricky here. I can run through this step in Go, but here I always get an "execution reverted" error. How did you generate the writeReportFromUpdateReserves call in abi.ts?

@ernest-nowacki ernest-nowacki merged commit 1cfd01d into feat/PoR Sep 30, 2025
@ernest-nowacki ernest-nowacki deleted the jr-feat/PoR branch September 30, 2025 08:26
ernest-nowacki added a commit that referenced this pull request Sep 30, 2025
* Start moving PoR example to the examples repo

* update the PoR workflow

* Refactor the code

* debugging workflows (#103)

* Fix PoR example

* Revert format changes

* use viem Address

---------

Co-authored-by: Jeff Rifwald <jeff.rifwald@smartcontract.com>
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.

2 participants