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

[NES-186] make AggregateToken.sol #1

Merged
merged 21 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 17 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
14 changes: 7 additions & 7 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ jobs:
with:
version: nightly

- name: Run Forge build
run: |
forge --version
forge build --sizes
id: build
# - name: Run Forge build
# run: |
# forge --version
# forge build nest --sizes
# id: build

- name: Run Forge format
run: |
forge fmt
forge fmt nest --check
id: format

# - name: Run Forge tests
# run: |
# forge test -vvv
# forge test nest -vvv
# id: test
47 changes: 47 additions & 0 deletions nest/script/DeployNestContracts.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

import "forge-std/Script.sol";

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { Upgrades } from "openzeppelin-foundry-upgrades/Upgrades.sol";

import { AggregateToken } from "../src/AggregateToken.sol";
import { FakeComponentToken } from "../src/FakeComponentToken.sol";

contract DeployNestContracts is Script {

address private constant ARC_ADMIN_ADDRESS = 0x1c9d94FAD4ccCd522804a955103899e0D6A4405a;
address private constant USDC_ADDRESS = 0x849c25e6cCB03cdc23ba91d92440dA7bC8486be2;

function run() external {
vm.startBroadcast(ARC_ADMIN_ADDRESS);

address fakeComponentTokenProxy = Upgrades.deployUUPSProxy(
"FakeComponentToken.sol",
abi.encodeCall(FakeComponentToken.initialize, (msg.sender, "Banana", "BAN", IERC20(USDC_ADDRESS), 18))
);
console.log("FakeComponentToken deployed to:", fakeComponentTokenProxy);

address aggregateTokenProxy = Upgrades.deployUUPSProxy(
"AggregateToken.sol",
abi.encodeCall(
AggregateToken.initialize,
(
msg.sender,
"Apple",
"AAPL",
IERC20(USDC_ADDRESS),
18,
15e17,
12e17,
"https://assets.plumenetwork.xyz/metadata/mineral-vault.json"
)
)
);
console.log("AggregateToken deployed to:", aggregateTokenProxy);

vm.stopBroadcast();
}

}
Loading