{"_id":"@danizean/testnet-challenge-3-danizean","name":"@danizean/testnet-challenge-3-danizean","dist-tags":{"latest":"1.1.5"},"versions":{"1.1.5":{"name":"@danizean/testnet-challenge-3-danizean","version":"1.1.5","description":"Template project to start building IBC enabled Solidity contracts, with Hardhat and Foundry support","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/danizean/testnet-challenge-3-danizean.git"},"keywords":["IBC","Solidity"],"author":{"name":"danizean"},"license":"ISC","bugs":{"url":"https://github.com/danizean/testnet-challenge-3-danizean"},"homepage":"https://github.com/danizean/testnet-challenge-3-danizean","devDependencies":{"@nomicfoundation/hardhat-foundry":"^1.1.1","@nomicfoundation/hardhat-toolbox":"^4.0.0","hardhat":"^2.19.5"},"dependencies":{"@openzeppelin/contracts":"^4.7.6","axios":"^1.6.7","dotenv":"^16.4.1","hardhat-verify":"^1.0.0","testnet-challenge-3-danizean":"^1.1.5"},"directories":{"lib":"lib"},"_id":"@danizean/testnet-challenge-3-danizean@1.1.5","gitHead":"cf126aa39f88437d7da5bc589403a9d817ff33e8","_nodeVersion":"20.11.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-DJAuN5BFCmOzl520comy/5s8EZCLawEsckQXnge0rXkslelJL0VlGugtxCb0WzuQSV29fx7FrszSc0PCwhpQvw==","shasum":"45929c9ebb3d87b14fc30a84b91441cc4e442111","tarball":"https://registry.npmjs.org/@danizean/testnet-challenge-3-danizean/-/testnet-challenge-3-danizean-1.1.5.tgz","fileCount":3937,"unpackedSize":75982169,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHohgOnXqlXHbALvw0UDOyyUWga03ONIDEGRuU4SZhTAiBWh8VsO5QWL8FKkjAGmPfktsd2SnRtczGjQtklDnrLJA=="}]},"_npmUser":{"name":"danizean","email":"hasyimdani12@gmail.com"},"maintainers":[{"name":"danizean","email":"hasyimdani12@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/testnet-challenge-3-danizean_1.1.5_1711429810467_0.35589876168554246"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-26T05:10:10.362Z","1.1.5":"2024-03-26T05:10:11.073Z","modified":"2024-03-26T05:10:11.598Z"},"maintainers":[{"name":"danizean","email":"hasyimdani12@gmail.com"}],"description":"Template project to start building IBC enabled Solidity contracts, with Hardhat and Foundry support","homepage":"https://github.com/danizean/testnet-challenge-3-danizean","keywords":["IBC","Solidity"],"repository":{"type":"git","url":"git+https://github.com/danizean/testnet-challenge-3-danizean.git"},"author":{"name":"danizean"},"bugs":{"url":"https://github.com/danizean/testnet-challenge-3-danizean"},"license":"ISC","readme":"# Template for Polymer Challenge 3\n\nThis repo provides template code to complete Polymer Testnet Challenge 3: https://forum.polymerlabs.org/t/challenge-3-cross-contract-query-with-polymer/475\n\n## 📚 Documentation\n\nThere's some basic information here in the README but a more comprehensive documentation can be found in [the official Polymer documentation](https://docs.polymerlabs.org/docs/category/build-ibc-dapps-1).\n\n## 📋 Prerequisites\n\nThe repo is **compatible with both Hardhat and Foundry** development environments.\n\n- Have [git](https://git-scm.com/downloads) installed\n- Have [node](https://nodejs.org) installed (v18+)\n- Have [Foundry](https://book.getfoundry.sh/getting-started/installation) installed (Hardhat will be installed when running `npm install`)\n- Have [just](https://just.systems/man/en/chapter_1.html) installed (recommended but not strictly necessary)\n\nYou'll need some API keys from third party's:\n- [Optimism Sepolia](https://optimism-sepolia.blockscout.com/account/api-key) and [Base Sepolia](https://base-sepolia.blockscout.com/account/api-key) Blockscout Explorer API keys\n- Have an [Alchemy API key](https://docs.alchemy.com/docs/alchemy-quickstart-guide) for OP and Base Sepolia\n\nSome basic knowledge of all of these tools is also required, although the details are abstracted away for basic usage.\n\n## 🧰 Install dependencies\n\nTo compile your contracts and start testing, make sure that you have all dependencies installed.\n\nFrom the root directory run:\n\n```bash\njust install\n```\n\nto install the [vIBC core smart contracts](https://github.com/open-ibc/vibc-core-smart-contracts) as a dependency.\n\nAdditionally Hardhat will be installed as a dev dependency with some useful plugins. Check `package.json` for an exhaustive list.\n\n> 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...\n\n## ⚙️ Set up your environment variables\n\nConvert 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).\n\n```bash\ncp .env.example .env\n```\n\nThis will enable you to sign transactions with your private key(s). If not added, the scripts from the justfile will fail.\n\n### Configuration file\n\nThe 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.\n\nBy default the configuration file is stored at root as `config.json`.\n\n**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**\n\n### Obtaining testnet ETH\n\nThe account associated with your private key must have both Base Sepolia and Optimism Sepolia ETH. To obtain the testnet ETH visit:\n\n- [Optimism Sepolia Faucet](https://www.alchemy.com/faucets/optimism-sepolia)\n- [Base Sepolia Faucet](https://www.alchemy.com/faucets/base-sepolia)\n\n## 🏃🏽🏃🏻‍♀️ Instructions\n\nThe project comes with an almost complete contract `CCQueryUC.sol` in the contracts directory. Your task is to implement two functions:\n\n1. `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. \n2. `onUniversalAcknowledgement` - You will need to emit the event `LogAcknowledgment` in order to provide evidence to complete this challenge. \n\nOnce you have completed the implementation of these two functions, run:\n\n`just run-challenge-3`\n\nThis will:\n1. Deploy your CCQueryUC.sol contract to Optimism\n2. Send a packet to the Base Contract\n\n\n## 💡 Questions or Suggestions?\n\nFeel 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](https://forum.polymerlabs.org).\n\nThank you for being a part of our community!\n","readmeFilename":"README.md"}