Skip to content

Commit

Permalink
bumped snforge to 8.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ametel01 committed Oct 25, 2023
1 parent 02dd1fc commit cadd9fe
Show file tree
Hide file tree
Showing 23 changed files with 57 additions and 25 deletions.
32 changes: 32 additions & 0 deletions Scarb.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Code generated by scarb DO NOT EDIT.
version = 1

[[package]]
name = "cubit"
version = "1.2.0"
source = "git+https://github.com/influenceth/cubit.git?rev=2ccb253#2ccb2536dffa3f15ebd38b755c1be65fde1eab0c"

[[package]]
name = "nogame"
version = "0.1.0"
dependencies = [
"cubit",
"openzeppelin",
"snforge_std",
"xoroshiro",
]

[[package]]
name = "openzeppelin"
version = "0.7.0"
source = "git+https://github.com/openzeppelin/cairo-contracts?tag=v0.7.0#61a2505fe0c0f19b5de2b3f8dedf421ba2cff657"

[[package]]
name = "snforge_std"
version = "0.1.0"
source = "git+https://github.com/foundry-rs/starknet-foundry.git?tag=v0.9.0#251761c7dc89cbeef69e565584cdf6f54aaaed30"

[[package]]
name = "xoroshiro"
version = "1.0.0"
source = "git+https://github.com/ametel01/xoroshiro-cairo.git#62ab3ae93a21a120b356eea4155431adcbd21dd8"
8 changes: 4 additions & 4 deletions Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "nogame"
version = "0.1.0"
cairo-version = ">=2.2.0"
# cairo-version = "^2.3.0"
authors = ["ametel01"]
license = "MIT"

[dependencies]
openzeppelin = { git = "https://github.com/openzeppelin/cairo-contracts", tag = "v0.7.0" }
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.7.1" }
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.8.3" }
xoroshiro = { git ="https://github.com/ametel01/xoroshiro-cairo.git" }
cubit = {git ="https://github.com/influenceth/cubit.git", rev="41bdf71"}
starknet = ">=2.2.0"
cubit = {git ="https://github.com/influenceth/cubit.git", rev="2ccb253"}
starknet = "^2.2.0"

