Skip to content

Commit

Permalink
Merge pull request ubiquity#2 from rndquu/feat/add-increase-uusd-thre…
Browse files Browse the repository at this point in the history
…sholds

feat: add increase UUSD thresholds helper script
  • Loading branch information
kingsley-einstein authored Oct 31, 2024
2 parents 6995d6e + d7baf39 commit fbdf50a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cypress/scripts/increase-uusd-thresholds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# constants
ANVIL_RPC=http://localhost:8545
DIAMOND="0xED3084c98148e2528DaDCB53C56352e549C488fA"

# may be changed depending on environment
ADMIN_WALLET=0xefC0e701A824943b469a694aC564Aa1efF7Ab7dd

# enable auto impersonating
cast rpc --rpc-url $ANVIL_RPC anvil_autoImpersonateAccount true

# owner sets (for ease of QA):
# 1. `mintPriceThreshold = 0` (allows minting anytime)
# 2. `redeemPriceThreshold = 100_000_000` (100$, allows redeeming when UUSD < 100$)
cast send --rpc-url $ANVIL_RPC $DIAMOND --unlocked --from $ADMIN_WALLET "setPriceThresholds(uint256,uint256)" 0 100000000

# disable auto impersonating
cast rpc --rpc-url $ANVIL_RPC anvil_autoImpersonateAccount false
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"test": "jest --setupFiles dotenv/config --coverage",
"test:anvil": "cypress/scripts/anvil.sh",
"test:fund": "cypress/scripts/fund.sh",
"test:increase-uusd-thresholds": "cypress/scripts/increase-uusd-thresholds.sh",
"cy:open": "cypress open",
"cy:run": "cypress run",
"tailwind:watch": "npx tailwindcss -i ./static/style/tailwind.css -o ./static/style/style.css --watch"
Expand Down

0 comments on commit fbdf50a

Please sign in to comment.