Skip to content

Commit

Permalink
mango_weth-Usdc deployed and activated (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrivine committed Dec 27, 2022
1 parent d2bc9d6 commit 3e10df0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
4 changes: 4 additions & 0 deletions addresses/deployed/maticmum.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@
{
"address": "0x046963623BDB092A406ed051222e769D214bd107",
"name": "MangroveOrderEnriched"
},
{
"address": "0x75C19ecd2F817A173Ef8196D8CE8a219ee14a0fe",
"name": "Mango_WETH_USDC"
}
]
3 changes: 2 additions & 1 deletion script/strategies/InitMango.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import {Mango, IERC20, IMangrove} from "mgv_src/strategies/offer_maker/market_ma
/**
* Usage example: initialize MANGO_WETH_USDC
*
* MANGO=Mango_WETH_USDC \
* DEFAULT_BASE_AMOUNT=$(cast ff 18 0.25) \
* DEFAULT_QUOTE=_AMOUNT=$(cast ff 6 1000) \
* DEFAULT_QUOTE_AMOUNT=$(cast ff 6 1000) \
* LAST_BID_INDEX=50 \
* BATCH_SIZE=10 \
* COVER_FACTOR=2 \
Expand Down
22 changes: 9 additions & 13 deletions script/strategies/MangoDeployer.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@ import {Deployer} from "../lib/Deployer.sol";
*
* e.g deploy mango on WETH <quote> market:
*
* WRITE_DEPLOY=true \
* NAME=<optional name in case symbols are ambiguous>
* BASE=WETH \
* QUOTE=0x<quote_address> \
* BASE_0=$(cast ff 18 1) \
* QUOTE_0=$(cast ff <quote_decimals> <quote_0 (in quote units)>) \
* NSLOTS=100 \
* PRICE_INCR=$(cast ff <quote_decimals> <quote_increase (in quote units)>) \
* forge script --fork-url $MUMBAI_NODE_URL \
* --broadcast \
* --verify \
* MangoDeployer
* WRITE_DEPLOY=true \
* BASE=WETH QUOTE=USDC BASE_0=$(cast ff 18 1) QUOTE_0=$(cast ff 6 800)\
* NSLOTS=100 PRICE_INCR=$(cast ff 6 10)\
* DEPLOYER=$MUMBAI_TESTER_ADDRESS\
* forge script --fork-url $LOCALHOST_URL MangoDeployer --broadcast\
* --broadcast \
* MangoDeployer
*/

contract MangoDeployer is Deployer {
Expand All @@ -43,7 +38,7 @@ contract MangoDeployer is Deployer {
quote_0: vm.envUint("QUOTE_0"),
nslots: vm.envUint("NSLOTS"),
price_incr: vm.envUint("PRICE_INCR"),
admin: broadcaster()
admin: vm.envAddress("DEPLOYER")
});
}

Expand All @@ -62,6 +57,7 @@ contract MangoDeployer is Deployer {
{
IMangrove mgv = IMangrove(fork.get("Mangrove"));
broadcast();
console.log(broadcaster(), broadcaster().balance);
current = new Mango(
mgv,
IERC20(base),
Expand Down

0 comments on commit 3e10df0

Please sign in to comment.