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

gda fork test #1801

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: AGPLv3
import "forge-std/Test.sol";

import { GDAv1Forwarder, PoolConfig } from "../../../../contracts/utils/GDAv1Forwarder.sol";
import {
IGeneralDistributionAgreementV1,
ISuperfluidToken,
ISuperfluidPool
} from "../../../../contracts/interfaces/superfluid/ISuperfluid.sol";

// forge test --fork-url https://bsc-dataseed.binance.org --match-contract GeneralDistributionAgreementV1ForkTest -vvvv
contract GeneralDistributionAgreementV1ForkTest is Test {
function testUpdateMemberUnits() public {
// just a random account with some super tokens on BNB already
address poolAdmin = address(0xe41BA4AA270363e50b3a1B7050A57b6f8AAc5399);

// create pool
vm.startPrank(poolAdmin);
(bool success, ISuperfluidPool pool) = GDAv1Forwarder(0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08).createPool(
ISuperfluidToken(0x529A4116F160c833c61311569D6B33dFF41fD657),
poolAdmin,
PoolConfig({ transferabilityForUnitsOwner: false, distributionFromAnyAddress: false })
);
vm.stopPrank();

// assert pool is created...
assert(success);
assertEq(pool.admin(), poolAdmin);
assert(address(pool) != address(0));

// update member units
vm.startPrank(poolAdmin);
pool.updateMemberUnits(poolAdmin, 100);
vm.stopPrank();
}
}