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

@mapprotocol/protocol

v0.8.0

Published

MAP Protocol management and utils contracts

Downloads

394

Readme

MAP Protocol management contracts

Introduction

Deploy Factory

The factory contract helps to deploy to deterministic addresses without an init code factor. Every developer can use contract 0x6258e4d2950757A749a4d4683A7342261ce12471 to deploy deterministic addresses contract.

Read this to get more information.

MPT verifier

The contract deployed on the MAP Relay Chain is responsible for MPT proof verify. Deployed address:

  • MAPO mainnet: 0x81D26E2387059CF43ADA1c11c12D5d6627184fA1
  • Makalu testnet: 0x81D26E2387059CF43ADA1c11c12D5d6627184fA1
interface IMPTVerify {
    function verifyTrieProof(
        bytes32 _root,
        bytes memory _key,
        bytes[] memory _proof,
        bytes memory _node
    ) external pure returns (bool);
}

Light client manager

The contract deployed on the MAP Relay Chain is responsible for managing light clients, it helps:

  • Register light client
  • Verify cross chain proof
  • Get light client verification range

Deployed address:

  • MAPO mainnet: 0x624E6F327c4F91F1Fa6285711245c215de264d49
  • Makalu testnet: 0xDD3A69f8f59d892476B0be0260932b4f8d8268Ff

Maintainer manager

The contract deployed on the MAP Relay Chain is responsible for managing maintainers, it helps:

  • staking
  • reward distribution
  • work address binding.

Deployed address:

  • MAPO mainnet: 0x2ef591cAac00d21F16d25988678856244205c56E
  • Makalu testnet: 0xd0A42e4836A8827cB9b8A3e13f07abdC5610aC33

Compile

Build using the following commands:

git clone https://github.com/mapprotocol/map-contracts.git
cd protocol
npm install
npx hardhat compile

Test

npx hardhat test

Deploy

npx hardhat deploy --tags MaintainerManager --network <network>

npx hardhat deploy --tags LightClientManager --network <network>

Upgrade

npx hardhat deploy --tags MaintainerManagerUp --network <network>

npx hardhat deploy --tags LightClientManagerUp --network <network>

Useage

Register a light client

cmd

npx hardhat clientRegister --chain <chain id for light client> --contract <contract for light client>  --network <network>

example

  npx hardhat clientRegister --chain 1 --contract "0x366db0D543b709434Cb91113270521e50fC2fe49" --network Map

Add or remove a maintainer

cmd

 npx hardhat MaintainerWhileListSet --add <add:true remove:false> --address <Maintainer address> --network <network>

example

  npx hardhat MaintainerWhileListSet --add true --address "0x2f6950D5adE9025266677946c1E0233526387219" --network Map