Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tokens / avatar nft contract #666

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ config := --account katana-0 \
--rpc http://0.0.0.0:5050

# Build files helpers.
build := ./target/dev/controller_
build_controller := ./target/dev/controller_
build_tokens := ./target/dev/tokens_
sierra := .contract_class.json
compiled := .compiled_contract_class.json
store := ./packages/account_sdk/compiled/
Expand All @@ -16,17 +17,23 @@ generate_artifacts:
scarb --manifest-path ./packages/contracts/controller/Scarb.toml build
mkdir -p ${store}

jq . ${build}CartridgeAccount${sierra} > ${store}controller${sierra}
jq . ${build_controller}CartridgeAccount${sierra} > ${store}controller${sierra}
cp ${build_controller}CartridgeAccount${compiled} ${store}controller${compiled}

scarb --manifest-path ./packages/contracts/tokens/Scarb.toml build
mkdir -p ${store}

jq . ${build_tokens}AvatarNft${sierra} > ${store}avatar${sierra}
cp ${build_tokens}AvatarNft${compiled} ${store}avatar${compiled}

cp ${build}CartridgeAccount${compiled} ${store}controller${compiled}

deploy-katana:
@set -x; \
erc20_class=$$(starkli class-hash ${build}ERC20Upgradeable${sierra}); \
account_class=$$(starkli class-hash ${build}Account${sierra}); \
starkli declare ${build}Account${sierra} ${config}; \
erc20_class=$$(starkli class-hash ${build_controller}ERC20Upgradeable${sierra}); \
account_class=$$(starkli class-hash ${build_controller}Account${sierra}); \
starkli declare ${build_controller}Account${sierra} ${config}; \
starkli deploy "$${account_class}" ${test_pubkey} --salt 0x1234 ${config}; \
starkli declare ${build}ERC20Upgradeable${sierra} ${config}; \
starkli declare ${build_controller}ERC20Upgradeable${sierra} ${config}; \
starkli deploy "$${erc20_class}" str:token str:tkn u256:1 ${katana_0} --salt 0x1234 ${config};

test-session: generate_artifacts
Expand Down
5 changes: 5 additions & 0 deletions Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
members = [
"packages/contracts/controller",
"packages/contracts/resolver",
"packages/contracts/tokens",
]

[workspace.package]
Expand All @@ -17,3 +18,7 @@ alexandria_data_structures = { git = "https://github.com/piniom/quaireaux.git",
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.27.0" }
openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", rev = "a13bae3" }
argent = { git = "https://github.com/cartridge-gg/argent-contracts-starknet.git", rev = "daa8200" }
graffiti = { git = "https://github.com/ponderingdemocritus/graffiti.git" }

[dev-dependencies]
cairo_test = "2.7.0"

Large diffs are not rendered by default.

Loading
Loading