Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy BurnWrappedAjna #123

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ 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
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));
}
}
Loading