[[target.starknet-contract]]
allowed-libfuncs-list.name = "all"
Expand Down
2 changes: 1 addition & 1 deletion src/game/main.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod NoGame {

use xoroshiro::xoroshiro::{IXoroshiroDispatcher, IXoroshiroDispatcherTrait};

use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

#[storage]
struct Storage {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use starknet::{
{SyscallResult, syscalls::{storage_read_syscall, storage_write_syscall}}
};
use integer::BoundedInt;
use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

mod libraries {
mod auction;
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/fleet.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use nogame::libraries::{math, dockyard::Dockyard};
use nogame::libraries::types::{
ERC20s, TechLevels, Debris, Fleet, Unit, UnitTrait, ShipsCost, PlanetPosition, DefencesLevels,
};
use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

#[inline(always)]
fn CARRIER() -> Unit {
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/types.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

use integer::u128_overflowing_add;
use starknet::ContractAddress;
Expand Down
2 changes: 1 addition & 1 deletion tests/internal_functions/auction_price.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use cubit::f128::types::fixed::{Fixed, FixedTrait, ONE_u128 as ONE};
use nogame::libraries::auction::{LinearVRGDA, LinearVRGDATrait};

use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

const _0_31: u128 = 5718490662849961000;
const _0_10: u128 = 3689348814741911000;
Expand Down
2 changes: 1 addition & 1 deletion tests/internal_functions/compound_cost.cairo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use nogame::libraries::compounds::Compounds;
use nogame::libraries::types::ERC20s;
use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

impl CostPrint of PrintTrait<ERC20s> {
fn print(self: ERC20s) {
Expand Down
2 changes: 1 addition & 1 deletion tests/internal_functions/fleet.cairo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use starknet::info::get_block_timestamp;

use snforge_std::{declare, ContractClassTrait, io::PrintTrait, start_prank, start_warp};
use snforge_std::{declare, ContractClassTrait, PrintTrait, start_prank, start_warp};

use nogame::game::interface::{INoGameDispatcher, INoGameDispatcherTrait};
use nogame::libraries::types::{Fleet, Unit, TechLevels, PlanetPosition, ERC20s, DefencesLevels};
Expand Down
2 changes: 1 addition & 1 deletion tests/internal_functions/math.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

use nogame::libraries::math::BitShift;

Expand Down
2 changes: 1 addition & 1 deletion tests/utils.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use nogame::game::interface::{INoGameDispatcher, INoGameDispatcherTrait};
use nogame::token::erc20::{INGERC20Dispatcher, INGERC20DispatcherTrait};
use nogame::token::erc721::{INGERC721Dispatcher, INGERC721DispatcherTrait};

use snforge_std::{declare, ContractClassTrait, start_warp, start_prank, stop_prank, io::PrintTrait};
use snforge_std::{declare, ContractClassTrait, start_warp, start_prank, stop_prank, PrintTrait};

const E18: u128 = 1_000_000_000_000_000_000;
const ETH_SUPPLY: felt252 = 1_000_000_000_000_000_000_000;
Expand Down
2 changes: 1 addition & 1 deletion tests/view_tests/compound_view.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use starknet::testing::cheatcode;
use starknet::info::get_contract_address;
use starknet::{ContractAddress, contract_address_const};
use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;
use snforge_std::{start_prank, start_warp};

use nogame::game::interface::{INoGameDispatcher, INoGameDispatcherTrait};
Expand Down
2 changes: 1 addition & 1 deletion tests/view_tests/defence_view.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use starknet::testing::cheatcode;
use starknet::info::get_contract_address;
use starknet::{ContractAddress, contract_address_const};
use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

use snforge_std::{start_prank, start_warp};

Expand Down
2 changes: 1 addition & 1 deletion tests/view_tests/dockyard_view.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use starknet::testing::cheatcode;
use starknet::info::get_contract_address;
use starknet::{ContractAddress, contract_address_const};
use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

use snforge_std::{start_prank, start_warp};

Expand Down
2 changes: 1 addition & 1 deletion tests/view_tests/fleet_view.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use starknet::testing::cheatcode;
use starknet::info::get_contract_address;
use starknet::{ContractAddress, contract_address_const};
use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

use snforge_std::{start_prank, start_warp};

Expand Down
2 changes: 1 addition & 1 deletion tests/view_tests/general_view.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use starknet::testing::cheatcode;
use starknet::info::get_contract_address;
use starknet::{ContractAddress, contract_address_const, get_block_timestamp};
use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

use snforge_std::{start_prank, start_warp};

Expand Down
2 changes: 1 addition & 1 deletion tests/view_tests/research_view.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use starknet::testing::cheatcode;
use starknet::info::get_contract_address;
use starknet::{ContractAddress, contract_address_const};
use snforge_std::io::PrintTrait;
use snforge_std::PrintTrait;

use snforge_std::{start_prank, start_warp};

Expand Down
2 changes: 1 addition & 1 deletion tests/write_tests/compound_write.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use starknet::info::{get_contract_address, get_block_timestamp};
use starknet::{ContractAddress, contract_address_const};
use openzeppelin::token::erc20::interface::{IERC20Dispatcher, IERC20DispatcherTrait};

use snforge_std::{declare, ContractClassTrait, start_prank, start_warp, io::PrintTrait};
use snforge_std::{declare, ContractClassTrait, start_prank, start_warp, PrintTrait};

use nogame::game::interface::{INoGameDispatcher, INoGameDispatcherTrait};
use nogame::libraries::types::{
Expand Down
2 changes: 1 addition & 1 deletion tests/write_tests/defence_write.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use starknet::info::{get_contract_address, get_block_timestamp};
use starknet::{ContractAddress, contract_address_const};
use openzeppelin::token::erc20::interface::{IERC20Dispatcher, IERC20DispatcherTrait};

use snforge_std::{declare, ContractClassTrait, start_prank, start_warp, io::PrintTrait};
use snforge_std::{declare, ContractClassTrait, start_prank, start_warp, PrintTrait};

use nogame::game::interface::{INoGameDispatcher, INoGameDispatcherTrait};
use nogame::libraries::types::{
Expand Down
2 changes: 1 addition & 1 deletion tests/write_tests/dockyard_write.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use starknet::info::{get_contract_address, get_block_timestamp};
use starknet::{ContractAddress, contract_address_const};
use openzeppelin::token::erc20::interface::{IERC20Dispatcher, IERC20DispatcherTrait};

use snforge_std::{declare, ContractClassTrait, start_prank, start_warp, io::PrintTrait};
use snforge_std::{declare, ContractClassTrait, start_prank, start_warp, PrintTrait};

use nogame::game::interface::{INoGameDispatcher, INoGameDispatcherTrait};
use nogame::libraries::types::{
Expand Down
2 changes: 1 addition & 1 deletion tests/write_tests/fleet_write.cairo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use starknet::info::{get_block_timestamp, get_contract_address};

use snforge_std::{declare, ContractClassTrait, io::PrintTrait, start_prank, start_warp};
use snforge_std::{declare, ContractClassTrait, PrintTrait, start_prank, start_warp};

use nogame::game::interface::{INoGameDispatcher, INoGameDispatcherTrait};
use nogame::libraries::types::{Fleet, Unit, TechLevels, PlanetPosition, ERC20s, DefencesLevels};
Expand Down
2 changes: 1 addition & 1 deletion tests/write_tests/general_write.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use starknet::info::{get_contract_address, get_block_timestamp};
use starknet::{ContractAddress, contract_address_const};
use openzeppelin::token::erc20::interface::{IERC20Dispatcher, IERC20DispatcherTrait};

use snforge_std::{declare, ContractClassTrait, start_prank, start_warp, io::PrintTrait};
use snforge_std::{declare, ContractClassTrait, start_prank, start_warp, PrintTrait};

use nogame::game::interface::{INoGameDispatcher, INoGameDispatcherTrait};
use nogame::libraries::types::{
Expand Down
2 changes: 1 addition & 1 deletion tests/write_tests/research_write.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use starknet::info::{get_contract_address, get_block_timestamp};
use starknet::{ContractAddress, contract_address_const};
use openzeppelin::token::erc20::interface::{IERC20Dispatcher, IERC20DispatcherTrait};

use snforge_std::{declare, ContractClassTrait, start_prank, start_warp, io::PrintTrait};
use snforge_std::{declare, ContractClassTrait, start_prank, start_warp, PrintTrait};

use nogame::game::interface::{INoGameDispatcher, INoGameDispatcherTrait};
use nogame::libraries::types::{
Expand Down

0 comments on commit cadd9fe

Please sign in to comment.