Skip to content

Commit

Permalink
test: add airdrop tests from Ekubo
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI committed Mar 14, 2024
1 parent fac7657 commit a3abd4a
Show file tree
Hide file tree
Showing 10 changed files with 1,036 additions and 7 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
name: "Test"

jobs:
test:
name: "Test"
test-l1:
name: "Test L1 contracts"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout source code"
Expand All @@ -24,3 +24,16 @@ jobs:
- name: "Run foundry tests"
run: |
forge test
test-airdrop:
name: "Test airdrop contracts"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout source code"
uses: "actions/checkout@v3"
with:
submodules: "recursive"

- name: "Run Cairo tests"
run: |
./scripts/test_airdrop_with_docker.sh
1 change: 1 addition & 0 deletions airdrop/cairo_project.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[crate_roots]
governance = "src"
tests = "tests"
5 changes: 0 additions & 5 deletions airdrop/src/interfaces/erc20.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@ pub trait IERC20<TStorage> {
fn name(self: @TStorage) -> felt252;
fn symbol(self: @TStorage) -> felt252;
fn decimals(self: @TStorage) -> u8;
fn total_supply(self: @TStorage) -> u256;
fn totalSupply(self: @TStorage) -> u256;
fn balance_of(self: @TStorage, account: ContractAddress) -> u256;
fn balanceOf(self: @TStorage, account: ContractAddress) -> u256;
fn allowance(self: @TStorage, owner: ContractAddress, spender: ContractAddress) -> u256;
fn transfer(ref self: TStorage, recipient: ContractAddress, amount: u256) -> bool;
fn transfer_from(
ref self: TStorage, sender: ContractAddress, recipient: ContractAddress, amount: u256
) -> bool;
fn transferFrom(
ref self: TStorage, sender: ContractAddress, recipient: ContractAddress, amount: u256
) -> bool;
Expand Down
Loading

0 comments on commit a3abd4a

Please sign in to comment.