Skip to content

Commit

Permalink
updating devportal scripts to add full path
Browse files Browse the repository at this point in the history
  • Loading branch information
SudoWeezy committed Oct 2, 2024
1 parent 59858a0 commit 8332efd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
20 changes: 10 additions & 10 deletions ARCs/arc-0012.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -28,15 +28,15 @@ 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

The following use cases help explain how this capability can enhance the possibilities within the Algorand ecosystem.

#### 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

Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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 <a href="">TBD</a>
Both applications (The vault and the master have not been audited)

## Copyright

Expand Down
23 changes: 11 additions & 12 deletions _devportal/scripts/update-arcs.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8332efd

Please sign in to comment.