This is an estimation bug from the SDK side. The provide value is insufficient to satisfy the onchain gas calculations.
Failing sim here - fails at Axelar at the end
Happens in prod and on manage-demo branch
repayBatch ( fromCentrifugeId : number , toCentrifugeId : number , batch : HexString , extraPayment = 0n ) {
const self = this
return this . _transact ( async function * ( ctx ) {
const [ addresses , client ] = await Promise . all ( [
self . _protocolAddresses ( fromCentrifugeId ) ,
self . getClient ( fromCentrifugeId ) ,
] )
const batchHash = keccak256 ( batch )
const [ counter , gasLimit ] = await client . readContract ( {
address : addresses . gateway ,
abi : ABI . Gateway ,
functionName : 'underpaid' ,
args : [ toCentrifugeId , batchHash ] ,
} )
if ( counter === 0n ) {
throw new Error ( `Batch is not underpaid and can't be repaid. Batch hash: "${ batchHash } "` )
}
const estimate = await client . readContract ( {
address : addresses . multiAdapter ,
abi : ABI . MultiAdapter ,
functionName : 'estimate' ,
args : [ toCentrifugeId , batch , gasLimit ] ,
} )
yield * doTransaction ( 'Repay' , ctx , ( ) =>
ctx . walletClient . writeContract ( {
address : addresses . gateway ,
abi : ABI . Gateway ,
functionName : 'repay' ,
args : [ toCentrifugeId , batch , ctx . signingAddress ] ,
value : estimate + extraPayment ,
} )
)
} , fromCentrifugeId )
}
This method does not caculate the gas correctly. Use in the scanner to repay but creates a tx with insufficient gas - see here
Screen.Recording.2026-03-05.at.09.26.04.mov
This is an estimation bug from the SDK side. The provide
valueis insufficient to satisfy the onchain gas calculations.manage-demobranchsdk/src/Centrifuge.ts
Lines 670 to 704 in 21b4e11
This method does not caculate the gas correctly. Use in the scanner to repay but creates a tx with insufficient gas - see here
Screen.Recording.2026-03-05.at.09.26.04.mov