Skip to content

Commit

Permalink
Launchpad cairo test (#160)
Browse files Browse the repository at this point in the history
* add test

* more tests

* - add test for sell_coin fn
- fix launch_liqudity test

* add launchpad  end to end test

* fix typo
  • Loading branch information
manlikeHB authored Oct 6, 2024
1 parent 360bef0 commit 662c130
Show file tree
Hide file tree
Showing 5 changed files with 720 additions and 17 deletions.
5 changes: 0 additions & 5 deletions onchain/cairo/.snfoundry_cache/.prev_tests_failed
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
afk::social::deposit::tests::deposit_claim
afk::social::deposit::tests::claim_incorrect_gas_amount
afk::social::deposit::tests::deposit_claim_gas_fee
afk::tests::launchpad_tests::launchpad_tests::launchpad_integration
afk::tests::vault_tests::vault_test::test_mint_by_token
5 changes: 3 additions & 2 deletions onchain/cairo/src/launchpad/launchpad.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub trait ILaunchpadMarketplace<TContractState> {
}

#[starknet::contract]
mod LaunchpadMarketplace {
pub mod LaunchpadMarketplace {
use afk::interfaces::jediswap::{
IJediswapFactoryV2, IJediswapFactoryV2Dispatcher, IJediswapFactoryV2DispatcherTrait,
IJediswapNFTRouterV2, IJediswapNFTRouterV2Dispatcher, IJediswapNFTRouterV2DispatcherTrait,
Expand Down Expand Up @@ -191,7 +191,7 @@ mod LaunchpadMarketplace {

#[event]
#[derive(Drop, starknet::Event)]
enum Event {
pub enum Event {
StoredName: StoredName,
BuyToken: BuyToken,
SellToken: SellToken,
Expand Down Expand Up @@ -331,6 +331,7 @@ mod LaunchpadMarketplace {
fn set_exchanges_address(
ref self: ContractState, exchanges: Span<(SupportedExchanges, ContractAddress)>
) {
self.accesscontrol.assert_only_role(ADMIN_ROLE);
let mut dex = exchanges;
// Add Exchanges configurations
loop {
Expand Down
2 changes: 1 addition & 1 deletion onchain/cairo/src/pixel/art_peace.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub mod ArtPeace {
daily_quests_count: u32,
devmode: bool,
) {
let caller= starknet::get_caller_address();
let caller = starknet::get_caller_address();
self.host.write(caller);

self.canvas_width.write(canvas_width);
Expand Down
Loading

0 comments on commit 662c130

Please sign in to comment.