From 8332efd2dd310a2dc5f721bd52f484c239455502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Wed, 2 Oct 2024 11:49:04 +0200 Subject: [PATCH] updating devportal scripts to add full path --- ARCs/arc-0012.md | 20 ++++++++++---------- _devportal/scripts/update-arcs.sh | 23 +++++++++++------------ 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/ARCs/arc-0012.md b/ARCs/arc-0012.md index 370deda26..bbd60442b 100644 --- a/ARCs/arc-0012.md +++ b/ARCs/arc-0012.md @@ -11,13 +11,13 @@ created: 2022-09-05 withdrawal-reason: Not used, will be replaced by ARC-59 --- -# Claimable Algorand Standard Assets (ASAs) from vault application +# Claimable Algorand Standard Assets (ASAs) from vault application ## Abstract -The goal of this standard is to establish a standard in the Algorand ecosytem by which ASAs can be sent to an intended receiver even if their account is not opted in to the ASA. +The goal of this standard is to establish a standard in the Algorand ecosytem by which ASAs can be sent to an intended receiver even if their account is not opted in to the ASA. -A on-chain application, called a vault, will be used to custody assets on behalf of a given user, with only that user being able to withdraw assets. A master application will use box storage to keep track of the vault for any given Algorand account. +A on-chain application, called a vault, will be used to custody assets on behalf of a given user, with only that user being able to withdraw assets. A master application will use box storage to keep track of the vault for any given Algorand account. If integrated into ecosystem technologies including wallets, epxlorers, and dApps, this standard can provide enhanced capabilities around ASAs which are otherwise strictly bound at the protocol level to require opting in to be received. This also enables the ability to "burn" ASAs by sending them to the vault associated with the global Zero Address. @@ -28,7 +28,7 @@ Algorand requires accounts to opt in to receive any ASA, a fact which simultaneo 1. Grants account holders fine-grained control over their holdings by allowing them to select which assets to allow and preventing receipt of unwanted tokens. 2. Frustrates users and developers when accounting for this requirement especially since other blockchains do not have this requirement. -This ARC lays out a new way to navigate the ASA opt in requirement. +This ARC lays out a new way to navigate the ASA opt in requirement. ### Contemplated Use Cases @@ -36,7 +36,7 @@ The following use cases help explain how this capability can enhance the possibi #### Airdrops -An ASA creator who wants to send their asset to a set of accounts faces the challenge of needing their intended receivers to opt in to the ASA ahead of time, which requires non-trivial communication efforts and precludes the possibility of completing the airdrop as a surprise. This claimable ASA standard creates the ability to send an airdrop out to individual addresses so that the receivers can opt in and claim the asset at their convenience--or not, if they so choose. +An ASA creator who wants to send their asset to a set of accounts faces the challenge of needing their intended receivers to opt in to the ASA ahead of time, which requires non-trivial communication efforts and precludes the possibility of completing the airdrop as a surprise. This claimable ASA standard creates the ability to send an airdrop out to individual addresses so that the receivers can opt in and claim the asset at their convenience--or not, if they so choose. #### Reducing New User On-boarding Friction @@ -55,9 +55,9 @@ The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL ### Definitions -- **Claimable ASA**: An Algorand Standard Asset (ASA) which has been transferred to a vault following the standard set forth in this proposal such that only the intended receiver account can claim it at their convenience. +- **Claimable ASA**: An Algorand Standard Asset (ASA) which has been transferred to a vault following the standard set forth in this proposal such that only the intended receiver account can claim it at their convenience. - **Vaultt**: An Algorand application used to hold claimable ASAs for a given account. -- **Master**: An Algorand application used to keep track of all of the vaults created for Algorand accounts. +- **Master**: An Algorand application used to keep track of all of the vaults created for Algorand accounts. - **dApp**: A decentralized application frontend, interpreted here to mean an off-chain frontend (a webapp, native app, etc.) that interacts with applications on the blockchain. - **Explorer**: An off-chain application that allows browsing the blockchain, showing details of transactions. - **Wallet**: An off-chain application that stores secret keys for on-chain accounts and can display and sign transactions for these accounts. @@ -90,7 +90,7 @@ There are two smart contracts being utilized: The [vault](../assets/arc-0012/vau ###### Claim * Transfers ASA from vault to “receiver” -* Deletes box: ASA -> “funder” +* Deletes box: ASA -> “funder” * Returns ASA and box MBR to “funder” ###### Reject @@ -135,7 +135,7 @@ There are two smart contracts being utilized: The [vault](../assets/arc-0012/vau ## Rationale -This design was created to offer a standard mechanism by which wallets, explorers, and dapps could enable users to send, receive, and find claimable ASAs without requiring any changes to the core protocol. +This design was created to offer a standard mechanism by which wallets, explorers, and dapps could enable users to send, receive, and find claimable ASAs without requiring any changes to the core protocol. ## Backwards Compatibility @@ -151,7 +151,7 @@ This ARC makes no changes to the consensus protocol and creates no backwards com ## Security Considerations -Both applications (The vault and the master have been audited by TBD +Both applications (The vault and the master have not been audited) ## Copyright diff --git a/_devportal/scripts/update-arcs.sh b/_devportal/scripts/update-arcs.sh index 02aef5521..edfe9e674 100755 --- a/_devportal/scripts/update-arcs.sh +++ b/_devportal/scripts/update-arcs.sh @@ -1,13 +1,6 @@ #!/bin/bash - -# Detect the OS and set the appropriate sed inline flag -if [[ "$OSTYPE" == "darwin"* ]]; then - # macOS - SED_INLINE="''" -else # Linux SED_INLINE="" -fi # Define source and destination directories SRC_DIR="ARCs" @@ -51,22 +44,22 @@ cd "$DEST_DIR" || { echo "Directory not found: $DEST_DIR"; exit 1; } for file in arc-*.md; do if [[ -f "$file" ]]; then - # # 1. Remove the first header (and any preceding blank lines) + # 1. Remove the first header (and any preceding blank lines) sed -i $SED_INLINE '/^---$/,/^---$/!{/^# /d;}' "$file" if [[ $? -ne 0 ]]; then echo "Failed to remove header in $file" continue fi - # 2. Replace links like [ARC-1](./arc-0001.md) with [ARC-1](../arc-0001) - sed -i $SED_INLINE -E 's|\(\./arc-([0-9]+)\.md\)|(\.\./arc-\1)|g' "$file" + # 2. Replace links like [ARC-1](./arc-0001.md) with [ARC-1](/standards/arcs/arc-0001) + sed -i $SED_INLINE -E 's|\(\./arc-([0-9]+)\.md\)|(/standards/arcs/arc-000\1)|g' "$file" if [[ $? -ne 0 ]]; then echo "Failed to update links in $file" continue fi - # 3. Handle anchors like [ARC-1](./arc-0001.md#interface-signtxnsopts) -> [ARC-1](../arc-0001#interface-signtxnsopts) - sed -i $SED_INLINE -E 's|\(\./arc-([0-9]+)\.md(\#[a-zA-Z0-9-]+)?\)|(\.\./arc-\1\2)|g' "$file" + # 3. Handle anchors like [ARC-1](./arc-0001.md#interface-signtxnsopts) -> [ARC-1](/standards/arcs/arc-0001#interface-signtxnsopts) + sed -i $SED_INLINE -E 's|\(\./arc-([0-9]+)\.md(\#[a-zA-Z0-9-]+)?\)|(/standards/arcs/arc-000\1\2)|g' "$file" if [[ $? -ne 0 ]]; then echo "Failed to update anchored links in $file" continue @@ -117,6 +110,12 @@ sidebar:\\ continue fi + #6. Replace '../assets' with 'https://raw.githubusercontent.com/algorandfoundation/ARCs/main/assets' + sed -i $SED_INLINE "s|\(\.\./assets\)|https://raw.githubusercontent.com/algorandfoundation/ARCs/main/assets|g" "$file" + if [[ $? -ne 0 ]]; then + echo "Failed to replace '../assets' in $file" + continue + fi else echo "No markdown files found matching pattern 'arc-*.md'" fi