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

testnet-challenge-3-danizean

v1.1.5

Published

Template project to start building IBC enabled Solidity contracts, with Hardhat and Foundry support

Downloads

68

Readme

Template for Polymer Challenge 3

This repo provides template code to complete Polymer Testnet Challenge 3: https://forum.polymerlabs.org/t/challenge-3-cross-contract-query-with-polymer/475

📚 Documentation

There's some basic information here in the README but a more comprehensive documentation can be found in the official Polymer documentation.

📋 Prerequisites

The repo is compatible with both Hardhat and Foundry development environments.

  • Have git installed
  • Have node installed (v18+)
  • Have Foundry installed (Hardhat will be installed when running npm install)
  • Have just installed (recommended but not strictly necessary)

You'll need some API keys from third party's:

Some basic knowledge of all of these tools is also required, although the details are abstracted away for basic usage.

🧰 Install dependencies

To compile your contracts and start testing, make sure that you have all dependencies installed.

From the root directory run:

just install

to install the vIBC core smart contracts as a dependency.

Additionally Hardhat will be installed as a dev dependency with some useful plugins. Check package.json for an exhaustive list.

Note: In case you're experiencing issues with dependencies using the just install recipe, check that all prerequisites are correctly installed. If issues persist with forge, try to do the individual dependency installations...

⚙️ Set up your environment variables

Convert the .env.example file into an .env file. This will ignore the file for future git commits as well as expose the environment variables. Add your private keys and update the other values if you want to customize (advanced usage feature).

cp .env.example .env

This will enable you to sign transactions with your private key(s). If not added, the scripts from the justfile will fail.

Configuration file

The configuration file is where all important data is stored for the just commands and automation. We strive to make direct interaction with the config file as little as possible.

By default the configuration file is stored at root as config.json.

The configuration file is pre-set with the contract you will need to interact with on Base. Do not change it in order to correctly complete the challenge

Obtaining testnet ETH

The account associated with your private key must have both Base Sepolia and Optimism Sepolia ETH. To obtain the testnet ETH visit:

🏃🏽🏃🏻‍♀️ Instructions

The project comes with an almost complete contract CCQueryUC.sol in the contracts directory. Your task is to implement two functions:

  1. sendUniversalPacket - You will need to configure the payload to correctly be decoded and pass conditional logic of the base contract you are sending the packet to.
  2. onUniversalAcknowledgement - You will need to emit the event LogAcknowledgment in order to provide evidence to complete this challenge.

Once you have completed the implementation of these two functions, run:

just run-challenge-3

This will:

  1. Deploy your CCQueryUC.sol contract to Optimism
  2. Send a packet to the Base Contract

💡 Questions or Suggestions?

Feel free to open an issue for questions, suggestions, or discussions related to this repository. For further discussion as well as a showcase of some community projects, check out the Polymer developer forum.

Thank you for being a part of our community!