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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sendgft/contracts

v1.33.0

Published

gft.xyz smart contracts

Downloads

58

Readme

gft.xyz Smart contracts.

These contracts use the Diamond Standard to allow for infinite size and upgradeability.

Note: IMaster.sol specifies a convenience interface combines all the different diamond facet interfaces into one - we recommend using this.

How to use

Install the package:

npm install @sendgft/contracts

The package exposes the following properties:

  • contracts - the key contracts JSON artifact contents
  • addresses - contents of deployedAddresses.json
  • events - ABIs for events to listen for

Example

const ethers = require('ethers')
const { contracts, addresses } = require('@sendgft/contracts')

const contract = new ethers.Contract(
  addresses.Gifter.chains[5].address, // goerli
  contracts.IMaster.abi
)

Development

Requirements:

  • Node.js 14.18.0+
  • Yarn 1.22.10+ (use npm i -g yarn once Node.js is installed)

Copy .env.sample to .env and fill in the values (available in our password vault).

Install dependencies:

yarn

Initialize git submodules (for maker-otc trading engine):

git submodule init
git submodule update

First, run the dev network in a separate terminal:

yarn devnet

Compile the contracts:

yarn compile

Setup the deployment config (only need to run this once):

yarn setup-deploy-config:local

Now deploy the contracts to it:

yarn deploy:local

Now you can run the tests:

yarn test

To run a single test:

yarn test ./test/testName.js

Testing DEX integrations

To test the AvaxDex.sol integration with TraderJoe:

yarn compile
export MNEMONIC="..." 
./scripts/testAvaxDex.js

NOTE: MNEMONIC should be set to your account's mnemonic. Ensure it has enough AVAX to deploy and interact with the DEX contract.

Deployments

We use the same wallet on every network to deploy from. Deployment always happens at the same wallet nonce so that our contract addresses are the same on every network.

The deployment script will check to ensure that the wallet nonce is at the expected number prior to deploying. Once the contracts are deployed on a given network, subsequent deployments will simply result in an upgrade call.

Goerli testnet

yarn setup-deploy-config:goerli
yarn deploy:goerli

Avalanche mainnet

yarn setup-deploy-config:avalanche
yarn deploy:avalanche

Publishing

Ensure you deploy the contracts first (see above) so that deployedAddresses.json is updated.

Commit the code and push the changes.

Then run:

yarn release

Git Subtree

Note that the cards/** folder contents are populated using git subtree and the following repos:

  • cards/cells-cat-card = https://github.com/sendgft/cells-cat-card

License

MIT (see LICENSE.md)