Skip to content

Commit

Permalink
Merge branch 'develop' into reserve-migrator
Browse files Browse the repository at this point in the history
# Conflicts:
#	ROLES.md
#	src/scripts/ops/batch.sh
  • Loading branch information
0xJem committed Nov 13, 2024
2 parents a9ce29b + 41fc61f commit 3ffef53
Show file tree
Hide file tree
Showing 42 changed files with 677 additions and 190 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
cache/
node_modules/
.env
.env.*
remappings.txt
broadcast/
src/test/sim/in/*.json
Expand All @@ -12,3 +13,4 @@ src/test/sim/sims/*.t.sol
docs/
coverage/
/solidity-metrics.html
dependencies/
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ docs/
cache/
coverage/
lib/
dependencies/
8 changes: 7 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ optimizer_runs = 10
chain_id = 1

[fuzz]
runs = 256
runs = 256

[soldeer]
remappings_generate = false

[dependencies]
surl = { version = "1.0.0", git = "https://github.com/memester-xyz/surl.git", rev = "034c912ae9b5e707a5afd21f145b452ad8e800df" }
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
},
"scripts": {
"build": "chmod +x shell/*.sh && ./shell/full_install.sh",
"prettier": "prettier --no-error-on-unmatched-pattern --write 'src/**/*.sol' '**/*.html'",
"prettier:list": "prettier --no-error-on-unmatched-pattern --list-different 'src/**/*.sol' '**/*.html'",
"prettier:check": "prettier --no-error-on-unmatched-pattern --check 'src/**/*.sol' '**/*.html'",
"prettier": "prettier --no-error-on-unmatched-pattern --write 'src/**/*.sol' '**/*.html' '**/*.sh'",
"prettier:list": "prettier --no-error-on-unmatched-pattern --list-different 'src/**/*.sol' '**/*.html' '**/*.sh'",
"prettier:check": "prettier --no-error-on-unmatched-pattern --check 'src/**/*.sol' '**/*.html' '**/*.sh'",
"solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix",
"solhint:check": "solhint --config ./.solhint.json 'src/**/*.sol'",
"markdownlint": "markdownlint --fix '**/*.md'",
Expand All @@ -34,7 +34,8 @@
},
"devDependencies": {
"markdownlint-cli": "^0.42.0",
"prettier": "^2.5.1",
"prettier": "^3.0.3",
"prettier-plugin-sh": "^0.14.0",
"prettier-plugin-solidity": "^1.0.0-beta.19",
"solhint": "^3.3.7",
"solidity-code-metrics": "^0.0.25"
Expand All @@ -45,7 +46,8 @@
"bracketSpacing": false,
"printWidth": 100,
"plugins": [
"prettier-plugin-solidity"
"prettier-plugin-solidity",
"prettier-plugin-sh"
]
}
}
53 changes: 47 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ openzeppelin-contracts/=lib/openzeppelin-contracts/
openzeppelin/=lib/forge-proposal-simulator/lib/openzeppelin-contracts/contracts/
solidity-code-metrics/=node_modules/solidity-code-metrics/
solidity-examples/=lib/solidity-examples/contracts/
surl-1.0.0/=dependencies/surl-1.0.0/src/
46 changes: 23 additions & 23 deletions shell/change_price.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
source .env

# User-provided input ($1) is the dollar price of OHM
echo "Setting OHM price to \$$1 on Testnet.";
echo "";
echo "Setting OHM price to \$$1 on Testnet."
echo ""

# Convert dollar price of OHM into price feed value (using ETH = $1500)
OHM_ETH_PRICE=$(echo "$1*1000000000000000000/1500" | bc);
OHM_ETH_PRICE=$(echo "$1*1000000000000000000/1500" | bc)

# DAI price feed value is fixed using ETH = $1500
DAI_ETH_PRICE=666666666666667
Expand All @@ -16,27 +16,27 @@ DAI_ETH_PRICE=666666666666667
TIMESTAMP=$(date +%s)

