npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

decentraland-contract-plugins

v2.2.0

Published

Decentraland Contracts Plugins

Downloads

94

Readme

Contracts Plugins

⚠️ Work in progress - Collaboration is accepted

⚠️ Buidler Tasks are work in progress

Contracts Plugins is a set of usefull classes to deploy Decentraland contracts for testing purposes.

Table

Install

npm i --save-dev contracts-plugins

Get started

To deploy your Decentraland fake contracts just import the contract you want to use and deploy it. Every contract is deployed within initial settings to let you focus only in testing your new contracts.

exchange.spec.ts

import { Mana, ADDRESS_INDEXES } from 'contracts-plugins'

const BN = web3.utils.BN
const expect = require('chai').use(require('bn-chai')(BN)).expect

describe('Exchange', function() {
  let accounts
  let deployer
  let mana
  let manaContract

  beforeEach(async function() {
    accounts = await web3.eth.getAccounts()
    deployer = accounts[ADDRESS_INDEXES.deployer]

    mana = new Mana({ accounts, artifacts })
    manaContract = await mana.deploy({
      txParams: {
        from: deployer,
        gas: 6e6,
        gasPrice: 21e9
      }
    })
  })

  it('should set initial balances', async function() {
    for (let account of accounts) {
      let balance = await manaContract.balanceOf(account)
      expect(balance).to.eq.BN(web3.utils.toWei('1000', 'ether'))
    }
  })
})

Contracts could need other contract addresses to be deployed and be ready for testing as the Marketplace contract.

Addresses

The contracts allowed are based on the accounts from set when running ganache:

| index | name | | ----- | --------------------- | | 0 | deployer | | 1 | user | | 2 | anotherUser | | 3 | operator | | 4 | anotherOperator | | 5 | updateOperator | | 6 | anotherUpdateOperator | | 7 | buyer | | 8 | anotherBuyer | | 9 | bidder | | 10 | anotherBidder | | 11 | hacker |

Use ths script

Contracts

Every contract is deployed by the deployer account.

MANA

Simulates Decentraland MANA contract

deploy

Deploy the MANA contract, set initial balances for all the accounts and return the contrcact reployed

mana.deploy(options)

addBalances

Min amount into every account of accounts.

mana.addBalances(accounts: string[], amount: string)

removeBalances

Remove balances from accounts.

mana.removeBalances(accounts: string[])

getContract

Get the deployed MANA contract

mana.getContract()

ERC721

ERC721 generic contract

deploy

Deploy an ERC721 contract and mint initial tokens:

getContract

Get the deployed erc721 contract

Marketplace

deploy

The marketplace contract needs to be initialized with an erc20 token as the accepted token and an erc721 token as the legacyNFT (related to marketplace v1). This contracts can be passed as properties of the deploy options. If not they will instanceated and deployed.

options

type Marketplaceptions = {
  mana: Mana | null
  erc721: Erc721 | null
  txParams: TxParams
}

Bid

deploy

The marketplace contract needs to be initialized with an erc20 token as the accepted token and an erc721 token as the legacyNFT (related to marketplace v1). This contracts can be passed as properties of the deploy options. If not they will instanceated and deployed.

options

type Marketplaceptions = {
  mana: Mana | null
  erc721: Erc721 | null
  txParams: TxParams
}

Listing

deploy

The marketplace contract needs to be initialized with an erc20 token as the accepted token and an erc721 token as the legacyNFT (related to marketplace v1). This contracts can be passed as properties of the deploy options. If not they will instanceated and deployed.