From ef00a92ce7f0719c81048c93af4e5bf0c9ec7cab Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Thu, 12 Sep 2024 18:29:20 +0800 Subject: [PATCH] fix slither --- {hello => examples/hello}/.eslintignore | 0 {hello => examples/hello}/.eslintrc.js | 0 {hello => examples/hello}/.gitignore | 0 {hello => examples/hello}/LICENSE | 0 {hello => examples/hello}/README.md | 0 {hello => examples/hello}/contracts/Hello.sol | 0 .../hello}/contracts/ReceiverContract.sol | 0 {hello => examples/hello}/foundry.toml | 0 {hello => examples/hello}/hardhat.config.ts | 0 {hello => examples/hello}/package.json | 0 {hello => examples/hello}/tasks/deploy.ts | 0 {hello => examples/hello}/tasks/solana/deposit.ts | 0 {hello => examples/hello}/tasks/solana/gateway.json | 0 {hello => examples/hello}/tasks/solana/interact.ts | 0 {hello => examples/hello}/tsconfig.json | 0 {hello => examples/hello}/yarn.lock | 0 {swap => examples/swap}/.eslintignore | 0 {swap => examples/swap}/.eslintrc.js | 0 {swap => examples/swap}/.gitignore | 0 {swap => examples/swap}/LICENSE | 0 {swap => examples/swap}/README.md | 0 {swap => examples/swap}/contracts/Swap.sol | 0 {swap => examples/swap}/contracts/SwapToAnyToken.sol | 0 {swap => examples/swap}/foundry.toml | 0 {swap => examples/swap}/hardhat.config.ts | 0 {swap => examples/swap}/package.json | 0 {swap => examples/swap}/tasks/deploy.ts | 0 {swap => examples/swap}/tasks/solana/deposit.ts | 0 {swap => examples/swap}/tasks/solana/gateway.json | 0 {swap => examples/swap}/tasks/solana/interact.ts | 0 {swap => examples/swap}/tsconfig.json | 0 {swap => examples/swap}/yarn.lock | 0 scripts/build.sh | 12 ++++++++++++ 33 files changed, 12 insertions(+) rename {hello => examples/hello}/.eslintignore (100%) rename {hello => examples/hello}/.eslintrc.js (100%) rename {hello => examples/hello}/.gitignore (100%) rename {hello => examples/hello}/LICENSE (100%) rename {hello => examples/hello}/README.md (100%) rename {hello => examples/hello}/contracts/Hello.sol (100%) rename {hello => examples/hello}/contracts/ReceiverContract.sol (100%) rename {hello => examples/hello}/foundry.toml (100%) rename {hello => examples/hello}/hardhat.config.ts (100%) rename {hello => examples/hello}/package.json (100%) rename {hello => examples/hello}/tasks/deploy.ts (100%) rename {hello => examples/hello}/tasks/solana/deposit.ts (100%) rename {hello => examples/hello}/tasks/solana/gateway.json (100%) rename {hello => examples/hello}/tasks/solana/interact.ts (100%) rename {hello => examples/hello}/tsconfig.json (100%) rename {hello => examples/hello}/yarn.lock (100%) rename {swap => examples/swap}/.eslintignore (100%) rename {swap => examples/swap}/.eslintrc.js (100%) rename {swap => examples/swap}/.gitignore (100%) rename {swap => examples/swap}/LICENSE (100%) rename {swap => examples/swap}/README.md (100%) rename {swap => examples/swap}/contracts/Swap.sol (100%) rename {swap => examples/swap}/contracts/SwapToAnyToken.sol (100%) rename {swap => examples/swap}/foundry.toml (100%) rename {swap => examples/swap}/hardhat.config.ts (100%) rename {swap => examples/swap}/package.json (100%) rename {swap => examples/swap}/tasks/deploy.ts (100%) rename {swap => examples/swap}/tasks/solana/deposit.ts (100%) rename {swap => examples/swap}/tasks/solana/gateway.json (100%) rename {swap => examples/swap}/tasks/solana/interact.ts (100%) rename {swap => examples/swap}/tsconfig.json (100%) rename {swap => examples/swap}/yarn.lock (100%) create mode 100755 scripts/build.sh diff --git a/hello/.eslintignore b/examples/hello/.eslintignore similarity index 100% rename from hello/.eslintignore rename to examples/hello/.eslintignore diff --git a/hello/.eslintrc.js b/examples/hello/.eslintrc.js similarity index 100% rename from hello/.eslintrc.js rename to examples/hello/.eslintrc.js diff --git a/hello/.gitignore b/examples/hello/.gitignore similarity index 100% rename from hello/.gitignore rename to examples/hello/.gitignore diff --git a/hello/LICENSE b/examples/hello/LICENSE similarity index 100% rename from hello/LICENSE rename to examples/hello/LICENSE diff --git a/hello/README.md b/examples/hello/README.md similarity index 100% rename from hello/README.md rename to examples/hello/README.md diff --git a/hello/contracts/Hello.sol b/examples/hello/contracts/Hello.sol similarity index 100% rename from hello/contracts/Hello.sol rename to examples/hello/contracts/Hello.sol diff --git a/hello/contracts/ReceiverContract.sol b/examples/hello/contracts/ReceiverContract.sol similarity index 100% rename from hello/contracts/ReceiverContract.sol rename to examples/hello/contracts/ReceiverContract.sol diff --git a/hello/foundry.toml b/examples/hello/foundry.toml similarity index 100% rename from hello/foundry.toml rename to examples/hello/foundry.toml diff --git a/hello/hardhat.config.ts b/examples/hello/hardhat.config.ts similarity index 100% rename from hello/hardhat.config.ts rename to examples/hello/hardhat.config.ts diff --git a/hello/package.json b/examples/hello/package.json similarity index 100% rename from hello/package.json rename to examples/hello/package.json diff --git a/hello/tasks/deploy.ts b/examples/hello/tasks/deploy.ts similarity index 100% rename from hello/tasks/deploy.ts rename to examples/hello/tasks/deploy.ts diff --git a/hello/tasks/solana/deposit.ts b/examples/hello/tasks/solana/deposit.ts similarity index 100% rename from hello/tasks/solana/deposit.ts rename to examples/hello/tasks/solana/deposit.ts diff --git a/hello/tasks/solana/gateway.json b/examples/hello/tasks/solana/gateway.json similarity index 100% rename from hello/tasks/solana/gateway.json rename to examples/hello/tasks/solana/gateway.json diff --git a/hello/tasks/solana/interact.ts b/examples/hello/tasks/solana/interact.ts similarity index 100% rename from hello/tasks/solana/interact.ts rename to examples/hello/tasks/solana/interact.ts diff --git a/hello/tsconfig.json b/examples/hello/tsconfig.json similarity index 100% rename from hello/tsconfig.json rename to examples/hello/tsconfig.json diff --git a/hello/yarn.lock b/examples/hello/yarn.lock similarity index 100% rename from hello/yarn.lock rename to examples/hello/yarn.lock diff --git a/swap/.eslintignore b/examples/swap/.eslintignore similarity index 100% rename from swap/.eslintignore rename to examples/swap/.eslintignore diff --git a/swap/.eslintrc.js b/examples/swap/.eslintrc.js similarity index 100% rename from swap/.eslintrc.js rename to examples/swap/.eslintrc.js diff --git a/swap/.gitignore b/examples/swap/.gitignore similarity index 100% rename from swap/.gitignore rename to examples/swap/.gitignore diff --git a/swap/LICENSE b/examples/swap/LICENSE similarity index 100% rename from swap/LICENSE rename to examples/swap/LICENSE diff --git a/swap/README.md b/examples/swap/README.md similarity index 100% rename from swap/README.md rename to examples/swap/README.md diff --git a/swap/contracts/Swap.sol b/examples/swap/contracts/Swap.sol similarity index 100% rename from swap/contracts/Swap.sol rename to examples/swap/contracts/Swap.sol diff --git a/swap/contracts/SwapToAnyToken.sol b/examples/swap/contracts/SwapToAnyToken.sol similarity index 100% rename from swap/contracts/SwapToAnyToken.sol rename to examples/swap/contracts/SwapToAnyToken.sol diff --git a/swap/foundry.toml b/examples/swap/foundry.toml similarity index 100% rename from swap/foundry.toml rename to examples/swap/foundry.toml diff --git a/swap/hardhat.config.ts b/examples/swap/hardhat.config.ts similarity index 100% rename from swap/hardhat.config.ts rename to examples/swap/hardhat.config.ts diff --git a/swap/package.json b/examples/swap/package.json similarity index 100% rename from swap/package.json rename to examples/swap/package.json diff --git a/swap/tasks/deploy.ts b/examples/swap/tasks/deploy.ts similarity index 100% rename from swap/tasks/deploy.ts rename to examples/swap/tasks/deploy.ts diff --git a/swap/tasks/solana/deposit.ts b/examples/swap/tasks/solana/deposit.ts similarity index 100% rename from swap/tasks/solana/deposit.ts rename to examples/swap/tasks/solana/deposit.ts diff --git a/swap/tasks/solana/gateway.json b/examples/swap/tasks/solana/gateway.json similarity index 100% rename from swap/tasks/solana/gateway.json rename to examples/swap/tasks/solana/gateway.json diff --git a/swap/tasks/solana/interact.ts b/examples/swap/tasks/solana/interact.ts similarity index 100% rename from swap/tasks/solana/interact.ts rename to examples/swap/tasks/solana/interact.ts diff --git a/swap/tsconfig.json b/examples/swap/tsconfig.json similarity index 100% rename from swap/tsconfig.json rename to examples/swap/tsconfig.json diff --git a/swap/yarn.lock b/examples/swap/yarn.lock similarity index 100% rename from swap/yarn.lock rename to examples/swap/yarn.lock diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 00000000..e374c72e --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +rm -rf abi && mkdir -p abi/examples +rm -rf typescript-types && mkdir typescript-types + +for dir in ./examples/*/; do + subdir=$(echo $dir | cut -d'/' -f2) + + cd $dir && yarn && npx hardhat compile --force && cp -r artifacts/contracts/* ../../abi/examples/ && cd ../../; +done + +find ./abi/ -name '*.dbg.json' -exec rm {} \;