-
Notifications
You must be signed in to change notification settings - Fork 127
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
A comprehensive guide on using authorization in soroban contracts. #664
base: main
Are you sure you want to change the base?
Conversation
A guide on making a multi-sig custom account contract, that allows for a dynamic authorization policy
* Add dapps challenge (stellar#487) * Add Dapps Challenge to Docs Todo: user dashboard visibility * add hide unless dapps * update user card * update checkpoints * add user dashboard to dapps challenges * Update Dapp Challenge Description * Update tsconfig.json * fix tsconfig.json * small grammar fixes * small grammar fixes * small grammar fixes * small grammar fixes * small grammar fixes * update challenge 0 and 1 ; add images for challenge 2 * Capitalize Futurenet; lowercase Dapp when needed * disclaimer; nit crowdfunding -> crowdfund * Update challenge-0-crowdfund.mdx * update layout and guides * Update smart-contracts.mdx * update content * add links * nit update soroban quickstart * Update react.mdx * Update challenge-0-crowdfund.mdx * update start course redirect * we -> you * update wrangler endpoint to stellar cloudflare * update wrangler endpoint * add module resolution and jsx * add wrong network page; remove unused code; add vercel.app checking * update wallets conclusion * nit Update wallets.mdx * nit update broken link * Freighter -> WalletData Component * update crowdfund dapps challenge for P10 * Fix Setup * update docker workflow; add better notes * nit standalone docker requirement * re-enable .vercel.app check; move ParentChallengeForm * move Login function * fixed automatic log in problem * comment out connection check * comment out auto connect hook; nit Login -> Connect * removed unused setLoading() changed order of operations * update to checkout challenge branch * completed challenge message = clickable url * remember user is logged in * setup `BrowserOnly` * Update yarn.lock * Update yarn.lock * merge main into dapps challenge * Update yarn.lock * nit: refresh message * add disconnect button comment; better connection insight * update contract initialization to use strings * auto populate url; add resubmit; fix broken invoke * add setSavedUrl; improve url auto populate * improve local storage for pubkey --------- Co-authored-by: Bri <[email protected]> * Update initialization.mdx (stellar#518) * editorial nits for dapps challenge (stellar#544) * editorial nits on crowdfund dapp * editorial nits in payment dapp challenge * Add scaffold soroban (stellar#545) * Create scaffold-soroban.mdx * add video embed * reformat code call outs; add conclusion * Update scaffold-soroban.mdx * nit: link sc * nit add rpc link * add definition to soroban RPC * update deep dive section * dApp -> dapp * remove atomic swap description * update simulate txn section; copy edits * update intro to dapps * nit:fix link * update links; edit copy * nit:typo * SDC UI upgrades (stellar#542) * Update index.tsx * update kv:worker endpoint * Update index.tsx * Add Root component, finish-step-button, update styles * Add library for toast notifications, show milestone notification * Add class for HttpClient, functions for requests * Changed backend model, finalize user progress on course * Add confetti effect on complete button click, refactor * Remove mocks, use endpoint, fix issues * Merge Development into main (stellar#2) * update kv:worker endpoint * Update index.tsx * Add Root component, finish-step-button, update styles * Add library for toast notifications, show milestone notification * Add class for HttpClient, functions for requests * Changed backend model, finalize user progress on course * Add confetti effect on complete button click, refactor * Remove mocks, use endpoint, fix issues --------- Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> * Add Dashboard for Dapps challenges (stellar#3) * Added dashboard component, styled cards * Added DashboardHeader, Leaderboard component, tabs, styles * Added ChallengesList component, updated login logic, tabs * Refactor existing approach, update models, add filtering * Add UI folder, add id for switcher and random avatar generating * Remove old dashboard components, rename util file * Add dashboard link to dapps sidebar instead of navbar * Add TODOs, rename component * Fix issues * Add Dashboard for Dapps challenges (stellar#3) (stellar#4) * Added dashboard component, styled cards * Added DashboardHeader, Leaderboard component, tabs, styles * Added ChallengesList component, updated login logic, tabs * Refactor existing approach, update models, add filtering * Add UI folder, add id for switcher and random avatar generating * Remove old dashboard components, rename util file * Add dashboard link to dapps sidebar instead of navbar * Add TODOs, rename component * Fix issues Co-authored-by: Iryna Telesheva <[email protected]> * Merge SDC from julian-dev28:main to Stellar:SSDC23 (stellar#541) * Update index.tsx * update kv:worker endpoint * Update index.tsx * Add Root component, finish-step-button, update styles * Add library for toast notifications, show milestone notification * Add class for HttpClient, functions for requests * Changed backend model, finalize user progress on course * Add confetti effect on complete button click, refactor * Remove mocks, use endpoint, fix issues * Merge Development into main (stellar#2) * update kv:worker endpoint * Update index.tsx * Add Root component, finish-step-button, update styles * Add library for toast notifications, show milestone notification * Add class for HttpClient, functions for requests * Changed backend model, finalize user progress on course * Add confetti effect on complete button click, refactor * Remove mocks, use endpoint, fix issues --------- Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> * Add Dashboard for Dapps challenges (stellar#3) (stellar#4) * Added dashboard component, styled cards * Added DashboardHeader, Leaderboard component, tabs, styles * Added ChallengesList component, updated login logic, tabs * Refactor existing approach, update models, add filtering * Add UI folder, add id for switcher and random avatar generating * Remove old dashboard components, rename util file * Add dashboard link to dapps sidebar instead of navbar * Add TODOs, rename component * Fix issues Co-authored-by: Iryna Telesheva <[email protected]> --------- Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> * Update the user workflow for the challenges with CI/CD (stellar#5) * Update the Crowdfund challenge with pull request validation step info * Refactor * Add isPullRequestRequired field handling * Update text for Crowdfund checkpoint 8 * Make isPullRequestRequired required * Fix issue with dates * Merge branch 'main' into SSDC23 * Update challenge-0-crowdfund.mdx --------- Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> * Updated mdx files on dapps (stellar#525) * Fixed typos in dapps section * Fixed typos in fundamentals-and-concepts section * Add lp dapp challenge (stellar#543) * Create challenge-2-liquidity-pool * update lp dapp challenge * complete lp-dapp challenge * nit spelling * Update challenge-2-liquidity-pool.mdx * nit spelling * nit add steps to workflow * nit update workflow * update workflow again * add diff * edit diff * more diff editing * editorial edits * Update dapps/dapp-challenges/challenge-2-liquidity-pool.mdx Co-authored-by: Elliot Voris <[email protected]> * Update dapps/dapp-challenges/challenge-2-liquidity-pool.mdx Co-authored-by: Elliot Voris <[email protected]> * Update dapps/dapp-challenges/challenge-2-liquidity-pool.mdx Co-authored-by: Elliot Voris <[email protected]> * Update dapps/dapp-challenges/challenge-2-liquidity-pool.mdx Co-authored-by: Elliot Voris <[email protected]> * Update dapps/dapp-challenges/challenge-2-liquidity-pool.mdx Co-authored-by: Elliot Voris <[email protected]> * add reference to earlier step; fix conflict in crowdfund dapp page * update quickstart version * small wording change --------- Co-authored-by: Bri Wylde <[email protected]> Co-authored-by: Elliot Voris <[email protected]> * Update Futurenet to Testnet Across Documentation (stellar#577) * Futurenet -> Testnet * fix broken links * update-rpc-page * Update testnet.mdx * Pass 1 * format * update table in testnet.mdx * update state expiration example script to use testnet * replacing futurenet with testnet in contract deployment example * revert SDC contnet * include testnet network passphrase on releases page * update freighter to include testnet alongside futurenet * revert SDC to Use Futurenet for the time being * style: fix up markdown syntax and style in `rpc.mdx` Also adds some small linguistic and grammer changes, as well as more updates from Futurenet to Testnet * docs: include Testnet when describing what RPC servers SDF maintains * style: changing a single ellipsis character with three periods * docs: include gh repo links to the software that runs in quickstart * add the Testnet network to the example `initialize.sh` script * change contract-invoking transaction example code to use Testnet * change to valid futurenet URLs in dapp challenges * Apply suggestions from code review minor tweaks that slipped through the cracks --------- Co-authored-by: Elliot Voris <[email protected]> * Soroban Dapps Challenge: Update Sidebar and Remove Local Deployment (stellar#597) * remove challenges top level dropdown; remove local deployment * update Soroban version * Prevent Popup for Testnet * Leaderboard and Freighter API integration (stellar#598) * Add leaderboard with wallet integration feature * Update index.tsx * Add total value locked logic with reseting user data * Refactor reset logic * Refactor sorting * Revert TVL for payment * Update resubmit contract id logic * Fix resubmiting contractId * Add pagination and wallet address to leaderboard * Change columns order * Allow payment be completed * User submit ContractID * use GH token * use npm instead of yarn * Update main.yml * revert back to yarn * use https for wallets kit * try access token * use new github token * set up to use git https * last random try * Update main.yml * use default settings * set origin for wallets-kit * trying npm again * nit: use npm for scripts * Remove stellar wallets kit; add support for users w no progredd * nit: phrasing * Use Original GH Action * Show user address * nit: phrasing * nit: connect message * add missing cd --------- Co-authored-by: Julian Martinez <[email protected]> Co-authored-by: Julian Martinez <[email protected]> * update leaderboard ranking toggle (stellar#609) * Corrected calculation of total pages so that 'Prev' and 'Next' buttons are disabled when table contains less than 10 rows. (stellar#611) * Add tabs to dapps challenge checkpoints (stellar#610) * Update challenge-0-crowdfund.mdx * Add tabs to interaction step * add tabs to checkpoints * feat: provide a means of receiving simple feedback from users (stellar#587) * feat: provide a means of receiving simple feedback from users Here, we have swizzled (ejected) the `DocItem/Footer` component from docusaurus, and are inserting our own `ReaderFeedback` component into it before the rest of the doc footer content. Also, the `custom.scss` file has been used to style this element in a consistent manner with the rest of the site. This is the first step to resolve stellar#586: The user interaction can now take place. From here, we will work on integrating the custom events into Google analytics. Ultimately, we will like to implment this feature into the `stellar-docs` repository, as well. Refs: stellar#586 * Moving some React state things around * Including an `alt` tag for the like/dislike buttons * use the `pageId` for `eventLabel` in the send event * style: Linting the code * style: changing inline svg tag to be on newlines, changine filename to `jsx` * feat: Inserting the `DocItem/Footer` components on `dapps` and `api` pages * feat: migrating to the GA4 plugin in docusaurus * Testing with a new ga4 tracking id for preview domain * add some console statements to test what's happening * add configuration for test gtag container for this pr preview * feat: use `gtag` over the deprecated `ga` function * adding my own test gtag? * Remove the `gtag` function call, and just register state * removing the old-style google analytics tag for good * remove staging tag manager containers in preparation for production * replace staging ga4 tracking id with production tracking id * use `@site/static` for feedback button imports, rename file extension * Remove docker image hashes (stellar#628) * remove mentions of specific image hashes in docker commands * update docker image hash to most recent version on releases page * Update Soroban Dapps Challenge copy (stellar#631) * update redeployment section * add description for deployment * update links * add note about building `target` * Update challenge-0-crowdfund.mdx * Update challenge-2-liquidity-pool.mdx * Sdc mental models: payment dapp upgrades (stellar#641) * bringing sdc-mental-models branch up to date (stellar#632) * feat: provide a means of receiving simple feedback from users (stellar#587) * feat: provide a means of receiving simple feedback from users Here, we have swizzled (ejected) the `DocItem/Footer` component from docusaurus, and are inserting our own `ReaderFeedback` component into it before the rest of the doc footer content. Also, the `custom.scss` file has been used to style this element in a consistent manner with the rest of the site. This is the first step to resolve stellar#586: The user interaction can now take place. From here, we will work on integrating the custom events into Google analytics. Ultimately, we will like to implment this feature into the `stellar-docs` repository, as well. Refs: stellar#586 * Moving some React state things around * Including an `alt` tag for the like/dislike buttons * use the `pageId` for `eventLabel` in the send event * style: Linting the code * style: changing inline svg tag to be on newlines, changine filename to `jsx` * feat: Inserting the `DocItem/Footer` components on `dapps` and `api` pages * feat: migrating to the GA4 plugin in docusaurus * Testing with a new ga4 tracking id for preview domain * add some console statements to test what's happening * add configuration for test gtag container for this pr preview * feat: use `gtag` over the deprecated `ga` function * adding my own test gtag? * Remove the `gtag` function call, and just register state * removing the old-style google analytics tag for good * remove staging tag manager containers in preparation for production * replace staging ga4 tracking id with production tracking id * use `@site/static` for feedback button imports, rename file extension * rpc: rename expirationLedgerSeq to liveUntilLedgerSeq (stellar#625) * rpc: rename expirationLedgerSeq to liveUntilLedgerSeq * rpc: rename expiration ledger in openrpc file --------- Co-authored-by: Elliot Voris <[email protected]> * Remove docker image hashes (stellar#628) * remove mentions of specific image hashes in docker commands * update docker image hash to most recent version on releases page * Update WASM retrieval tutorial (stellar#627) * docs: explain the diagnostic events that are emitted in sandbox (stellar#593) * docs: explain the diagnostic events that are emitted in sandbox Perhaps this approach is too verbose? I think having the explanation of what is being seen right there in the tutorial is useful at this early step in the "getting started" section. A new developer is more likely to understand what they see, and remember what it is in the future if we don't try to interrupt their flow at this point by sending them to another page for some (possibly irrelevant) info. I may be incorrect there, and I'm happy to hear opinions from others. Refs: stellar#521 * docs: add a space between two words * editorial in Update hello-world.mdx --------- Co-authored-by: Bri Wylde <[email protected]> * Fix a couple typos in rust-dialect.mdx (stellar#630) --------- Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Alfonso Acosta <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: Bri Wylde <[email protected]> Co-authored-by: Sapo-Dorado <[email protected]> * Crowdfund dapp copy updates v1 Added in some (minimal) context throughout. Tidied up a few grammatical/spelling inconsistencies. * add description and update "ship it" workflow * update soroban-cli install * Update challenge-0-crowdfund.mdx * remove extra vercel link * Merge branch 'main' into sdc-mental-models * Add intro to dapps * nit formatting * Payment dapp copy updates Updates to Checkpoints 0-4 of the Payment dapp challenge, including added copy and a few very minor grammatical upgrades. * add more context * Merge Payment dapp fix (stellar#643) * Update latest testnet-compatible JavaScript release versions (stellar#634) * Update latest testnet-compatible JavaScript release versions * Add links to release notes for each version * Upgrade `getLedgerEntries` examples to latest pre-stable releases of the SDKs (stellar#635) Co-authored-by: Elliot Voris <[email protected]> * Switch Ubuntu base image to 22.04 from 20.04 (stellar#638) Signed-off-by: Satyam Zode <[email protected]> Co-authored-by: Satyam Zode <[email protected]> * Update getting-started for 20.0.0-rc.4.1 cli (stellar#636) * Updates to setup.mdx * Add CLI for testnet configuration to Setup * Updates to hello-world.mdx Reorder some code snippets to be after the description * Small edits in storing-data.mdx * Add high_expiration_watermark argument to bump in incrementor * Move deploy-to-testnet after hello-world to allow the user to interact with their contract on testnet * Add Optimizing Builds to hello-world * Update storing-data to remove sandbox interation * Add a deploy-incrementor-to-testnet step * Update position of Create an App * Apply suggestions from code review Co-authored-by: Chad Ostrowski <[email protected]> * Apply suggestions from code review Co-authored-by: Chad Ostrowski <[email protected]> * Update create-an-app.mdx * Fix typo * Add a mv command for .soroban dir when reorganizing to a multi-contract project * Apply mdx prettier updates * Update astro port in create-an-app.mdx * Apply suggestions from code review Co-authored-by: Elliot Voris <[email protected]> * Add .mdx to end of internal markdown links for docusaurus magic * Make sure there are new lines before and after ::: tags * Some additional edits/improvements * Mention that Freighter is available as a firefox add-on * Update the deploy-incrementor url * Apply prettier updates --------- Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: Elliot Voris <[email protected]> * docs: change preflight wording to simulate transaction (stellar#585) * docs: change preflight wording to simulate transaction A first attempt to resolve stellar#478, there may be more work to be done. I've used a few different phrases, depending on how the sentence structure works, perhaps taking some liberties in the process. I've also left alone the `releases` page for preview releases older than 11. It seems unnecessary to rewrite the development history too far into the past. Refs: stellar#478 * editorial on Update interacting-with-contracts.mdx * added a couple "the"s Update state-expiration.mdx * fix wording about ledger entries to be less confusing * clearing up some other language surrounding footprints --------- Co-authored-by: Bri Wylde <[email protected]> * Create data-providers.mdx (stellar#629) * Create data-providers.mdx Adding new page for data providers to cover indexers and block explorers * Update data-providers.mdx updated explanation text * style: fixing some markdown styles and formatting * Adding some more verbose descriptions and links --------- Co-authored-by: Elliot Voris <[email protected]> * docs: change sitewide wording from "preview release" to "release candidate" (stellar#639) * docs: update welcome page "preview release" > "release candidate" * docs: change "preview release" > "release candidate" on releases page * update payment challenge; add styles * add clickable object to localhost:9000 example * Update challenge-1-payment.mdx * Squashed commit of the following: commit 76c48ccd8049bca6bb11f131cefb35253dad86b2 Author: Julian Martinez <[email protected]> Date: Wed Nov 8 10:10:12 2023 -0800 add more context --------- Signed-off-by: Satyam Zode <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Elizabeth <[email protected]> Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Bri Wylde <[email protected]> Co-authored-by: jcx120 <[email protected]> * format image * Squashed commit of the following: commit 308444d93d4f7133107ca499a6d255fe5ae302d4 Author: Julian Martinez <[email protected]> Date: Wed Nov 8 14:55:06 2023 -0800 update copy commit ec062702a5a900ff890bf5cc99dfd9b6dbe1915a Author: Julian Martinez <[email protected]> Date: Wed Nov 8 12:34:07 2023 -0800 add styles for lp commit f7bbf2e61a262aa6dd76bed2f43cd26aafce075b Author: Julian Martinez <[email protected]> Date: Wed Nov 8 12:13:49 2023 -0800 add image styles * update copy for production deployment * caution -> tip * add commas, add soroban-cli install to payment dapp * fix broken link * Squashed commit of the following: commit 7de8a99ec32065376ea4fd2f42a14194cdda6e49 Author: Elliot Voris <[email protected]> Date: Thu Nov 9 15:47:49 2023 -0600 docs: move data providers page out of sdks directory (stellar#645) commit 55e0a866c6dbbe2b4dd38f38816915d59c962584 Author: Elliot Voris <[email protected]> Date: Tue Nov 7 11:40:20 2023 -0600 docs: change sitewide wording from "preview release" to "release candidate" (stellar#639) * docs: update welcome page "preview release" > "release candidate" * docs: change "preview release" > "release candidate" on releases page commit 2ae107280eb4bfee7192e7bdabf704c80ffab43c Author: jcx120 <[email protected]> Date: Tue Nov 7 08:48:50 2023 -0800 Create data-providers.mdx (stellar#629) * Create data-providers.mdx Adding new page for data providers to cover indexers and block explorers * Update data-providers.mdx updated explanation text * style: fixing some markdown styles and formatting * Adding some more verbose descriptions and links --------- Co-authored-by: Elliot Voris <[email protected]> commit 0054011876a8273788a5bf6de16623683c9159d2 Author: Elliot Voris <[email protected]> Date: Mon Nov 6 11:00:02 2023 -0600 docs: change preflight wording to simulate transaction (stellar#585) * docs: change preflight wording to simulate transaction A first attempt to resolve stellar#478, there may be more work to be done. I've used a few different phrases, depending on how the sentence structure works, perhaps taking some liberties in the process. I've also left alone the `releases` page for preview releases older than 11. It seems unnecessary to rewrite the development history too far into the past. Refs: stellar#478 * editorial on Update interacting-with-contracts.mdx * added a couple "the"s Update state-expiration.mdx * fix wording about ledger entries to be less confusing * clearing up some other language surrounding footprints --------- Co-authored-by: Bri Wylde <[email protected]> commit b9710ea0ea6c4652aea2019504534197195a2b3a Author: Elizabeth <[email protected]> Date: Mon Nov 6 11:59:21 2023 -0500 Update getting-started for 20.0.0-rc.4.1 cli (stellar#636) * Updates to setup.mdx * Add CLI for testnet configuration to Setup * Updates to hello-world.mdx Reorder some code snippets to be after the description * Small edits in storing-data.mdx * Add high_expiration_watermark argument to bump in incrementor * Move deploy-to-testnet after hello-world to allow the user to interact with their contract on testnet * Add Optimizing Builds to hello-world * Update storing-data to remove sandbox interation * Add a deploy-incrementor-to-testnet step * Update position of Create an App * Apply suggestions from code review Co-authored-by: Chad Ostrowski <[email protected]> * Apply suggestions from code review Co-authored-by: Chad Ostrowski <[email protected]> * Update create-an-app.mdx * Fix typo * Add a mv command for .soroban dir when reorganizing to a multi-contract project * Apply mdx prettier updates * Update astro port in create-an-app.mdx * Apply suggestions from code review Co-authored-by: Elliot Voris <[email protected]> * Add .mdx to end of internal markdown links for docusaurus magic * Make sure there are new lines before and after ::: tags * Some additional edits/improvements * Mention that Freighter is available as a firefox add-on * Update the deploy-incrementor url * Apply prettier updates --------- Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: Elliot Voris <[email protected]> commit 61054dcad82dbf77c28aa1819ad08b6fa132ad70 Author: Satyam Zode <[email protected]> Date: Fri Nov 3 20:26:27 2023 +0530 Switch Ubuntu base image to 22.04 from 20.04 (stellar#638) Signed-off-by: Satyam Zode <[email protected]> Co-authored-by: Satyam Zode <[email protected]> commit d6091131996ab81e42dff57f4bccaad3f5d56b3e Author: George <[email protected]> Date: Thu Nov 2 12:53:52 2023 -0700 Upgrade `getLedgerEntries` examples to latest pre-stable releases of the SDKs (stellar#635) Co-authored-by: Elliot Voris <[email protected]> commit 228e4bfed691effa58a07b664abfd78b04e6dcd4 Author: George <[email protected]> Date: Thu Nov 2 09:18:50 2023 -0700 Update latest testnet-compatible JavaScript release versions (stellar#634) * Update latest testnet-compatible JavaScript release versions * Add links to release notes for each version * add SEO logic --------- Signed-off-by: Satyam Zode <[email protected]> Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Alfonso Acosta <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: Bri Wylde <[email protected]> Co-authored-by: Sapo-Dorado <[email protected]> Co-authored-by: Julian Martinez <[email protected]> Co-authored-by: Julian Martinez <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Elizabeth <[email protected]> Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: jcx120 <[email protected]> * Add oracle dapp challenge (stellar#664) * add oracle dapp * update endpoint * add images * Update http-client.ts * update challenge list * add last checkpoint to oracle dapp * Update http-client.ts * update meta tag * update title (stellar#665) * Liquidity Pool Dapp copy updates v2 (stellar#651) * Update challenge-2-liquidity-pool.mdx * Update challenge-2-liquidity-pool.mdx * Squashed commit of the following: commit 1864016f07b4f91a0cd9656ca55c2d8c568a0d02 Author: Dmytro Kozhevin <[email protected]> Date: Tue Dec 5 12:09:24 2023 -0500 Remove some outdated cautions from the docs, now that Soroban should be stable. (stellar#672) commit 816e2a0e1f4e0f1e30c909b92b74b75081d3d3d7 Author: Leigh McCulloch <[email protected]> Date: Tue Dec 5 08:48:10 2023 -0800 Remove git init from hello world steps (stellar#666) commit 19b10a8f4c24e495f9dc04f10c694449e4f5a333 Author: Anuxhya <[email protected]> Date: Tue Dec 5 11:43:19 2023 -0500 Update fees-and-metering.mdx (stellar#654) * Update fees-and-metering.mdx Cleaning up the docs challenge 1 of the word s o r o b e r r y. * Update fees-and-metering.mdx Syntax error commit 36cc17fca85efc1471e3aadfb29b0ca1687e536b Author: Leigh McCulloch <[email protected]> Date: Sat Dec 2 21:01:14 2023 -0800 Update soroban-sdk to v20.0.0-rc2.2 (stellar#667) commit c5b01369ede0b78c2626013f2b43683f69db2905 Author: Leigh McCulloch <[email protected]> Date: Fri Dec 1 09:41:37 2023 -0800 Remove step adding target dir to gitignore (stellar#660) commit 214a207 Author: Julian Martinez <[email protected]> Date: Fri Dec 1 09:07:49 2023 -0800 update title (stellar#665) commit 4b91088 Author: Julian Martinez <[email protected]> Date: Fri Dec 1 08:36:59 2023 -0800 Add oracle dapp challenge (stellar#664) * add oracle dapp * update endpoint * add images * Update http-client.ts * update challenge list * add last checkpoint to oracle dapp * Update http-client.ts * update meta tag commit 595d591e97b946a971a51f73520deb3341be6476 Author: Bri Wylde <[email protected]> Date: Thu Nov 30 11:53:53 2023 -0700 clearer Soroban favicon (stellar#662) commit dc14811ded524a6f2d0026b5d1cce19ad4df7827 Author: Elliot Voris <[email protected]> Date: Wed Nov 29 16:11:19 2023 -0600 synchronize api example tabs across pages (stellar#661) commit 4f1198cfde2df402c0e74f1145828423c39e29ea Author: Elliot Voris <[email protected]> Date: Wed Nov 29 13:01:38 2023 -0600 Revert "Update getting started tutorial to use an Astro template (stellar#642)" (stellar#658) This reverts commit 512b1f46506b7edc788bc6e93a0e1f6d101d22ae. commit 81cac0d3524a1a80ce2fadd88e93aa40ffde791b Author: Elliot Voris <[email protected]> Date: Mon Nov 27 16:29:57 2023 -0600 build: a couple small fixes to get the build to work (stellar#657) * build: a couple small fixes to get the build to work * style: changing the way a couple codefences work commit 512b1f46506b7edc788bc6e93a0e1f6d101d22ae Author: Elizabeth Engelman <[email protected]> Date: Mon Nov 27 13:00:32 2023 -0500 Update getting started tutorial to use an Astro template (stellar#642) * Update create-an-app.mdx to use an Astro template * Apply prettier formatting * Add some additional gotchas to the troubleshooting section * Reworks hello-world.mdx using the Astro template * Rework deploy-to-testnet.mdx to interact with the contarct via the frontend * Update storing-data.mdx * Update deploy-incrementor.mdx * Change create-an-app.mdx to wrapping-up.mdx * Apply prettier updates * Apply suggestions from code review Co-authored-by: Chad Ostrowski <[email protected]> * Address PR feedback - move "???" bummer to "taking it further" - add command expansion note to deploy-to-testnet - remove mention of incrementor in deploy-to-testnet * Small cleanup * Address PR feedback * Remove release-with-logs section * Update code snippets to match updated tutorial code * Apply suggestions from code review Co-authored-by: Elliot Voris <[email protected]> * Address PR feedback * Check in prettier updates * update getting started links on the landing page * redirect the old create an app page to the hello world page --------- Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Elliot Voris <[email protected]> commit f04a865b519d05495932fbaaf5bd075c8438c4ef Author: jcx120 <[email protected]> Date: Mon Nov 27 09:23:53 2023 -0800 Update rpc-list.mdx (stellar#653) * Update rpc-list.mdx Added Gateway FM (and removed BlockEden since they are in the Data providers list) * style: linting mdx file --------- Co-authored-by: Elliot Voris <[email protected]> commit a9e0d34f61080bf456219e68c018432370bf3bf0 Author: Elliot Voris <[email protected]> Date: Mon Nov 27 11:22:58 2023 -0600 undo some changes from the docs scavenger hunt (stellar#656) * Revert "Squashed commit of the following:" This reverts commit ada22fee5da3073cc3e4daee60a2c4f3ffc3e378. * Update challenge-2-liquidity-pool.mdx * add context to price setting * Add v20.0.0 (stellar#668) * add P12 Release * formatting * Update releases.mdx * formatting * update horizon,stellar-base,cli * add stellar sdk + base, soroban-client, Quickstart, changelog * remove http from quickstart endpoint * v20.0.0-rc2 -> v20.0.0 * Preview 12 -> Stable v20.0.0 * update CLI, RPC, Core Versions * update stellar cor version * Content updates to go along with the preview 12 version updates (stellar#682) * update the token interface to reflect the Rust SDK * feat: get Getting Started ready for v20.0.x I don't know what the exact version of the CLI will be out by next Monday. In the source here, I've guessed that maybe it will be `20.0.3`. * update `openrpc.json` file to reflect new updates * Update static/openrpc.json Co-authored-by: Alfonso Acosta <[email protected]> --------- Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: Molly Karcher <[email protected]> Co-authored-by: Alfonso Acosta <[email protected]> * Update token-interface.mdx * nit:formatting --------- Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: Molly Karcher <[email protected]> Co-authored-by: Alfonso Acosta <[email protected]> * Update JavaScript SDK references to use the `@stellar/stellar-sdk` package (stellar#687) * Upgrade js sdk dependencies to latest * Track down references to soroban-client and move them * Ran linter * Pre mainnet restructure (stellar#644) * docs: rename "fundamentals and concepts" to "soroban internals" * docs: remove old "under the hood" section * docs: add tags to the various tutorials * docs: move tutorials into one main directory * fix broken links to old pages * docs: renaming soroban internals in category file * docs: remove old "command line reference" category * docs: add tokens directory, rearrange sidebars * docs: rearrange migration from evm guide * docs: remove unused reference/interfaces category * docs: move "reference" section to "resources" * docs: move "releases" page up a level * docs: move FAQ page up one level * docs: move dev tools into resources directory * docs: move testnet.mdx to networks.mdx * docs: rearrange items in resources directory * docs: collapse various SDK pages into two pages * docs: move data-providers up one level * docs: remove some empty categories, move the tutorial template * docs: add a new getting-started page, reorganize that section * docs: change sidebar position integers in soroban-internals * docs: shuffling contract interaction around in soroban-internals * style: fixing a couple small markdown nits in dapps directory * docs: fix a broken link * feat: start to the "guides" page(s) * style(lint): fixing a small linting error * remove guides placeholder * fixing broken links * work on guides listing. might revert this * formatting mdx * docs: fixing a broken link to tutorials * style: crack at making the tutorials filterable and hidden in the sidebar * customizing some components for the `/guides` pages and layouts * rename index page for guides to README * remove commented configuration option * remove some console logging in components * change name of index page in guides sidebar * remove commented sidebar generation code * remove comments and add description to sidebar generator * rename sidebar generator file * more work on how the 'guides' pages might look. * docs: adjusting sidebar positions of new getting started pages * fix some broken links in the getting-started section * prefer "README.mdx" files where possible * some more guides placeholder stubs * docs(guides): More placeholder stubs for guides and categories * feat: don't display "guides in category" page on `/guides` * build: check/fix MDX formatting in more directories than just docs * style: add a larger margin before more category guides * style: more selectively increase that top margin * docs(guides): a quick stab at a "publishing" events guide * docs(guides): first stab at the "publish events" guide * docs: updating tutorial descriptions * fix a few broken links * docs: add note about a tuple with one element * style: couple link changes and reformats * move fuzzing tutorial back * change to README file in contract interactions category * docs(guides): give a better title for the wasm metadata guide * fixing some broken markdown links * fix (another!) broken link * move the guides back into the main layout of the docs directory * add placeholder for testnet reset automation stuff * some initial content for some guides * markdown formatting and fixing broken links * moving "resources" back to "reference" to fit the definition better More like "technical reference" rather than a "reference encyclopedia" * change some styles of the tutorial list * removing most category pages * some more first-drafts of guides * fixing some category links * include a period at the end of each tutorial description * simplify tutorial search box placeholder text * better description for the tutorials page * making the pre-commit script executable * flesh out some of the state archival guides * first effort for some rpc ledger key guides * fix some broken links * add a guide on ingesting events into a db * first effort at storage type guides * Some more stubs, marking drafts, and a couple additions * make not a draft to fix a broken link * guides category descriptions in README.mdx files * marking incomplete chain migration docs as drafts * change some tutorial difficulty levels * fine-tune the tutorials component styling a bit * improving some guides organization * fix linting errors and broken links * include wrap instructions for native lumens * fix broken link in contract metadata guide * final changes to existing guides * moving developer tools into the main sidebar * create real redirects instead of just notes * fix broken links in a dapps challenge page * fix a redirect syntax error * fix a tutorials redirect * update SDC leaderboard (stellar#712) * update leaderboard style * update font color * Refactor wrap/deploy of SAC (stellar#718) Co-authored-by: Leigh McCulloch <[email protected]> Co-authored-by: Elliot Voris <[email protected]> * Refactor deprecated calls to `soroban config` (stellar#731) * Update the community RPC list (stellar#744) * Update RPC list with network info * Add run your own RPC * Fix urls for soroban cli * Fix path to cli * Fix relative link * Add formatted mdx --------- Co-authored-by: Jane Wang <[email protected]> * move dapps challenge directory into place * install new packages for dapps-challenge * delete mispelled constants file * fix relative imports * move challenges to pages directory, and use README files * correct markdown link * fix broken links in dapps challenge docs * fix link routes in dapps challenge dashboard * add /src/pages dir to markdown formatting checks; format markdown * fix relative imports on dapps challenge dashboard * move the dashboard location into the dapps URLs * add dapps challenge dashboard to the sidebar using a customized sidebar generator for this. * remove soroban events provider component from challenge forms * fix dashboard links on dapp challenge pages * change some frontmater and remove head items from dapps challenges * move the docker guide from dapps challenge to guides * move the rest of the dapps challenge guides * update and move around the dapps guides * lint and format markdown * redirect /dapps requests, just in case * remove link to guide content that no longer exists * add link to dapps challenge in footer * add link to freighter guide on dapps challenge intro page * Update Dapps Challenge name in sidebar --------- Signed-off-by: Satyam Zode <[email protected]> Co-authored-by: Julian Martinez <[email protected]> Co-authored-by: Bri <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: Alejandro Criado-Pérez <[email protected]> Co-authored-by: illiassmalashchuk <[email protected]> Co-authored-by: Julian Martinez <[email protected]> Co-authored-by: MazurakIhor <[email protected]> Co-authored-by: nmadadair <[email protected]> Co-authored-by: Alfonso Acosta <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: Sapo-Dorado <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Elizabeth <[email protected]> Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: jcx120 <[email protected]> Co-authored-by: Molly Karcher <[email protected]> Co-authored-by: Pamphile Roy <[email protected]> Co-authored-by: Leigh McCulloch <[email protected]> Co-authored-by: Jane Wang <[email protected]> Co-authored-by: Jane Wang <[email protected]>
This is great! Thank you @silence48! This one will be a bit delayed in review, but we'll have it done by 7/5. |
* initial commit * example including an image * add doc on assets-and-authorization, with auth part filled in * update wordmark * Add a homepage (stellar#197) * permit homepage * progress * desktop version is donenough * slight mobile tweaks * feedback tweaks * small order and style tweaks * mobile tweaks * copy tweak * moar slight tweaks * add Sorobanathon links * slight rename * z-index tweaks * USDC -> XLM * copy tweak * tweakers for weekers * copy and zindex tweaks * appeasing the nit pickers * added a meta image * Soroban landing (stellar#396) * init soroban landing * Start landing markup * Add earn section and refine styles * Add SCF section * Add Soroban section * Update hero min-height * add media section * add assets v1 * add links to getting started * update twitter * add assets v2 * add missing links * Adjust images * final * clean up old home page assets * cleanup scss colors * added hello world code * dark mode * fixed some minor issues * updaters * add a 5. card --------- Co-authored-by: Jesmar Castillo <[email protected]> Co-authored-by: Tyler van der Hoeven <[email protected]> * Evm to Soroban (#409) * initial commit * add code breakdown * add mdx * remove mdx * update Rust SC * add advanced concepts * add vault contract and tests * Update solidity-and-rust-advanced-concepts.mdx * remove un tabbed code * update vault.rs; add shell cmds * update yield amount * add vault deployment and interaction * add wdraw message * fix script sequence * add EVM comparison * update error handling * 1st round review * Update script descroption * add solidity to approved languages * fixed a broken link * move file folder; add token inheritance * update links * fixed broken links * update Soroban Description * nit: spelling * Fix bytes and arrays * spelling errors * spelling errors * no capitalization on build * grammar spelling errors * spelling and grammar errors * fixes; post PR review * macros description * Correction: Data Types * update Symbol Definition * update traits definition: fix Solidity Contract * Merge main into evm-to-soroban (stellar#414) * update code block (stellar#400) * additional copy changes to site (stellar#401) * copy edits from Dom (stellar#403) * update broken link (stellar#404) * update token interface (stellar#406) * update token intereface Interface was referenced from : https://github.com/stellar/rs-soroban-sdk/blob/main/soroban-sdk/src/token.rs * update fn description * nit: update fn description * nit: format * nit: bracket format * fix event topics * update events * revert per PR to fix event name https://github.com/stellar/rs-soroban-env/pull/778/files * Improve Failure Condition Handling in Token Interface (stellar#394) * Add Error Handling Section * update authorization info * add more context to authorization * nit: call not specific to callers address * Add event docs (stellar#375) * Add event docs * Remove note * Add link to events example * fixes malformed hello world link (stellar#412) * Remove derive Default (stellar#413) --------- Co-authored-by: Tyler van der Hoeven <[email protected]> Co-authored-by: Bri <[email protected]> Co-authored-by: Siddharth Suresh <[email protected]> Co-authored-by: Leigh McCulloch <[email protected]> * fix spelling and add string example * move evm-to-soroban * resolve conflict * add auth section. Add comparison for addresses * embolden main point about replay prevention * nit update section * nit wording * improve Address and Auth Callouts * update contract deposit fn. Update ID to addr conversion * nit: var placeholders * example vault update * update vault example to 8.1 * update to align w main * updates Env:: to env. ; nits * add section on composability * nit: update soroban-sdk version * update example to use sdk 8.4 * remove admin from mint * nit: grammar; update tx messages --------- Co-authored-by: Tyler van der Hoeven <[email protected]> Co-authored-by: Bri <[email protected]> Co-authored-by: Siddharth Suresh <[email protected]> Co-authored-by: Leigh McCulloch <[email protected]> * Add dapps challenge (stellar#487) * Add Dapps Challenge to Docs Todo: user dashboard visibility * add hide unless dapps * update user card * update checkpoints * add user dashboard to dapps challenges * Update Dapp Challenge Description * Update tsconfig.json * fix tsconfig.json * small grammar fixes * small grammar fixes * small grammar fixes * small grammar fixes * small grammar fixes * update challenge 0 and 1 ; add images for challenge 2 * Capitalize Futurenet; lowercase Dapp when needed * disclaimer; nit crowdfunding -> crowdfund * Update challenge-0-crowdfund.mdx * update layout and guides * Update smart-contracts.mdx * update content * add links * nit update soroban quickstart * Update react.mdx * Update challenge-0-crowdfund.mdx * update start course redirect * we -> you * update wrangler endpoint to stellar cloudflare * update wrangler endpoint * add module resolution and jsx * add wrong network page; remove unused code; add vercel.app checking * update wallets conclusion * nit Update wallets.mdx * nit update broken link * Freighter -> WalletData Component * update crowdfund dapps challenge for P10 * Fix Setup * update docker workflow; add better notes * nit standalone docker requirement * re-enable .vercel.app check; move ParentChallengeForm * move Login function * fixed automatic log in problem * comment out connection check * comment out auto connect hook; nit Login -> Connect * removed unused setLoading() changed order of operations * update to checkout challenge branch * completed challenge message = clickable url * remember user is logged in * setup `BrowserOnly` * Update yarn.lock * Update yarn.lock * merge main into dapps challenge * Update yarn.lock * nit: refresh message * add disconnect button comment; better connection insight * update contract initialization to use strings * auto populate url; add resubmit; fix broken invoke * add setSavedUrl; improve url auto populate * improve local storage for pubkey --------- Co-authored-by: Bri <[email protected]> * seo-editorial-docs (stellar#547) * SDC UI upgrades (stellar#542) * Update index.tsx * update kv:worker endpoint * Update index.tsx * Add Root component, finish-step-button, update styles * Add library for toast notifications, show milestone notification * Add class for HttpClient, functions for requests * Changed backend model, finalize user progress on course * Add confetti effect on complete button click, refactor * Remove mocks, use endpoint, fix issues * Merge Development into main (stellar#2) * update kv:worker endpoint * Update index.tsx * Add Root component, finish-step-button, update styles * Add library for toast notifications, show milestone notification * Add class for HttpClient, functions for requests * Changed backend model, finalize user progress on course * Add confetti effect on complete button click, refactor * Remove mocks, use endpoint, fix issues --------- Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> * Add Dashboard for Dapps challenges (stellar#3) * Added dashboard component, styled cards * Added DashboardHeader, Leaderboard component, tabs, styles * Added ChallengesList component, updated login logic, tabs * Refactor existing approach, update models, add filtering * Add UI folder, add id for switcher and random avatar generating * Remove old dashboard components, rename util file * Add dashboard link to dapps sidebar instead of navbar * Add TODOs, rename component * Fix issues * Add Dashboard for Dapps challenges (stellar#3) (stellar#4) * Added dashboard component, styled cards * Added DashboardHeader, Leaderboard component, tabs, styles * Added ChallengesList component, updated login logic, tabs * Refactor existing approach, update models, add filtering * Add UI folder, add id for switcher and random avatar generating * Remove old dashboard components, rename util file * Add dashboard link to dapps sidebar instead of navbar * Add TODOs, rename component * Fix issues Co-authored-by: Iryna Telesheva <[email protected]> * Merge SDC from julian-dev28:main to Stellar:SSDC23 (stellar#541) * Update index.tsx * update kv:worker endpoint * Update index.tsx * Add Root component, finish-step-button, update styles * Add library for toast notifications, show milestone notification * Add class for HttpClient, functions for requests * Changed backend model, finalize user progress on course * Add confetti effect on complete button click, refactor * Remove mocks, use endpoint, fix issues * Merge Development into main (stellar#2) * update kv:worker endpoint * Update index.tsx * Add Root component, finish-step-button, update styles * Add library for toast notifications, show milestone notification * Add class for HttpClient, functions for requests * Changed backend model, finalize user progress on course * Add confetti effect on complete button click, refactor * Remove mocks, use endpoint, fix issues --------- Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> * Add Dashboard for Dapps challenges (stellar#3) (stellar#4) * Added dashboard component, styled cards * Added DashboardHeader, Leaderboard component, tabs, styles * Added ChallengesList component, updated login logic, tabs * Refactor existing approach, update models, add filtering * Add UI folder, add id for switcher and random avatar generating * Remove old dashboard components, rename util file * Add dashboard link to dapps sidebar instead of navbar * Add TODOs, rename component * Fix issues Co-authored-by: Iryna Telesheva <[email protected]> --------- Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> * Update the user workflow for the challenges with CI/CD (stellar#5) * Update the Crowdfund challenge with pull request validation step info * Refactor * Add isPullRequestRequired field handling * Update text for Crowdfund checkpoint 8 * Make isPullRequestRequired required * Fix issue with dates * Merge branch 'main' into SSDC23 * Update challenge-0-crowdfund.mdx --------- Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> * Add lp dapp challenge (stellar#543) * Create challenge-2-liquidity-pool * update lp dapp challenge * complete lp-dapp challenge * nit spelling * Update challenge-2-liquidity-pool.mdx * nit spelling * nit add steps to workflow * nit update workflow * update workflow again * add diff * edit diff * more diff editing * editorial edits * Update dapps/dapp-challenges/challenge-2-liquidity-pool.mdx Co-authored-by: Elliot Voris <[email protected]> * Update dapps/dapp-challenges/challenge-2-liquidity-pool.mdx Co-authored-by: Elliot Voris <[email protected]> * Update dapps/dapp-challenges/challenge-2-liquidity-pool.mdx Co-authored-by: Elliot Voris <[email protected]> * Update dapps/dapp-challenges/challenge-2-liquidity-pool.mdx Co-authored-by: Elliot Voris <[email protected]> * Update dapps/dapp-challenges/challenge-2-liquidity-pool.mdx Co-authored-by: Elliot Voris <[email protected]> * add reference to earlier step; fix conflict in crowdfund dapp page * update quickstart version * small wording change --------- Co-authored-by: Bri Wylde <[email protected]> Co-authored-by: Elliot Voris <[email protected]> * Sdc mental models: payment dapp upgrades (stellar#641) * bringing sdc-mental-models branch up to date (stellar#632) * feat: provide a means of receiving simple feedback from users (stellar#587) * feat: provide a means of receiving simple feedback from users Here, we have swizzled (ejected) the `DocItem/Footer` component from docusaurus, and are inserting our own `ReaderFeedback` component into it before the rest of the doc footer content. Also, the `custom.scss` file has been used to style this element in a consistent manner with the rest of the site. This is the first step to resolve stellar#586: The user interaction can now take place. From here, we will work on integrating the custom events into Google analytics. Ultimately, we will like to implment this feature into the `stellar-docs` repository, as well. Refs: stellar#586 * Moving some React state things around * Including an `alt` tag for the like/dislike buttons * use the `pageId` for `eventLabel` in the send event * style: Linting the code * style: changing inline svg tag to be on newlines, changine filename to `jsx` * feat: Inserting the `DocItem/Footer` components on `dapps` and `api` pages * feat: migrating to the GA4 plugin in docusaurus * Testing with a new ga4 tracking id for preview domain * add some console statements to test what's happening * add configuration for test gtag container for this pr preview * feat: use `gtag` over the deprecated `ga` function * adding my own test gtag? * Remove the `gtag` function call, and just register state * removing the old-style google analytics tag for good * remove staging tag manager containers in preparation for production * replace staging ga4 tracking id with production tracking id * use `@site/static` for feedback button imports, rename file extension * rpc: rename expirationLedgerSeq to liveUntilLedgerSeq (stellar#625) * rpc: rename expirationLedgerSeq to liveUntilLedgerSeq * rpc: rename expiration ledger in openrpc file --------- Co-authored-by: Elliot Voris <[email protected]> * Remove docker image hashes (stellar#628) * remove mentions of specific image hashes in docker commands * update docker image hash to most recent version on releases page * Update WASM retrieval tutorial (stellar#627) * docs: explain the diagnostic events that are emitted in sandbox (stellar#593) * docs: explain the diagnostic events that are emitted in sandbox Perhaps this approach is too verbose? I think having the explanation of what is being seen right there in the tutorial is useful at this early step in the "getting started" section. A new developer is more likely to understand what they see, and remember what it is in the future if we don't try to interrupt their flow at this point by sending them to another page for some (possibly irrelevant) info. I may be incorrect there, and I'm happy to hear opinions from others. Refs: stellar#521 * docs: add a space between two words * editorial in Update hello-world.mdx --------- Co-authored-by: Bri Wylde <[email protected]> * Fix a couple typos in rust-dialect.mdx (stellar#630) --------- Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Alfonso Acosta <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: Bri Wylde <[email protected]> Co-authored-by: Sapo-Dorado <[email protected]> * Crowdfund dapp copy updates v1 Added in some (minimal) context throughout. Tidied up a few grammatical/spelling inconsistencies. * add description and update "ship it" workflow * update soroban-cli install * Update challenge-0-crowdfund.mdx * remove extra vercel link * Merge branch 'main' into sdc-mental-models * Add intro to dapps * nit formatting * Payment dapp copy updates Updates to Checkpoints 0-4 of the Payment dapp challenge, including added copy and a few very minor grammatical upgrades. * add more context * Merge Payment dapp fix (stellar#643) * Update latest testnet-compatible JavaScript release versions (stellar#634) * Update latest testnet-compatible JavaScript release versions * Add links to release notes for each version * Upgrade `getLedgerEntries` examples to latest pre-stable releases of the SDKs (stellar#635) Co-authored-by: Elliot Voris <[email protected]> * Switch Ubuntu base image to 22.04 from 20.04 (stellar#638) Signed-off-by: Satyam Zode <[email protected]> Co-authored-by: Satyam Zode <[email protected]> * Update getting-started for 20.0.0-rc.4.1 cli (stellar#636) * Updates to setup.mdx * Add CLI for testnet configuration to Setup * Updates to hello-world.mdx Reorder some code snippets to be after the description * Small edits in storing-data.mdx * Add high_expiration_watermark argument to bump in incrementor * Move deploy-to-testnet after hello-world to allow the user to interact with their contract on testnet * Add Optimizing Builds to hello-world * Update storing-data to remove sandbox interation * Add a deploy-incrementor-to-testnet step * Update position of Create an App * Apply suggestions from code review Co-authored-by: Chad Ostrowski <[email protected]> * Apply suggestions from code review Co-authored-by: Chad Ostrowski <[email protected]> * Update create-an-app.mdx * Fix typo * Add a mv command for .soroban dir when reorganizing to a multi-contract project * Apply mdx prettier updates * Update astro port in create-an-app.mdx * Apply suggestions from code review Co-authored-by: Elliot Voris <[email protected]> * Add .mdx to end of internal markdown links for docusaurus magic * Make sure there are new lines before and after ::: tags * Some additional edits/improvements * Mention that Freighter is available as a firefox add-on * Update the deploy-incrementor url * Apply prettier updates --------- Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: Elliot Voris <[email protected]> * docs: change preflight wording to simulate transaction (stellar#585) * docs: change preflight wording to simulate transaction A first attempt to resolve stellar#478, there may be more work to be done. I've used a few different phrases, depending on how the sentence structure works, perhaps taking some liberties in the process. I've also left alone the `releases` page for preview releases older than 11. It seems unnecessary to rewrite the development history too far into the past. Refs: stellar#478 * editorial on Update interacting-with-contracts.mdx * added a couple "the"s Update state-expiration.mdx * fix wording about ledger entries to be less confusing * clearing up some other language surrounding footprints --------- Co-authored-by: Bri Wylde <[email protected]> * Create data-providers.mdx (stellar#629) * Create data-providers.mdx Adding new page for data providers to cover indexers and block explorers * Update data-providers.mdx updated explanation text * style: fixing some markdown styles and formatting * Adding some more verbose descriptions and links --------- Co-authored-by: Elliot Voris <[email protected]> * docs: change sitewide wording from "preview release" to "release candidate" (stellar#639) * docs: update welcome page "preview release" > "release candidate" * docs: change "preview release" > "release candidate" on releases page * update payment challenge; add styles * add clickable object to localhost:9000 example * Update challenge-1-payment.mdx * Squashed commit of the following: commit b6a1a46df7d2b42b340f1331ec52733bc6216725 Author: Julian Martinez <[email protected]> Date: Wed Nov 8 10:10:12 2023 -0800 add more context --------- Signed-off-by: Satyam Zode <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Elizabeth <[email protected]> Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Bri Wylde <[email protected]> Co-authored-by: jcx120 <[email protected]> * format image * Squashed commit of the following: commit 308444d93d4f7133107ca499a6d255fe5ae302d4 Author: Julian Martinez <[email protected]> Date: Wed Nov 8 14:55:06 2023 -0800 update copy commit ec062702a5a900ff890bf5cc99dfd9b6dbe1915a Author: Julian Martinez <[email protected]> Date: Wed Nov 8 12:34:07 2023 -0800 add styles for lp commit f7bbf2e61a262aa6dd76bed2f43cd26aafce075b Author: Julian Martinez <[email protected]> Date: Wed Nov 8 12:13:49 2023 -0800 add image styles * update copy for production deployment * caution -> tip * add commas, add soroban-cli install to payment dapp * fix broken link * Squashed commit of the following: commit 7de8a99ec32065376ea4fd2f42a14194cdda6e49 Author: Elliot Voris <[email protected]> Date: Thu Nov 9 15:47:49 2023 -0600 docs: move data providers page out of sdks directory (stellar#645) commit 55e0a866c6dbbe2b4dd38f38816915d59c962584 Author: Elliot Voris <[email protected]> Date: Tue Nov 7 11:40:20 2023 -0600 docs: change sitewide wording from "preview release" to "release candidate" (stellar#639) * docs: update welcome page "preview release" > "release candidate" * docs: change "preview release" > "release candidate" on releases page commit 2ae107280eb4bfee7192e7bdabf704c80ffab43c Author: jcx120 <[email protected]> Date: Tue Nov 7 08:48:50 2023 -0800 Create data-providers.mdx (stellar#629) * Create data-providers.mdx Adding new page for data providers to cover indexers and block explorers * Update data-providers.mdx updated explanation text * style: fixing some markdown styles and formatting * Adding some more verbose descriptions and links --------- Co-authored-by: Elliot Voris <[email protected]> commit 0054011876a8273788a5bf6de16623683c9159d2 Author: Elliot Voris <[email protected]> Date: Mon Nov 6 11:00:02 2023 -0600 docs: change preflight wording to simulate transaction (stellar#585) * docs: change preflight wording to simulate transaction A first attempt to resolve stellar#478, there may be more work to be done. I've used a few different phrases, depending on how the sentence structure works, perhaps taking some liberties in the process. I've also left alone the `releases` page for preview releases older than 11. It seems unnecessary to rewrite the development history too far into the past. Refs: stellar#478 * editorial on Update interacting-with-contracts.mdx * added a couple "the"s Update state-expiration.mdx * fix wording about ledger entries to be less confusing * clearing up some other language surrounding footprints --------- Co-authored-by: Bri Wylde <[email protected]> commit b9710ea0ea6c4652aea2019504534197195a2b3a Author: Elizabeth <[email protected]> Date: Mon Nov 6 11:59:21 2023 -0500 Update getting-started for 20.0.0-rc.4.1 cli (stellar#636) * Updates to setup.mdx * Add CLI for testnet configuration to Setup * Updates to hello-world.mdx Reorder some code snippets to be after the description * Small edits in storing-data.mdx * Add high_expiration_watermark argument to bump in incrementor * Move deploy-to-testnet after hello-world to allow the user to interact with their contract on testnet * Add Optimizing Builds to hello-world * Update storing-data to remove sandbox interation * Add a deploy-incrementor-to-testnet step * Update position of Create an App * Apply suggestions from code review Co-authored-by: Chad Ostrowski <[email protected]> * Apply suggestions from code review Co-authored-by: Chad Ostrowski <[email protected]> * Update create-an-app.mdx * Fix typo * Add a mv command for .soroban dir when reorganizing to a multi-contract project * Apply mdx prettier updates * Update astro port in create-an-app.mdx * Apply suggestions from code review Co-authored-by: Elliot Voris <[email protected]> * Add .mdx to end of internal markdown links for docusaurus magic * Make sure there are new lines before and after ::: tags * Some additional edits/improvements * Mention that Freighter is available as a firefox add-on * Update the deploy-incrementor url * Apply prettier updates --------- Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: Elliot Voris <[email protected]> commit 61054dcad82dbf77c28aa1819ad08b6fa132ad70 Author: Satyam Zode <[email protected]> Date: Fri Nov 3 20:26:27 2023 +0530 Switch Ubuntu base image to 22.04 from 20.04 (stellar#638) Signed-off-by: Satyam Zode <[email protected]> Co-authored-by: Satyam Zode <[email protected]> commit d6091131996ab81e42dff57f4bccaad3f5d56b3e Author: George <[email protected]> Date: Thu Nov 2 12:53:52 2023 -0700 Upgrade `getLedgerEntries` examples to latest pre-stable releases of the SDKs (stellar#635) Co-authored-by: Elliot Voris <[email protected]> commit 228e4bfed691effa58a07b664abfd78b04e6dcd4 Author: George <[email protected]> Date: Thu Nov 2 09:18:50 2023 -0700 Update latest testnet-compatible JavaScript release versions (stellar#634) * Update latest testnet-compatible JavaScript release versions * Add links to release notes for each version * add SEO logic --------- Signed-off-by: Satyam Zode <[email protected]> Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Alfonso Acosta <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: Bri Wylde <[email protected]> Co-authored-by: Sapo-Dorado <[email protected]> Co-authored-by: Julian Martinez <[email protected]> Co-authored-by: Julian Martinez <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Elizabeth <[email protected]> Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: jcx120 <[email protected]> * undo some changes from the docs scavenger hunt (stellar#656) * clearer Soroban favicon (stellar#662) * Add oracle dapp challenge (stellar#664) * add oracle dapp * update endpoint * add images * Update http-client.ts * update challenge list * add last checkpoint to oracle dapp * Update http-client.ts * update meta tag * add some items for the rollout (stellar#684) * Pre mainnet restructure (stellar#644) * docs: rename "fundamentals and concepts" to "soroban internals" * docs: remove old "under the hood" section * docs: add tags to the various tutorials * docs: move tutorials into one main directory * fix broken links to old pages * docs: renaming soroban internals in category file * docs: remove old "command line reference" category * docs: add tokens directory, rearrange sidebars * docs: rearrange migration from evm guide * docs: remove unused reference/interfaces category * docs: move "reference" section to "resources" * docs: move "releases" page up a level * docs: move FAQ page up one level * docs: move dev tools into resources directory * docs: move testnet.mdx to networks.mdx * docs: rearrange items in resources directory * docs: collapse various SDK pages into two pages * docs: move data-providers up one level * docs: remove some empty categories, move the tutorial template * docs: add a new getting-started page, reorganize that section * docs: change sidebar position integers in soroban-internals * docs: shuffling contract interaction around in soroban-internals * style: fixing a couple small markdown nits in dapps directory * docs: fix a broken link * feat: start to the "guides" page(s) * style(lint): fixing a small linting error * remove guides placeholder * fixing broken links * work on guides listing. might revert this * formatting mdx * docs: fixing a broken link to tutorials * style: crack at making the tutorials filterable and hidden in the sidebar * customizing some components for the `/guides` pages and layouts * rename index page for guides to README * remove commented configuration option * remove some console logging in components * change name of index page in guides sidebar * remove commented sidebar generation code * remove comments and add description to sidebar generator * rename sidebar generator file * more work on how the 'guides' pages might look. * docs: adjusting sidebar positions of new getting started pages * fix some broken links in the getting-started section * prefer "README.mdx" files where possible * some more guides placeholder stubs * docs(guides): More placeholder stubs for guides and categories * feat: don't display "guides in category" page on `/guides` * build: check/fix MDX formatting in more directories than just docs * style: add a larger margin before more category guides * style: more selectively increase that top margin * docs(guides): a quick stab at a "publishing" events guide * docs(guides): first stab at the "publish events" guide * docs: updating tutorial descriptions * fix a few broken links * docs: add note about a tuple with one element * style: couple link changes and reformats * move fuzzing tutorial back * change to README file in contract interactions category * docs(guides): give a better title for the wasm metadata guide * fixing some broken markdown links * fix (another!) broken link * move the guides back into the main layout of the docs directory * add placeholder for testnet reset automation stuff * some initial content for some guides * markdown formatting and fixing broken links * moving "resources" back to "reference" to fit the definition better More like "technical reference" rather than a "reference encyclopedia" * change some styles of the tutorial list * removing most category pages * some more first-drafts of guides * fixing some category links * include a period at the end of each tutorial description * simplify tutorial search box placeholder text * better description for the tutorials page * making the pre-commit script executable * flesh out some of the state archival guides * first effort for some rpc ledger key guides * fix some broken links * add a guide on ingesting events into a db * first effort at storage type guides * Some more stubs, marking drafts, and a couple additions * make not a draft to fix a broken link * guides category descriptions in README.mdx files * marking incomplete chain migration docs as drafts * change some tutorial difficulty levels * fine-tune the tutorials component styling a bit * improving some guides organization * fix linting errors and broken links * include wrap instructions for native lumens * fix broken link in contract metadata guide * final changes to existing guides * moving developer tools into the main sidebar * create real redirects instead of just notes * fix broken links in a dapps challenge page * fix a redirect syntax error * fix a tutorials redirect * Pre mainnet restructure (stellar#644) * docs: rename "fundamentals and concepts" to "soroban internals" * docs: remove old "under the hood" section * docs: add tags to the various tutorials * docs: move tutorials into one main directory * fix broken links to old pages * docs: renaming soroban internals in category file * docs: remove old "command line reference" category * docs: add tokens directory, rearrange sidebars * docs: rearrange migration from evm guide * docs: remove unused reference/interfaces category * docs: move "reference" section to "resources" * docs: move "releases" page up a level * docs: move FAQ page up one level * docs: move dev tools into resources directory * docs: move testnet.mdx to networks.mdx * docs: rearrange items in resources directory * docs: collapse various SDK pages into two pages * docs: move data-providers up one level * docs: remove some empty categories, move the tutorial template * docs: add a new getting-started page, reorganize that section * docs: change sidebar position integers in soroban-internals * docs: shuffling contract interaction around in soroban-internals * style: fixing a couple small markdown nits in dapps directory * docs: fix a broken link * feat: start to the "guides" page(s) * style(lint): fixing a small linting error * remove guides placeholder * fixing broken links * work on guides listing. might revert this * formatting mdx * docs: fixing a broken link to tutorials * style: crack at making the tutorials filterable and hidden in the sidebar * customizing some components for the `/guides` pages and layouts * rename index page for guides to README * remove commented configuration option * remove some console logging in components * change name of index page in guides sidebar * remove commented sidebar generation code * remove comments and add description to sidebar generator * rename sidebar generator file * more work on how the 'guides' pages might look. * docs: adjusting sidebar positions of new getting started pages * fix some broken links in the getting-started section * prefer "README.mdx" files where possible * some more guides placeholder stubs * docs(guides): More placeholder stubs for guides and categories * feat: don't display "guides in category" page on `/guides` * build: check/fix MDX formatting in more directories than just docs * style: add a larger margin before more category guides * style: more selectively increase that top margin * docs(guides): a quick stab at a "publishing" events guide * docs(guides): first stab at the "publish events" guide * docs: updating tutorial descriptions * fix a few broken links * docs: add note about a tuple with one element * style: couple link changes and reformats * move fuzzing tutorial back * change to README file in contract interactions category * docs(guides): give a better title for the wasm metadata guide * fixing some broken markdown links * fix (another!) broken link * move the guides back into the main layout of the docs directory * add placeholder for testnet reset automation stuff * some initial content for some guides * markdown formatting and fixing broken links * moving "resources" back to "reference" to fit the definition better More like "technical reference" rather than a "reference encyclopedia" * change some styles of the tutorial list * removing most category pages * some more first-drafts of guides * fixing some category links * include a period at the end of each tutorial description * simplify tutorial search box placeholder text * better description for the tutorials page * making the pre-commit script executable * flesh out some of the state archival guides * first effort for some rpc ledger key guides * fix some broken links * add a guide on ingesting events into a db * first effort at storage type guides * Some more stubs, marking drafts, and a couple additions * make not a draft to fix a broken link * guides category descriptions in README.mdx files * marking incomplete chain migration docs as drafts * change some tutorial difficulty levels * fine-tune the tutorials component styling a bit * improving some guides organization * fix linting errors and broken links * include wrap instructions for native lumens * fix broken link in contract metadata guide * final changes to existing guides * moving developer tools into the main sidebar * create real redirects instead of just notes * fix broken links in a dapps challenge page * fix a redirect syntax error * fix a tutorials redirect * docs: make the transaction lifecycle page a draft (stellar#701) * Fix description of enums supported by contract types (stellar#703) * Update resource limits and make a new reference page for them (stellar#736) * add a reference page on resource limits and fees * remove resource fee/limit tables from "explainer" page * removing some unnecessary comments and entries Some of the comments are more applicable in the discussion doc, than they are for developer documentation. So, let's get rid of those. * remove unnecessary "current is..." language from resource fees * [Stellar Merge] Tools Section (stellar#739) * create redirects for tools and SDKs pages * adjust some redirect URLs to better reflect new stellar-docs pages * forgot a semicolon! * linking to migrated developer tools page * fine-tuning some redirects * add a list of "already migrated" stuff to the sidebar * remove SDKs content that's being migrated * fix the resulting broken links * Revert "remove SDKs content that's being migrated" This reverts commit 6dd2a28a8f124e876607a9bf30894a420ea6eb08. * Revert "linking to migrated developer tools page" This reverts commit fc2340818a08c42fc1f13f6a49d97111610c9100. * try this method of turning docs into external links * include soroban-cli page in the tools migration * change cli links to developer docs * use by-name params in pagination example (stellar#743) Refs: stellar#728 * [Stellar Merge] Tools Section (stellar#739) * create redirects for tools and SDKs pages * adjust some redirect URLs to better reflect new stellar-docs pages * forgot a semicolon! * linking to migrated developer tools page * fine-tuning some redirects * add a list of "already migrated" stuff to the sidebar * remove SDKs content that's being migrated * fix the resulting broken links * Revert "remove SDKs content that's being migrated" This reverts commit 6dd2a28a8f124e876607a9bf30894a420ea6eb08. * Revert "linking to migrated developer tools page" This reverts commit fc2340818a08c42fc1f13f6a49d97111610c9100. * try this method of turning docs into external links * include soroban-cli page in the tools migration * change cli links to developer docs * use by-name params in pagination example (stellar#743) Refs: stellar#728 * Update fee page, close stellar#710 (stellar#745) * Update fee page, close stellar#710 * Apply suggestions from code review Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Leigh McCulloch <[email protected]> --------- Co-authored-by: Jane Wang <[email protected]> Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Leigh McCulloch <[email protected]> * Update fee page, close stellar#710 (stellar#745) * Update fee page, close stellar#710 * Apply suggestions from code review Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Leigh McCulloch <[email protected]> --------- Co-authored-by: Jane Wang <[email protected]> Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Leigh McCulloch <[email protected]> * [Stellar Merge] Redirects for Soroban RPC pages (stellar#757) * add a redirect for anything under the `/api` route * change the API navbar item to an external link * disable the `/api` plugin-content-docs * fix some broken links * updating a couple other misc redirects * add external links to RPC providers and usage instructions * add some redirects for RPC information docs * add an admonition to the rpc usage page * move some directories into a "learn" directory * more README.mdx files * update sidebars * add a "Learn" item to the top navbar * fix a boat-load of broken links * add whitespace back to list of operations * add more linebreak spaces * initial nginx redirects * Add Java SDK Example. (stellar#765) * Add Java SDK Example. * Enable Java code highlights. * use a README file in the stellar data structures section * pull in changes for soroban-internals section * use a README file in soroban-internals section * move the soroban env diagram file location * fix broken links in soroban internals pages * run soroban internals pages through linter * use a README file in soroban types category * use README for contract interactions section * move migrate docs into learn directory * use a README document for the migration section * fixup some broken links in the migration section * fix a couple more broken links * quick placeholders for sq and fca00c, we'll want better copy probably * try to capture any anchor URLs used in the glossary * update existing redirects for new learn section * fix muxed accounts redirect * better README files in chain migration categories * rename "soroban-internals" to "smart contract internals" * fix broken links * fix canonical links in smart-contract-internals directory * change title of Smart Contracts Internals category page * couple tweaks * capitalization * fix link * use `.mdx` links to markdown files in fees encyclopedia page --------- Signed-off-by: Satyam Zode <[email protected]> Co-authored-by: Tyler van der Hoeven <[email protected]> Co-authored-by: Graydon Hoare <[email protected]> Co-authored-by: Alejo Mendoza <[email protected]> Co-authored-by: Jesmar Castillo <[email protected]> Co-authored-by: Julian Martinez <[email protected]> Co-authored-by: Bri <[email protected]> Co-authored-by: Siddharth Suresh <[email protected]> Co-authored-by: Leigh McCulloch <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: Iryna Telesheva <[email protected]> Co-authored-by: nmadadair <[email protected]> Co-authored-by: Alfonso Acosta <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: Sapo-Dorado <[email protected]> Co-authored-by: Julian Martinez <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Satyam Zode <[email protected]> Co-authored-by: Elizabeth <[email protected]> Co-authored-by: Chad Ostrowski <[email protected]> Co-authored-by: jcx120 <[email protected]> Co-authored-by: Jane Wang <[email protected]> Co-authored-by: Jane Wang <[email protected]> Co-authored-by: Jun Luo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't alloc the time to finish reviewing but here's a partial first pass
docs/smart-contracts/guides/conventions/comprehensive-authentication.mdx
Outdated
Show resolved
Hide resolved
docs/smart-contracts/guides/conventions/comprehensive-authentication.mdx
Outdated
Show resolved
Hide resolved
docs/smart-contracts/guides/conventions/comprehensive-authentication.mdx
Show resolved
Hide resolved
docs/smart-contracts/guides/conventions/comprehensive-authentication.mdx
Outdated
Show resolved
Hide resolved
docs/smart-contracts/guides/conventions/comprehensive-authentication.mdx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an incredibly solid guide, I learned a lot tbh 👏 just a coupla small comments below and I think this can be merged!
|
||
**Implications of Omitting `require_auth`:** | ||
|
||
If you omit the `require_auth` call in your contract functions, the function can be executed without any authorization from the specified address. This means that anyone could potentially invoke these functions, leading to unauthorized actions. For example, without `require_auth`, an unauthorized user could increment a value or transfer tokens without the owner's consent. Therefore, it is important to include `require_auth` wherever authorization is needed to prevent unauthorized access and maintain the security of your smart contract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you omit the `require_auth` call in your contract functions, the function can be executed without any authorization from the specified address. This means that anyone could potentially invoke these functions, leading to unauthorized actions. For example, without `require_auth`, an unauthorized user could increment a value or transfer tokens without the owner's consent. Therefore, it is important to include `require_auth` wherever authorization is needed to prevent unauthorized access and maintain the security of your smart contract. | |
If you omit the `require_auth` call in your contract functions, the function can be executed without any authorization from the specified address. This means that anyone could potentially invoke these functions, leading to unauthorized actions. For example, without `require_auth`, an unauthorized user could increment a value or transfer tokens without the owner's consent. Therefore, it is important to include `require_auth` wherever authorization is needed to prevent unauthorized access and maintain the security of your smart contract. |
For example, without
require_auth
, an unauthorized user could increment a value or transfer tokens without the owner's consent.
This isn't true for the SAC because it does require_auth
internally, so maybe clarify that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second this. It's important to understand the footprint side of auth and sub invocations. I would actually like to see a whole section probably prior to the contract side of this doc on how the footprint plays into this. Both for root invocations as well as sub invocations like in the case of SACs or other cross contract calls which implement auth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second this. It's important to understand the footprint side of auth and sub invocations. I would actually like to see a whole section probably prior to the contract side of this doc on how the footprint plays into this. Both for root invocations as well as sub invocations like in the case of SACs or other cross contract calls which implement auth.
I thought I had covered the footprint in the part called authorization vector but ill revisit it. Thanks.
|
||
#### `authorize_as_current_contract` | ||
|
||
Used for authorizing actions in a contract that will be called later in the execution stack. This is particularly useful for complex interactions involving multiple contracts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need a little more clarity for myself honestly since I've never seen/used this variant 😅 do you mean to say that you are authorizing a call in advance that a subcontract will make that would otherwise be unauthorized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need a little more clarity for myself honestly since I've never seen/used this variant 😅 do you mean to say that you are authorizing a call in advance that a subcontract will make that would otherwise be unauthorized?
Say I contract c needs contract a auth to complete some function, but contract b will be called by contract a and contract b will call c on a behalf. In this case you'd want to authorize as current contract a during the call to b for its sub invocation to c. I struggled to find a irl example to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, that (sorta) makes sense! Maybe a Mermaid diagram would be helpful here? This is incomplete, but something like:
flowchart
C -- needs auth from --> A
B -- calls --> A -- calls --> C
?
|
||
### Step 1: Define the Custom Account Contract | ||
|
||
Start by defining the custom account contract with necessary functions and data structures. This contract will handle initialization with a list of signers, depositing tokens, and withdrawing tokens. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just an example, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If yes lets put it into its own ##
section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's step one of maybe 5 or 6 that I did ###
on. I'll make sure they're in correct order and correct headings. Will be fixing everything today.
If yes lets put it into its own
##
section
|
||
### Step 3: Implement Custom Authentication Logic | ||
|
||
**A Caveat** - Let's be clear, custom auth is highly complicated and VERY easy to mess up. It requires security audits before use in production, and should only be used if you can't accomplish your goals in another way. The goal of this guide is to give you some experience with each feature of sorobans authentication framework, and that is why we cover it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: let's be even bolder here
**A Caveat** - Let's be clear, custom auth is highly complicated and VERY easy to mess up. It requires security audits before use in production, and should only be used if you can't accomplish your goals in another way. The goal of this guide is to give you some experience with each feature of sorobans authentication framework, and that is why we cover it here. | |
**Warning**: Let's be clear, custom auth is highly complicated and VERY easy to mess up. It requires security audits before use in production, and should only be used if you can't accomplish your goals in another way. The goal of this guide is to give you some experience with each feature of sorobans authentication framework, and that is why we cover it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have callout boxes for this as well. I'd use one of those for this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have callout boxes for this as well. I'd use one of those for this section.
Can you show me an example of what you mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think he's referring to the <Alert>
box described in the README here. I thought we could style them in red as warnings, too, but I can't seem to find an example of that right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, found one! There's a caution one on the Smart Wallets page and it's styled like this:
:::caution
Your content goes here
:::
.No need for <Alert>
at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall a great tutorial! A few small nits and one major one. I really think we should talk about the footprint side of this so folks understand what and how to actually sign data. The require auth bits in the contract are actually just "hints" or constructer clues for simulation to build the right signature payload for the consensus verifier logic. We should talk about that and provide a least a basic example showcasing how auth moves from a contract to a footprint to a signature to the final tx submission. (https://kalepail.com/blockchain/understanding-soroban-auth)
#### `require_auth` | ||
|
||
Certainly! Here's a revised version of the `require_auth` section with a discussion on the implications of omitting this call: | ||
|
||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this? Seems like some cruft from a previous edit or comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lollll this sounds like GPT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lollll this sounds like GPT
Lol it seems it was. Will fix.
|
||
--- | ||
|
||
#### `require_auth` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should include somewhere in here that by default require_auth
is signing against the args of the invocation. This is important for why you'd want to use require_auth
vs require_auth_for_args
as an insufficiently verbose require_auth
call could produce a scenario with unintended consequences where a valid signature could match for two different calls. The payload of an auth request is important and require_auth
just assumes the values of the invocation.
|
||
**Implications of Omitting `require_auth`:** | ||
|
||
If you omit the `require_auth` call in your contract functions, the function can be executed without any authorization from the specified address. This means that anyone could potentially invoke these functions, leading to unauthorized actions. For example, without `require_auth`, an unauthorized user could increment a value or transfer tokens without the owner's consent. Therefore, it is important to include `require_auth` wherever authorization is needed to prevent unauthorized access and maintain the security of your smart contract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second this. It's important to understand the footprint side of auth and sub invocations. I would actually like to see a whole section probably prior to the contract side of this doc on how the footprint plays into this. Both for root invocations as well as sub invocations like in the case of SACs or other cross contract calls which implement auth.
|
||
In summary, while `require_auth` is not mandatory for all contract calls, its usage is necessary for any operation that requires explicit authorization to safeguard against unauthorized actions, for example transferring a balance of some asset, or changing some other data related to the user. | ||
|
||
#### `require_auth_for_args` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given my comments from above you should call out some for instances for why you might choose require_auth
vs require_auth_for_args
|
||
### Step 3: Implement Custom Authentication Logic | ||
|
||
**A Caveat** - Let's be clear, custom auth is highly complicated and VERY easy to mess up. It requires security audits before use in production, and should only be used if you can't accomplish your goals in another way. The goal of this guide is to give you some experience with each feature of sorobans authentication framework, and that is why we cover it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have callout boxes for this as well. I'd use one of those for this section.
|
||
This guide walks you through the implementation of a custom account contract on Soroban with custom multi-signature support and dynamic withdrawal limits based on the number of valid signatures. By following these steps, you should be able to create flexible account contract that meets your needs. Please be aware that this contract is not audited nor designed to be used in a production environment, and you should always have a professional audit your contracts for security considerations before encouraging users to interact with them on the public network with real funds. | ||
|
||
### Further Reading |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also add the custom account tutorial https://github.com/stellar/soroban-examples/tree/main/account
Bumping this to keep it from going stale while i finish |
A guide on making a multi-sig custom account contract, that allows for a dynamic authorization policy
Completed for bounty #624