Skip to content

Commit

Permalink
multiple tokenlists per testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
otherview committed Jan 23, 2024
1 parent e44655a commit 5f78190
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/manual-deploy-uniswap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jobs:
datadog/agent:latest \
&& sudo docker run -d -p 80:80 \
--entrypoint /uniswap/deploy.sh obscuronet/${{ github.event.inputs.testnet_type }}_uniswap_testnet:latest \
--testnet_name=${{ github.event.inputs.testnet_type }} \
--pk_string=${{ secrets.FAUCET_PK_STRING }} --addr=${{ secrets.FAUCET_ADDR }} \
--faucet_addr=${{ github.event.inputs.testnet_type }}-faucet.uksouth.azurecontainer.io \
--we_host=erpc.${{ github.event.inputs.testnet_type }}.obscu.ro '
Expand Down
2 changes: 1 addition & 1 deletion deploy-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ echo -e "${obscuro_constants_file}" > src/obscuro_constants_1.ts
cat src/obscuro_constants.ts |tail -n+4>> src/obscuro_constants_1.ts
mv src/obscuro_constants_1.ts src/obscuro_constants.ts
cp -f "${uniswap_sor_path}/uniswap-smart-order-router-2.9.3.tgz" .
yarn install --update-checksums && yarn build
TESTNET_NAME=local yarn install --update-checksums && yarn build
echo "build is complete but files are not being served - use serve -s build -l 80 -n"


Expand Down
8 changes: 6 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ help_and_exit() {
echo ""
echo " faucet_addr *Optional* Sets faucet address. Defaults to testnet-faucet.uksouth.azurecontainer.io"
echo ""
echo " testnet_name *Optional* Sets testnet for token addresses. Defaults to dev-testnet"
echo ""
echo ""
echo ""
exit 1 # Exit with error explicitly
Expand All @@ -41,6 +43,7 @@ we_host="dev-testnet.obscu.ro" # host.docker.internal for docker instances conne
pk_string="0x8dfb8083da6275ae3e4f41e3e8a8c19d028d32c9247e24530933782f2a05035b"
owner_addr="0xA58C60cc047592DE97BF1E8d2f225Fc5D959De77"
faucet_addr="dev-testnet-faucet.uksouth.azurecontainer.io"
testnet_name="dev-testnet"



Expand All @@ -55,6 +58,7 @@ do
--pk_string) pk_string=${value} ;;
--addr) owner_addr=${value} ;;
--faucet_addr) faucet_addr=${value} ;;
--testnet_name) testnet_name=${value} ;;

--help) help_and_exit ;;
*)
Expand Down Expand Up @@ -95,7 +99,7 @@ sleep 30s

# update tokenlist
echo "Updating tokenlist.."
curl https://kvdb.io/WVNLPGWE94wkw7TRv3vAFc/token_testnet_001 -H "Content-Type: application/json" -d @tokenlist.json
curl https://kvdb.io/WVNLPGWE94wkw7TRv3vAFc/token_${testnet_name}_001 -H "Content-Type: application/json" -d @tokenlist.json

# deploy the uniswap contracts
cd "${build_path}"
Expand Down Expand Up @@ -130,7 +134,7 @@ cat src/obscuro_constants.ts |tail -n+4>> src/obscuro_constants_1.ts
mv src/obscuro_constants_1.ts src/obscuro_constants.ts
cp -f "${uniswap_sor_path}/uniswap-smart-order-router-2.9.3.tgz" .
# Double install to sort out the yarn.lock missmatch
yarn install --update-checksums || true \
TESTNET_NAME=${testnet_name} yarn install --update-checksums || true \
&& yarn install --update-checksums && yarn build \
&& serve -s build -l 80 -n

Expand Down
2 changes: 1 addition & 1 deletion erc20deployer/scripts/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function main() {
function writeTokenList(addresses) {
tokenList = {
"name": "Obscuro Token List",
"logoURI": "https://pbs.twimg.com/profile_images/1460984508090658824/wGnI8m6s_400x400.jpg",
"logoURI": "https://pbs.twimg.com/profile_images/1747242565336702976/ifJOqy13_400x400.jpg",
"keywords": [
"audited",
"verified",
Expand Down

0 comments on commit 5f78190

Please sign in to comment.