Nil smart-contracts implementations
npm install @nilfoundation/smart-contracts
An NPM package housing Solidity extension libraries for working with =nil;.
This NPM package contains the Solidity libraries for interacting with the =nil; cluster. These extensions provide access to essential functionalities of =nil; such as making async calls, accepting external messages and working with custom tokens.
To install the package:
``bash`
npm install @nilfoundation/smart-contracts
The package includes four contracts:
* Faucet.sol is a service contract for distributing tokens
* Nil.sol is the extension library that allows for making async calls and performing other important operations
* NilTokenBase.sol is the base contract for custom tokens on the cluster
* SmartAccount.sol is the default smart account that is deployed by the =nil; CLI and Nil.js
To use the package, simply import it in a JS/TS or Solidity project:
`typescript0x${SmartAccount_compiled.evm.bytecode.object}
import SmartAccount_compiled from '@nilfoundation/smart-contracts/artifacts/SmartAccount.json';
const smartAccount_bytecode = `
`solidity
pragma solidity ^0.8.0;
import "@nilfoundation/smart-contracts/contracts/SmartAccount.sol";
``