-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial draft * Removed artifacts * Cleanup * Added protocols * add compiled_project fixture * fix project testing environemnet * rename fixtures * use constants for fixture names * fix importing fixtures * use module scope * add declare test * add tests * add more learning tests * remove invoke and _add call test * _add test * refine test * change fixture desired interface * _add protostar fixture * add protostar fixture * use protostar fixture for declare cheatcode * use protostar fixture in gateway facade * remove asyncs * remove dead code * use protostar fixture * make call pass * move contract to tests.data * fix creating migration output file * add more tests * format * handle errors * fix gateway facade tests * fix types and format * refine * fix protostar toml * fix lint * remove invoke * remove call cheatcode * refine no protostar toml exception * remove "call" literal type * rename type * remove unnecessary log color provider * remove cwd * remove cwd * remove type * renamed cwd to project root path * fix e2e tests Co-authored-by: Arkadiusz Kasprzyk <arkadiusz.kasprzyk@swmansion.com> Co-authored-by: Arkadiusz Kasprzyk <arkadiuszkasprzyk95@gmail.com>
- Loading branch information
1 parent
7418246
commit b497508
Showing
19 changed files
with
348 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
IDENTITY_CONTRACT = """ | ||
%lang starknet | ||
@view | ||
func identity(arg) -> (res : felt): | ||
return (arg) | ||
end | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from pathlib import Path | ||
|
||
import pytest | ||
|
||
from protostar.starknet_gateway.gateway_facade import GatewayFacade | ||
from tests.integration.protostar_fixture import ProtostarFixture | ||
|
||
|
||
@pytest.fixture(autouse=True, scope="module") | ||
def setup(protostar: ProtostarFixture): | ||
protostar.init_sync() | ||
protostar.build_sync() | ||
|
||
|
||
@pytest.fixture(name="compiled_contract_path") | ||
def compiled_contract_path_fixture(protostar: ProtostarFixture) -> Path: | ||
return protostar.project_root_path / "build" / "main.json" | ||
|
||
|
||
@pytest.fixture(name="gateway_facade") | ||
def gateway_facade_fixture(devnet_gateway_url: str): | ||
gateway_facade_builder = GatewayFacade.Builder(project_root_path=Path()) | ||
gateway_facade_builder.set_network(devnet_gateway_url) | ||
return gateway_facade_builder.build() | ||
|
||
|
||
async def test_deploy(gateway_facade: GatewayFacade, compiled_contract_path: Path): | ||
response = await gateway_facade.deploy(compiled_contract_path) | ||
assert response is not None | ||
|
||
|
||
async def test_declare(gateway_facade: GatewayFacade, compiled_contract_path: Path): | ||
response = await gateway_facade.declare(compiled_contract_path) | ||
assert response is not None |
8 changes: 0 additions & 8 deletions
8
tests/integration/migrator/data/migrations/migration_declare.cairo
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.