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

wormhole-solidity-sdk

v0.9.0

Published

Wormhole Solidity SDK

Downloads

165

Readme

Wormhole Solidity SDK

The purpose of this SDK is to make on-chain integrations with Wormhole on EVM compatible chains as smooth as possible by providing all necessary Solidity interfaces along with useful libraries and tools for testing.

For off-chain code, please refer to the TypeScript SDK and in particular the EVM platform implementation.

This SDK was originally created for integrations with the WormholeRelayer and then expanded to cover all integration.

Releases

License Reminder

The code is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

So make sure you check / audit any code you use before deploying to mainnet.

The main branch is considered the nightly version of the SDK. Stick to tagged releases for a stable experience.

Note: The SDK is currently on its way to a version 1.0 . Proceed with extra caution until then.

Installation

Foundry and Forge

forge install wormhole-foundation/[email protected]

Hardhat

npm install wormhole-solidity-sdk

EVM Version

One hazard of developing EVM contracts in a cross-chain environment is that different chains have varying levels of "EVM-equivalence". This means you have to ensure that all chains that you are planning to deploy to support all EIPs/opcodes that you rely on.

For example, if you are using a solc version newer than 0.8.19 and are planning to deploy to a chain that does not support PUSH0 opcode (introduced as part of the Shanghai hardfork), you should set evm_version = "paris" in your foundry.toml, since the default EVM version of solc was advanced from Paris to Shanghai as part of solc's 0.8.20 release.

Testing

It is strongly recommended that you run the forge test suite of this SDK with your own compiler version to catch potential errors that stem from differences in compiler versions early. Yes, strictly speaking the Solidity version pragma should prevent these issues, but better to be safe than sorry, especially given that some components make extensive use of inline assembly.

IERC20 Remapping

This SDK comes with its own IERC20 interface. Given that projects tend to combine different SDKs, there's often this annoying issue of clashes of IERC20 interfaces, even though the are effectively the same. We handle this issue by importing IERC20/IERC20.sol which allows remapping the IERC20/ prefix to whatever directory contains IERC20.sol in your project, thus providing an override mechanism that should allow dealing with this problem seamlessly until forge allows remapping of individual files.

Components

For additional documentation of components, see the docs directory.

Philosophy/Creeds

In This House We Believe:

  • clarity breeds security
  • Do NOT trust in the Lord (i.e. the community, auditors, fellow devs, FOSS, ...) with any of your heart (i.e. with your or your users' security), but lean hard on your own understanding.
  • Nothing is considered safe unless you have personally verified it as such.
  • git gud
  • shut up and suffer

Notable Solidity Repos