You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.
The problem is that the call to "totalFunctions()" sends a transaction. But totalFunctions() is a read-only method on the contract.
I can't call any read-only methods. The culprit might be etherlime.ContractAt because that is what I need to use to access a contract and call its methods.
Using etherlime 2.2.6.
Here is my code:
constetherlime=require('etherlime-lib');constDiamondExample=require('../build/DiamondExample.json');constDiamondFacet=require('../build/DiamondFacet.json');describe('DiamondExampleTest',()=>{letaliceAccount=accounts[3];letdeployer;letdiamondFacet;before(async()=>{deployer=newetherlime.EtherlimeGanacheDeployer(aliceAccount.secretKey);constdiamondExample=awaitdeployer.deploy(DiamondExample);console.log(diamondExample.contractAddress);diamondFacet=awaitetherlime.ContractAt(DiamondFacet,diamondExample.contractAddress);});it('should get all the facets and functions of the contract',async()=>{lettotal=awaitdiamondFacet.totalFunctions();console.log(total);// We get transactions details instead of expected return value });});
Here is the abi for the totalFunctions() function:
The problem is that the call to "totalFunctions()" sends a transaction. But totalFunctions() is a read-only method on the contract.
I can't call any read-only methods. The culprit might be
etherlime.ContractAt
because that is what I need to use to access a contract and call its methods.Using etherlime 2.2.6.
Here is my code:
Here is the abi for the
totalFunctions()
function:The text was updated successfully, but these errors were encountered: