Skip to content

Commit

Permalink
Updated content
Browse files Browse the repository at this point in the history
  • Loading branch information
emg110 committed Nov 15, 2024
1 parent 1f10d99 commit 27eb2ca
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions ARCs/arc-0079.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ extends: 26
## Abstract
NoOp calls are Generic application calls to execute the Algorand smart contract ApprovalPrograms.

This URI specification represents an extension to the base Algorand URI encoding standard ([ARC-26](./arc-0026.md)) that specifies encoding of application NoOp transactions into <a href="https://www.rfc-editor.org/rfc/rfc3986">RFC 3986</a> standard URIs.
This URI specification proposes an extension to the base Algorand URI encoding standard ([ARC-26](./arc-0026.md)) that specifies encoding of application NoOp transactions into <a href="https://www.rfc-editor.org/rfc/rfc3986">RFC 3986</a> standard URIs.

## Specification

### General format

As in [ARC-26](./arc-0026.md), URIs follow the general format for URIs as set forth in <a href="https://www.rfc-editor.org/rfc/rfc3986">RFC 3986</a>. The path component consists of an Algorand address, and the query component provides additional transaction parameters.

Elements of the query component may contain characters outside the valid range. These are encoded differently depending on their expected character set. The text components (note, xnote) must first be encoded according to UTF-8, and then each octet of the corresponding UTF-8 sequence must be percent-encoded as described in RFC 3986. The binary components (args, refs, etc.) must be encoded with base64url as specified in <a href="https://www.rfc-editor.org/rfc/rfc4648.html#section-5">RFC 4648 section 5</a>.
Elements of the query component may contain characters outside the valid range. These are encoded differently depending on their expected character set. The text components (note, xnote) must first be encoded according to UTF-8, and then each octet of the corresponding UTF-8 sequence **MUST** be percent-encoded as described in RFC 3986. The binary components (args, refs, etc.) **MUST** be encoded with base64url as specified in <a href="https://www.rfc-editor.org/rfc/rfc4648.html#section-5">RFC 4648 section 5</a>.

### ABNF Grammar

Expand All @@ -47,15 +47,15 @@ otherparam = qchar *qchar [ "=" *qchar ]
- "qchar" corresponds to valid characters of an RFC 3986 URI query component, excluding the "=" and "&" characters, which this specification takes as separators.
- "qbase64url" corresponds to valid characters of "base64url" encoding, as defined in <a href="https://www.rfc-editor.org/rfc/rfc4648.html#section-5">RFC 4648 section 5</a>
- All params from the base [ARC-26](./arc-0026.md) standard, are supported and usable if fit the NoOp application call context (e.g. note)
- As in the base [ARC-26](./arc-0026.md) standard, the scheme component ("algorand:") is case-insensitive, and implementations must accept any combination of uppercase and lowercase letters. The rest of the URI is case-sensitive, including the query parameter keys.
- As in the base [ARC-26](./arc-0026.md) standard, the scheme component ("algorand:") is case-insensitive, and implementations **MUST** accept any combination of uppercase and lowercase letters. The rest of the URI is case-sensitive, including the query parameter keys.

### Query Keys

- address: Algorand address of transaction sender

- type: fixed to "appl". Used to disambiguate the transaction type from the base [ARC-26](./arc-0026.md) standard and other possible extensions

- app: The first reference is sed to specify the called application (Algorand Smart Contract) ID and is mandatory. extra references are optional and will be used in the Application NoOp call's foreign applications array.
- app: The first reference is set to specify the called application (Algorand Smart Contract) ID and is mandatory. Additional references are optional and will be used in the Application NoOp call's foreign applications array.

- method: Specify the full method expression (e.g "example_method(uint64,uint64)void").

Expand All @@ -71,10 +71,19 @@ otherparam = qchar *qchar [ "=" *qchar ]

- (others): optional, for future extensions

Note 1: If the fee is omitted , it means that Minimum Fee is preferred to be used for transaction.

Note 2: Recurring apps, assets and accounts, add those into transaction arrays (foreign apps, foreign assets, foreign accounts and boxes).

### Template URI vs actionable URI

If the URI is constructed so that other dApps, wallets or protocols could use it with their runtime accounts of interest, then the account address in URI must be ZeroAddress ("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"). Since ZeroAddress cannot initiate any action this approach is considered non-vulnerable and secure.
If the URI is constructed so that other dApps, wallets or protocols could use it with their runtime Algorand entities of interest, then :

- The placeholder account/app address in URI **MUST** be ZeroAddress ("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"). Since ZeroAddress cannot initiate any action this approach is considered non-vulnerable and secure.
- The placeholder app ID **MUST** 0. e.g. `&app=11111111&app=0`
- The placeholder asset ID **MUST** be 0. e.g. `&asset=11111111&asset=0`
- The placeholder box reference **MUST** be 0. e.g. `&box=nodes&box=0`

### Example

Call claim(uint64,uint64)byte[] method on contract 11111111 paying a fee of 10000 micro ALGO from an specific address
Expand All @@ -89,8 +98,6 @@ Call the same claim(uint64,uint64)byte[] method on contract 11111111 paying a de
algorand://TMTAD6N22HCS2LKH7677L2KFLT3PAQWY6M4JFQFXQS32ECBFC23F57RYX4?type=appl&app=11111111&method=claim(uint64,uint64)byte[]&arg=20000&arg=474567&asset=45&app=22222222&app=33333333
```

Note: If the fee is omitted , it means that Minimum Fee is preferred to be used for transaction.
Note 2: Recurring apps, assets and accounts, add those into transaction arrays (foreign apps, foreign assets, foreign accounts and boxes).


## Rationale
Expand Down

0 comments on commit 27eb2ca

Please sign in to comment.