@nilfoundation/smart-contracts
TypeScript icon, indicating that this package has built-in type declarations

0.8.0 • Public • Published

@nilfoundation/smart-contracts


An NPM package housing Solidity extension libraries for working with =nil;.


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-contracts

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

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";

Package Sidebar

Install

npm i @nilfoundation/smart-contracts

Weekly Downloads

165

Version

0.8.0

License

Apache-2.0

Unpacked Size

8.99 MB

Total Files

33

Last publish

Collaborators

  • nemothenoone
  • ukorvl
  • zontec
  • skomorokh