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

@across-protocol/contracts-v2

v2.5.10

Published

The latest contract deployments on Production will always be under the `deployed` tag.

Downloads

1,009

Readme

Across-logo

Contains smart contract suite to enable instant token transfers between any two networks. Relays are backstopped by liquidity held in a central HubPool on Ethereum, which also serves as the cross-chain administrator of all contracts in the system. SpokePool contracts are deployed to any network that wants to originate token deposits or be the final destination for token transfers, and they are all governed by the HubPool on Ethereum.

This contract set is the second iteration of the Across smart contracts which facilitate token transfers from any L2 to L1.

These contracts were audited by OpenZeppelin which is a great resource for understanding the contracts.

This video is also useful for understanding the technical architecture.

Deployed Contract Versions

The latest contract deployments on Production will always be under the deployed tag.

Build

yarn
yarn hardhat compile

Test

yarn test # Run unit tests without gas analysis
yarn test:gas-analytics # Run only tests that count gas costs
yarn test:report-gas # Run unit tests with hardhat-gas-reporter enabled

Lint

yarn lint
yarn lint-fix

Deploy and Verify

NODE_URL_1=https://mainnet.infura.com/xxx yarn hardhat deploy --tags HubPool --network mainnet
ETHERSCAN_API_KEY=XXX yarn hardhat etherscan-verify --network mainnet --license AGPL-3.0 --force-license --solc-input

Tasks

Finalize Scroll Claims from L2 -> L1 (Mainnet | Sepolia)
yarn hardhat finalize-scroll-claims --l2-address {operatorAddress}

Slither

Slither is a Solidity static analysis framework written in Python 3. It runs a suite of vulnerability detectors, prints visual information about contract details, and provides an API to easily write custom analyses. Slither enables developers to find vulnerabilities, enhance their code comprehension, and quickly prototype custom analyses.

Spire-Contracts has been analyzed using [email protected] and no major bugs was found. To rerun the analytics, run:

slither contracts/SpokePool.sol
\ --solc-remaps @=node_modules/@
\ --solc-args "--optimize --optimize-runs 1000000"
\ --filter-paths "node_modules"
\ --exclude naming-convention

You can replace SpokePool.sol with the specific contract you want to analyze.

ZK Sync Adapter

These are special instructions for compiling and deploying contracts on zksync. The compile command will create artifacts-zk and cache-zk directories.

Compile

This step requires Docker Desktop to be running, as the solc docker image is fetched as a prerequisite.

yarn compile-zksync

License

All code in this repository is licensed under BUSL-1.1 unless specified differently in the file. Individual exceptions to this license can be made by Risk Labs, which holds the rights to this software and design. If you are interested in using the code or designs in a derivative work, feel free to reach out to [email protected].