open-ibc / ibc-app-solidity-template Goto Github PK
View Code? Open in Web Editor NEWTemplate starter for IBC enabled contracts in Solidity for use with vibc-core-smart-contracts
Template starter for IBC enabled contracts in Solidity for use with vibc-core-smart-contracts
I've noticed there's potentially some hard to debug situations when for some reason the dApp developer's contracts are pointing to a different dispatcher address and uc handler than in their env variables
In a future with proxy contracts likely this will minimize but still it makes sense to do add some just recipe that queries the involved contracts and checks if the addresses match the env variables
Note: this is meant to happen post deployment, but prior to creating channels / sending packets
I'm seeing a lot of the packet lifecycle events on the termnial come out of order (or dropped altogether).
TODO: check if the calls need to be delayed some to log
Right now, the deployment scripts only take in the dispatcher address or the universal channel handler
In realistic situations, there will be extra constructor arguments. We should enable passing in the arguments from the just command to deploy.
After some of the refactors, the sanity check command is broken (def for universal channels, check for custom)
When I develop well in the future, should I apply for ETF?
With PR #73 we are moving towards adding most of the config into Hardhat (and later Foundry) config file. So we need to move the config path there as well, so that .env remains only for private info
Some follow-up work from #72
Another change we could add is an extra just recipe,
just deploy-verify SOURCE DESTINATION
which is similar to deploy recipe but uses the verify script automatically after deployment to verify both contracts being deployed. I'll leave up to you if you want to implement this or if we should pick this up in a separate PR...
Originally posted by @tmsdkeys in #72 (review)
Dependent on some improvements to ibc-explorer being added to production
The original config file did not have the isUniversal flag and in the events filtercondition it is looking for either custom or universal packets which can have spillover.
Action: improve correctness of filtering
I've got an error "Cannot find module './_get-vibc-sc.js' " . I've use v18.19.1. After trying to install package by using "npm install", but it's not working. so, I figured out the error has occurred because there is no _get-vibc-sc.js file available on "scripts" folder.
Currently, the event listener on dispatcher / ucHandler listens for all IBC events. Obviously we only need to filter those relevant to the user's app
Right now, the arguments.js file enables devs to define constructor args arrays. It assumes that the application will alwyas either inherit UniversalChanIbcApp.sol or CustomChanIbcApp.sol and have dispatcher / middleware as their first contructor arg.
It lets devs define additonal args in arguments.js, while constructing a concatenated array with the dispatcher/mw when deploying, but arguably this is confusing.
Could look into different ways of ensuring constructor args are correctly added...
Until timeouts are fully supported, set the default timeout higher than 10 hours. Order of 100 days or so
Add a just set-contracts
command to the Justfile that sets the contracts to be deployed in the config.json.
Motivation: the developer right now could ignore the config file for every step but updating the config for which contracts to be deployed... it would make sense to also abstract it away for that step
implementation:
just set-contracts CHAIN CONTRACT
: sets the contract type in the config.deploy
field for the designated chain
For node Js issues
First use
sudo apt-get update
sudo apt-get install build-essential checkinstall libssl-dev
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Use this command for Ubuntu
This need to be added for node js
add just command that allows to verify contracts when blockscout api keys are in the .env file
just verify-contract CHAIN CONTRACT_ADDRESS
Can be either hardhat or foundry
First update:
sudo apt update
Install nodejs 20_x with this command:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - &&
sudo apt-get install -y nodejs
ceck node version:
node -v
First you need to instal Snap
sudo apt install snapd
And then instal Just by rum this command
sudo snap install --edge just --classic
polymer-testnet
url:https://docs.polymerlabs.org/docs/quickstart/start/#-install-dependencies
This should be just do-it.
Right now, a lot of the just commands take a flag for universal channel or not.
This could be avoided if adding a flag to the config and separating out config files for different sets of contracts in one repo.
Expected outcomes:
https://discord.com/channels/839903468750635039/1213267408370794506/1215270257405468692
Hello, edit:
scripts/create-channel-config.js
Change:
const { getDispatcher } = require('./_get-vibc-sc.js');
to
const { getDispatcher } = require('./_vibc-helpers.js');
The switch-client.js script now flips the config values first before updating the vibc addresses (dispatcher or universal channel handler). So it does reverse flipping the config when an error occurs on the update scripts
This can lead to errors requiring the user to update manually and/or do multiple switches
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.