Skip to content

Commit

Permalink
[Feat]: support contracts compiled with version 2.1.0 (#5)
Browse files Browse the repository at this point in the history
* Feat: add support for v1 contracts

* Feat: upgrade starknet to 0.6.0

* Feat: support cairo compiler version 2.1.0

* Refactor: replace panic! with ? operator

* Refactor: replace unwrap with ? operator
  • Loading branch information
haroune-mohammedi authored Sep 13, 2023
1 parent 0edc0fe commit 88f02ca
Show file tree
Hide file tree
Showing 12 changed files with 4,514 additions and 95 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ opt-level = 3

[dependencies]
# Starknet dependencies
starknet = "0.5.0"
starknet = "0.6.0"

env_logger = "0.10.0"
log = "0.4.17"
Expand Down
12 changes: 9 additions & 3 deletions config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ rpc:
url: "http://localhost:9944"

setup:
erc20_contract_path: contracts/v0/ERC20.json
erc721_contract_path: contracts/v0/ERC721.json
account_contract_path: contracts/v0/OpenzeppelinAccount.json
erc20_contract:
v0: contracts/v0/ERC20.json

erc721_contract:
v0: contracts/v0/ERC721.json

account_contract:
v0: contracts/v0/OpenzeppelinAccount.json

fee_token_address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"
num_accounts: 3

Expand Down
34 changes: 34 additions & 0 deletions config/v2.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
rpc:
url: "http://localhost:9944"

setup:
erc20_contract:
v1:
path: contracts/v2.1.0/openzeppelin_ERC20.sierra.json
casm_path: contracts/v2.1.0/openzeppelin_ERC20.casm.json

erc721_contract:
v1:
path: contracts/v2.1.0/openzeppelin_ERC721.sierra.json
casm_path: contracts/v2.1.0/openzeppelin_ERC721.casm.json

account_contract:
v1:
path: contracts/v2.1.0/openzeppelin_Account.sierra.json
casm_path: contracts/v2.1.0/openzeppelin_Account.casm.json

fee_token_address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"
num_accounts: 3

run:
num_erc20_transfers: 5
num_erc721_mints: 5

report:
num_blocks: 3
reports_dir: "reports"

deployer:
salt: 1
address: "0x0000000000000000000000000000000000000000000000000000000000000002"
signing_key: "0x00c1cf1490de1352865301bb8705143f3ef938f97fdf892f1090dcb5ac7bcd1d"
1 change: 1 addition & 0 deletions contracts/v2.1.0/openzeppelin_Account.casm.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions contracts/v2.1.0/openzeppelin_Account.sierra.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions contracts/v2.1.0/openzeppelin_ERC20.casm.json

Large diffs are not rendered by default.

Loading

0 comments on commit 88f02ca

Please sign in to comment.