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

put local sdks into the .soroban directory and attempt to link to them #122

Merged
merged 5 commits into from
Jul 7, 2023
Merged
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
78 changes: 78 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
"version": "0.1.0",
"private": true,
"scripts": {
"setup": "./initialize.sh ${NETWORK:-futurenet} && npm install",
"reset": "rm -rf .soroban-example-dapp && rm -rf .next && rm -rf node_modules/crowdfund-contract && rm -rf node_modules/abundance-token && npm run setup",
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"postinstall": "./target/bin/soroban contract bindings typescript --wasm ./target/wasm32-unknown-unknown/release/soroban_crowdfund_contract.wasm --id $(cat ./.soroban-example-dapp/crowdfund_id) --output-dir ./node_modules/crowdfund-contract --network $(cat ./.soroban-example-dapp/network) --contract-name crowdfund-contract && ./target/bin/soroban contract bindings typescript --wasm ./target/wasm32-unknown-unknown/release/abundance_token.wasm --id $(cat ./.soroban-example-dapp/abundance_token_id) --output-dir ./node_modules/abundance-token --network $(cat ./.soroban-example-dapp/network) --contract-name abundance-token"
"setup": "./initialize.sh ${NETWORK:-futurenet} && npm install",
"clean": "rm -rf .next .soroban .soroban-example-dapp node_modules target",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove target? If I set up a symlink to local soroban in target/bin, this blows it away, and I'm not sure it gives much benefit.

"reset": "npm run clean && npm run setup",
"postinstall": "rm -rf ./.soroban/crowdfund-contract && rm -rf ./.soroban/abundance-token && ./target/bin/soroban contract bindings typescript --wasm ./target/wasm32-unknown-unknown/release/soroban_crowdfund_contract.wasm --id $(cat ./.soroban-example-dapp/crowdfund_id) --output-dir ./.soroban/crowdfund-contract --network $(cat ./.soroban-example-dapp/network) --contract-name crowdfund-contract && ./target/bin/soroban contract bindings typescript --wasm ./target/wasm32-unknown-unknown/release/abundance_token.wasm --id $(cat ./.soroban-example-dapp/abundance_token_id) --output-dir ./.soroban/abundance-token --network $(cat ./.soroban-example-dapp/network) --contract-name abundance-token"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including the rm of any existing contract sdks due to this bug stellar/stellar-cli#752

},
"dependencies": {
"@radix-ui/react-dialog": "1.0.2",
Expand All @@ -21,7 +22,9 @@
"next": "^13.4.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"soroban-client": "0.8.1"
"soroban-client": "0.8.1",
"crowdfund-contract": "file:.soroban/crowdfund-contract",
"abundance-token": "file:.soroban/abundance-token"
},
"devDependencies": {
"@types/humanize-duration": "^3.27.1",
Expand All @@ -32,6 +35,10 @@
"eslint-config-next": "^13.3.1",
"typescript": "5.1.3"
},
"optionalDependencies": {
"crowdfund-contract": "*",
"abundance-token": "*"
},
"engines": {
"node": ">=17",
"npm": ">=8"
Expand Down