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 0000000..e374c72 --- /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 {} \;