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
Create a .env file in the root directory withINFURA_API_KEY for mainnet or testnet deployment.
Testing the contracts
npm run test:contract
Testing the JS SDK
Run a local blockchain
npm run chain
Deploy the contract, run the test on a different terminal
npm run deploy:sdk npm run test:sdk
Testing the contract & SDK
npm run deploy:sdk npm runtest
Getting started
npm i @safient/contracts
Usage
// If not injected web3 provider, create a jsonRpcProviderconst{ JsonRpcProvider}=require('@ethersproject/providers');constprovider=newJsonRpcProvider('http://localhost:8545');// Get signer and chainId from provider(async()=>{constsigner=awaitprovider.getSigner();constproviderNetwork=awaitprovider.getNetwork();constchainId=providerNetwork.chainId;})();