Skip to content

Commit

Permalink
transfer tokens to the airdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
moodysalem committed Nov 7, 2023
1 parent c025030 commit a7a42c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/factory.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ mod Factory {

assert(config.total <= params.total_supply, 'AIRDROP_GT_SUPPLY');

erc20.transfer(airdrop_address, config.total.into());

(
Option::Some(IAirdropDispatcher { contract_address: airdrop_address }),
params.total_supply - config.total
Expand Down
2 changes: 1 addition & 1 deletion src/factory_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn test_deploy() {
assert(erc20.decimals() == 18, 'decimals');
assert(erc20.totalSupply() == 5678, 'totalSupply');
assert(erc20.balance_of(get_contract_address()) == 5678 - 1111, 'deployer balance');
// assert(erc20.balance_of(result.airdrop.unwrap().contract_address) == 1111, 'airdrop balance');
assert(erc20.balance_of(result.airdrop.unwrap().contract_address) == 1111, 'airdrop balance');

let drop = result.airdrop.unwrap();
assert(drop.get_root() == 'root', 'airdrop root');
Expand Down

0 comments on commit a7a42c4

Please sign in to comment.