# Set price feed values
echo "Updating the OHM price feed...";
cast send --private-key=$POLICY_PRIVATE_KEY --rpc-url=$RPC_URL --from=$POLICY_ADDRESS --chain=$CHAIN $OHM_ETH_FEED "setLatestAnswer(int256)()" $OHM_ETH_PRICE > /dev/null;
cast send --private-key=$POLICY_PRIVATE_KEY --rpc-url=$RPC_URL --from=$POLICY_ADDRESS --chain=$CHAIN $OHM_ETH_FEED "setTimestamp(uint256)()" $TIMESTAMP > /dev/null;
echo "Complete.";
echo "";

echo "Updating the DAI price feed...";
cast send --private-key=$POLICY_PRIVATE_KEY --from=$POLICY_ADDRESS --rpc-url=$RPC_URL --chain=$CHAIN $DAI_ETH_FEED "setLatestAnswer(int256)" $DAI_ETH_PRICE > /dev/null;
cast send --private-key=$POLICY_PRIVATE_KEY --from=$POLICY_ADDRESS --rpc-url=$RPC_URL --chain=$CHAIN $DAI_ETH_FEED "setTimestamp(uint256)" $TIMESTAMP > /dev/null;
echo "Complete.";
echo "";
echo "Updating the OHM price feed..."
cast send --private-key=$POLICY_PRIVATE_KEY --rpc-url=$RPC_URL --from=$POLICY_ADDRESS --chain=$CHAIN $OHM_ETH_FEED "setLatestAnswer(int256)()" $OHM_ETH_PRICE > /dev/null
cast send --private-key=$POLICY_PRIVATE_KEY --rpc-url=$RPC_URL --from=$POLICY_ADDRESS --chain=$CHAIN $OHM_ETH_FEED "setTimestamp(uint256)()" $TIMESTAMP > /dev/null
echo "Complete."
echo ""

echo "Updating the DAI price feed..."
cast send --private-key=$POLICY_PRIVATE_KEY --from=$POLICY_ADDRESS --rpc-url=$RPC_URL --chain=$CHAIN $DAI_ETH_FEED "setLatestAnswer(int256)" $DAI_ETH_PRICE > /dev/null
cast send --private-key=$POLICY_PRIVATE_KEY --from=$POLICY_ADDRESS --rpc-url=$RPC_URL --chain=$CHAIN $DAI_ETH_FEED "setTimestamp(uint256)" $TIMESTAMP > /dev/null
echo "Complete."
echo ""

# Reset heart and call heart.beat()
echo "Resetting the heart...";
cast send --private-key=$POLICY_PRIVATE_KEY --from=$POLICY_ADDRESS --rpc-url=$RPC_URL --chain=$CHAIN $HEART "resetBeat()" > /dev/null;
echo "Complete.";
echo "";
echo "Resetting the heart..."
cast send --private-key=$POLICY_PRIVATE_KEY --from=$POLICY_ADDRESS --rpc-url=$RPC_URL --chain=$CHAIN $HEART "resetBeat()" > /dev/null
echo "Complete."
echo ""

echo "Calling heart.beat()...";
cast send --private-key=$POLICY_PRIVATE_KEY --from=$POLICY_ADDRESS --rpc-url=$RPC_URL --chain=$CHAIN $HEART "beat()" > /dev/null;
echo "Complete.";
echo "";
echo "Calling heart.beat()..."
cast send --private-key=$POLICY_PRIVATE_KEY --from=$POLICY_ADDRESS --rpc-url=$RPC_URL --chain=$CHAIN $HEART "beat()" > /dev/null
echo "Complete."
echo ""

echo "Price update complete and Operator state updated.";
echo "Price update complete and Operator state updated."
8 changes: 4 additions & 4 deletions shell/change_vault_authority.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
source .env

# User-provided input ($1) is an Ethereum address
echo "Setting OlympusAuthority Vault to $1 on Testnet.";
echo "";
echo "Setting OlympusAuthority Vault to $1 on Testnet."
echo ""

cast send --private-key=$GOV_PRIVATE_KEY --rpc-url=$RPC_URL --from=$GOV_ADDRESS --chain=$CHAIN $AUTHORITY_ADDRESS "pushVault(address,bool)()" $1 1;
cast send --private-key=$GOV_PRIVATE_KEY --rpc-url=$RPC_URL --from=$GOV_ADDRESS --chain=$CHAIN $AUTHORITY_ADDRESS "pushVault(address,bool)()" $1 1

echo "Complete.";
echo "Complete."
Loading

0 comments on commit 3ffef53

Please sign in to comment.