0.9.0 • Published 6 months ago
@nilfoundation/smart-contracts v0.9.0
Table of Contents
Overview
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.
Installation
To install the package:
npm install @nilfoundation/smart-contractsContracts
The package includes four contracts:
Faucet.solis a service contract for distributing tokensNil.solis the extension library that allows for making async calls and performing other important operationsNilTokenBase.solis the base contract for custom tokens on the clusterSmartAccount.solis the default smart account that is deployed by the =nil; CLI andNil.js
Usage
To use the package, simply import it in a JS/TS or Solidity project:
import SmartAccount_compiled from '@nilfoundation/smart-contracts/artifacts/SmartAccount.json';
const smartAccount_bytecode = `0x${SmartAccount_compiled.evm.bytecode.object}`pragma solidity ^0.8.0;
import "@nilfoundation/smart-contracts/contracts/SmartAccount.sol";