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

Pobletacio's Authorized Greet Control Solution #69

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
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
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# Authorized Greetings - By pobletacio

First add test wallets declared on .env.example (Admin, greeter, unauthorized greeter), then the deploy script itself is gonna airdrop with XLM every accounts set

```bash
cd soroban-react-dapp/
docker-compose up -d
bash run.sh
cd contracts
make build
yarn install
yarn deploy testnet authorized_greeting
yarn test testnet
exit (or open another bash)
```

At this point you Import your Stellar Secret Key's on Freighter, with test script execution admin was initialiazed and asigned, has only one greeter that can set a greet an the unauthorized greeter can only read the message.

* Admin can add more Authorized greeters using UI
* Authorized Greeter can set and read the last greet
* Unauthorized Greeter can only read the last greet


Finally compile the UI:
```bash
yarn install
npm run dev
```

**PD: THIS IS MY FIRST TIME PROGRAMMING ON RUST AND USING A BLOCKCHAIN SDK! :D**

# @create-soroban-dapp.

@create-soroban-dapp is both a npx script and a boilerplate dapp for kickstarting any of your ideas for a Soroban-based Dapp.
Expand Down
32 changes: 32 additions & 0 deletions soroban-react-dapp/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# Authorized Greetings - By pobletacio

First add test wallets declared on .env.example (Admin, greeter, unauthorized greeter), then the deploy script itself is gonna airdrop with XLM every accounts set

```bash
cd soroban-react-dapp/
docker-compose up -d
bash run.sh
cd contracts
make build
yarn install
yarn deploy testnet authorized_greeting
yarn test testnet
exit (or open another bash)
```

At this point you Import your Stellar Secret Key's on Freighter, with test script execution admin was initialiazed and asigned, has only one greeter that can set a greet an the unauthorized greeter can only read the message.

* Admin can add more Authorized greeters using UI
* Authorized Greeter can set and read the last greet
* Unauthorized Greeter can only read the last greet


Finally compile the UI:
```bash
yarn install
npm run dev
```

**PD: THIS IS MY FIRST TIME PROGRAMMING ON RUST AND USING A BLOCKCHAIN SDK! :D**


# Welcome to your soroban react dapp boilerplate!

This dapp largely inspired by the [ink!athon](https://github.com/scio-labs/inkathon) project will help you kickstart your soroban dapp creator journey.
Expand Down
7 changes: 5 additions & 2 deletions soroban-react-dapp/contracts/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Stellar accounts Secret Keys
ADMIN_SECRET_KEY=

ADMIN_SECRET_KEY_2=
# RPC Setup
MAINNET_RPC_URL=
MAINNET_RPC_URL=

GREETER=
UNAUTHORIZED_GREETER=
Loading