CRYPTO NEWS

How to execute pure function locally in ethers js

Say I have a solidity library that defines a pure method, how can I call that method locally(possibly in the client’s browser) using ethers js(or some other js package) without making a call to a NaaS provider?

 // MyLibrary.sol library Library {      function add(uint a, uint b) public pure returns(uint number) {         return a + b;     } } 

How to execute pure function locally in ethers js

Shopping cart
There are no products in the cart!
Continue shopping
0