Skip to content

Conversation

@shileiwill
Copy link
Contributor

@shileiwill shileiwill commented Oct 28, 2025

confirmed @george-dorin 's workflow succeeded after the fix:

leishi@MB-MJ2FP47WKD test117 % cre workflow simulate flow117
Workflow compiled
2025-10-28T11:12:19Z [SIMULATION] Simulator Initialized

2025-10-28T11:12:19Z [SIMULATION] Running trigger trigger=cron-trigger@1.0.0
2025-10-28T11:12:19Z [USER LOG] msg="PoR workflow started" payload="scheduled_execution_time:{seconds:1761675139 nanos:105663000}"
2025-10-28T11:12:19Z [USER LOG] msg="Got EVM client" chainSelector=16015286601757825753
2025-10-28T11:12:19Z [USER LOG] msg="[logger] Got on-chain balance with BalanceAt() for address 0x13CB6AE34A13a0977F4d7101eBc24B87Bb23F0d5: abs_val:\"F\\x97\\xa0;\\xfd\\x97\\x97\\xa0M\" sign:1"
2025-10-28T11:12:19Z [USER LOG] msg="[logger] Got on-chain balance with BalanceAt() for address 0x13CB6AE34A13a0977F4d7101eBc24B87Bb23F0d5: 1302197883816025497677"
2025-10-28T11:12:19Z [USER LOG] msg="getting Balance Reader contract ABI"
2025-10-28T11:12:19Z [USER LOG] msg="successfully got Balance Reader contract ABI"
2025-10-28T11:12:19Z [USER LOG] msg="Got raw CallContract output: 0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000007b54a731a48e364"
2025-10-28T11:12:19Z [USER LOG] msg="Read on-onchain balances for address 0xDc58480363fca702ADbECD61911314E602D324EA: &[555431987272803172]"
2025-10-28T11:12:19Z [USER LOG] msg="Total on-chain balance for addresses 1302753315803298300849"
2025-10-28T11:12:19Z [USER LOG] msg="Response is account name: TrueUSD, totalTrust: 501931400.8799999952, ripcord: false, updatedAt: 2025-10-28 18:12:05.985 +0000 UTC"
2025-10-28T11:12:19Z [USER LOG] msg="Got price: 1302753315853491440937, for feed: 018e16c38e000320000000000000000000000000000000000000000000000000, at time: 1761675125"
2025-10-28T11:12:19Z [USER LOG] msg="final report generated\n"
2025-10-28T11:12:20Z [USER LOG] msg="Submitted report on-chain"

Workflow Simulation Result:
 "PoR Workflow successfully completed"

2025-10-28T11:12:20Z [SIMULATION] Execution finished signal received
2025-10-28T11:12:20Z [SIMULATION] Skipping WorkflowEngineV2
leishi@MB-MJ2FP47WKD test117 % 

@shileiwill shileiwill marked this pull request as ready for review October 28, 2025 17:56
@shileiwill shileiwill requested review from a team as code owners October 28, 2025 17:56
// Convert proto big-int to *big.Int; nil ⇒ latest (handled by geth toBlockNumArg)
var blockArg *big.Int
if input != nil {
blockArg = pb.NewIntFromBigInt(input.BlockNumber) // returns nil if input.BlockNumber is nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be fined in FromBigInt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the implementation:

func NewIntFromBigInt(b *BigInt) *big.Int {
	if b == nil {
		return nil
	}

	bigInt := new(big.Int).SetBytes(b.AbsVal)
	if b.Sign < 0 {
		bigInt = bigInt.Neg(bigInt)
	}

	return bigInt
}

nil will be returned as nil, others will be converted to *big.Int and return.

anirudhwarrier
anirudhwarrier previously approved these changes Oct 28, 2025

// Convert proto big-int to *big.Int; nil ⇒ latest (handled by geth toBlockNumArg)
var blockArg *big.Int
if input != nil {
Copy link
Contributor

@infiloop2 infiloop2 Oct 28, 2025

Choose a reason for hiding this comment

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

linter is complaning here

  <file name="core/capabilities/fakes/evm_chain.go">
    <error column="5" line="308" message="SA5011(related information): this check suggests that the pointer can be nil" severity="error" source="staticcheck"></error>
  </file>
</checkstyle>

I see we directly access input.Account before. should that also be fixed to be under nil check or can we just expect this to be non nil?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

safe to just add a check.

timothyF95
timothyF95 previously approved these changes Oct 28, 2025
infiloop2
infiloop2 previously approved these changes Oct 28, 2025
@infiloop2 infiloop2 enabled auto-merge October 28, 2025 18:36
@cl-sonarqube-production
Copy link

@infiloop2 infiloop2 added this pull request to the merge queue Oct 28, 2025
Merged via the queue into develop with commit 418f9c8 Oct 28, 2025
228 of 231 checks passed
@infiloop2 infiloop2 deleted the DEVSVCS-2916 branch October 28, 2025 19:26
@trunk-io
Copy link

trunk-io bot commented Oct 28, 2025

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

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.

6 participants