sway
September 1, 2023, 7:47pm
1
Here is my code of market contract:https://github.com/compolabs/sway-lend/blob/beta-4/contracts/market/src/main.sw
I try to call supplyBase fn, and also I have 0.5ETH ,but keep getting outOfGas error. Tried to increase gasLimit from 1 to 100000 but it didn’t help anyway
const marketContract = MarketAbi__factory.connect(market, wallet);
return market.functions
.supply_base()
.callParams({
forward: {
amount: this.tokenAmount.toString(),
assetId: this.baseToken.assetId,
},
})
.txParams({ gasPrice: 100000 })
.call();
Abis that I use:https://github.com/compolabs/sway-lend/tree/beta-4/frontend/src/contracts
“fuels”: “^0.54.0”,
@sway Interesting. Can you try specifying the gasLimit
instead of gasPrice
? You can use the same value.
sway
September 4, 2023, 1:18pm
4
Found solution , added gasLimit to callParams
instead of
return market.functions
.supply_base()
.callParams({
forward: {
amount: this.tokenAmount.toString(),
assetId: this.baseToken.assetId,
},
})
.txParams({ gasPrice: 100000 })
.call();
changed to
return market.functions
.supply_base()
.callParams({
forward: {
amount: this.tokenAmount.toString(),
assetId: this.baseToken.assetId,
},
gasLimit: 100000,
})
.call();
1 Like
Oh compolabs, fastest gun in town
Actually, this might be a problem.
Follow-up issue:
1 Like
system
Closed
September 25, 2023, 7:13pm
7
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.