Skip to content

Commit

Permalink
Merge branch 'develop' into grantfund-deployer
Browse files Browse the repository at this point in the history
  • Loading branch information
prateek105 committed Aug 9, 2023
2 parents 9732ea2 + dea251c commit b8662da
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@ deploy-grantfund:
eval AJNA_TOKEN=${ajna}
forge script script/GrantFund.s.sol:DeployGrantFund \
--rpc-url ${ETH_RPC_URL} --sender ${DEPLOY_ADDRESS} --keystore ${DEPLOY_KEY} --broadcast -vvv --verify
deploy-burnwrapper:
eval AJNA_TOKEN=${ajna}
forge script script/BurnWrapper.s.sol:DeployBurnWrapper \
--rpc-url ${ETH_RPC_URL} --sender ${DEPLOY_ADDRESS} --keystore ${DEPLOY_KEY} --broadcast -vvv --verify
deploy-grantfund-deployer:
forge create --rpc-url ${ETH_RPC_URL} --sender ${DEPLOY_ADDRESS} --keystore ${DEPLOY_KEY} --verify src/grants/Deployer.sol:Deployer
forge create --rpc-url ${ETH_RPC_URL} --keystore ${DEPLOY_KEY} --verify src/grants/Deployer.sol:Deployer
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ make deploy-ajnatoken mintto=<MINT_TO_ADDRESS>
```
Record the address of the token upon deployment. See [AJNA_TOKEN.md](src/token/AJNA_TOKEN.md#deployment) for validation.

#### Burn Wrapper
To deploy, ensure the correct AJNA token address is specified in code. Then, run:
```
make deploy-burnwrapper ajna=<AJNA_TOKEN_ADDRESS>
```

#### Grant Fund
Deployment of the Grant Coordination Fund requires an argument to specify the address of the AJNA token. The deployment script also uses the token address to determine funding level.

Expand Down
20 changes: 20 additions & 0 deletions script/BurnWrapper.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

import { Script } from "forge-std/Script.sol";
import { console } from "forge-std/console.sol";

import { BurnWrappedAjna } from "../src/token/BurnWrapper.sol";
import { IERC20 } from "@oz/token/ERC20/IERC20.sol";

contract DeployBurnWrapper is Script {
function run() public {
IERC20 ajna = IERC20(vm.envAddress("AJNA_TOKEN"));

vm.startBroadcast();
address wrapperAddress = address(new BurnWrappedAjna(ajna));
vm.stopBroadcast();

console.log("Created BurnWrapper at %s for AJNA token at %s", wrapperAddress, address(ajna));
}
}

0 comments on commit b8662da

Please sign in to comment.