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

Working against standalone #36

Merged
merged 12 commits into from
Oct 10, 2022
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
108 changes: 51 additions & 57 deletions Cargo.lock

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

22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ codegen-units = 1
lto = true

[patch.crates-io]
soroban-sdk = { git = "https://github.com/stellar/rs-soroban-sdk", rev = "864a309b" }
soroban-spec = { git = "https://github.com/stellar/rs-soroban-sdk", rev = "864a309b" }
soroban-auth = { git = "https://github.com/stellar/rs-soroban-sdk", rev = "864a309b" }
soroban-sdk-macros = { git = "https://github.com/stellar/rs-soroban-sdk", rev = "864a309b" }
soroban-env-common = { git = "https://github.com/stellar/rs-soroban-env", rev = "fb8a384e" }
soroban-env-guest = { git = "https://github.com/stellar/rs-soroban-env", rev = "fb8a384e" }
soroban-env-host = { git = "https://github.com/stellar/rs-soroban-env", rev = "fb8a384e" }
soroban-env-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "fb8a384e" }
soroban-native-sdk-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "fb8a384e" }
stellar-xdr = { git = "https://github.com/stellar/rs-stellar-xdr", rev = "88ded341" }
wasmi = { package = "soroban-wasmi", git = "https://github.com/stellar/wasmi", rev = "a61b6df" }
soroban-sdk = { git = "https://github.com/stellar/rs-soroban-sdk", rev = "3992556b" }
soroban-spec = { git = "https://github.com/stellar/rs-soroban-sdk", rev = "3992556b" }
soroban-auth = { git = "https://github.com/stellar/rs-soroban-sdk", rev = "3992556b" }
soroban-sdk-macros = { git = "https://github.com/stellar/rs-soroban-sdk", rev = "3992556b" }
soroban-env-common = { git = "https://github.com/stellar/rs-soroban-env", rev = "91cf595" }
soroban-env-guest = { git = "https://github.com/stellar/rs-soroban-env", rev = "91cf595" }
soroban-env-host = { git = "https://github.com/stellar/rs-soroban-env", rev = "91cf595" }
soroban-env-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "91cf595" }
soroban-native-sdk-macros = { git = "https://github.com/stellar/rs-soroban-env", rev = "91cf595" }
stellar-xdr = { git = "https://github.com/stellar/rs-stellar-xdr", rev = "5cca712b" }
wasmi = { package = "soroban-wasmi", git = "https://github.com/stellar/wasmi", rev = "d1ec0036" }
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,42 @@ backed by smart contracts on Stellar.

## Getting Started

### Backend
### Backend (Local Sandbox)

1. Install the soroban-cli from https://soroban.stellar.org/docs/getting-started/setup#install-the-soroban-cli
2. Run `./initialize.sh` to load the contracts and initialize it.
2. Run the backend with `soroban-cli serve`
3. Run `./initialize.sh sandbox` to load the contracts and initialize it.
- Note: this will create a `.soroban` sub-directory, to contain the sandbox
network data.
3. Run the backend with `soroban-cli serve`
4. Configure Freighter
a. Install the custom Freighter Soroban release from https://github.com/stellar/freighter/releases/tag/v2.6.0-beta.2
b. Enable "Experimental Mode" in the settings (gear icon).
c. Add a custom network:
| Name | Sandbox |
| URL | http://localhost:8000/soroban/rpc |
| Passphrase | Local Sandbox Stellar Network ; September 2022 |
| Allow HTTP connection | Enabled |
| Switch to this network | Enabled |

### Backend (Local Standalone Network)

1. Install the soroban-cli from https://soroban.stellar.org/docs/getting-started/setup#install-the-soroban-cli
2. Run the backend docker container with `./quickstart.sh standalone`, and wait for it to start.
3. Run `./initialize.sh standalone` to load the contracts and initialize it.
- Note: this state will be lost if the quickstart docker container is removed.
4. Configure Freighter
a. Install the custom Freighter Soroban release from https://github.com/stellar/freighter/releases/tag/v2.6.0-beta.2
b. Enable "Experimental Mode" in the settings (gear icon).
c. Add a custom network:
| Name | Standalone |
| URL | http://localhost:8000/soroban/rpc |
| Passphrase | Standalone Network ; February 2017 |
| Allow HTTP connection | Enabled |
| Switch to this network | Enabled |
5. Add some standalone network lumens to your Freighter wallet.
a. Copy the address for your freighter wallet.
b. Visit `http://localhost:8000/friendbot?addr=<your address>`


### Frontend

Expand Down
2 changes: 1 addition & 1 deletion components/molecules/deposits/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface IDepositsProps {
export function Deposits(props: IDepositsProps) {
const useLoadDeposits = (): ContractValue => {
return useContractValue(
Constants.CrowndfundId,
Constants.CrowdfundId,
'balance',
accountIdentifier(
SorobanSdk.StrKey.decodeEd25519PublicKey(props.address)
Expand Down
Loading