Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ABI Calls support to ARC-0026 #310

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 33 additions & 4 deletions ARCs/arc-0026.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,31 @@
algorandurn = "algorand://" algorandaddress [ "?" algorandparams ]
algorandaddress = *base32
algorandparams = algorandparam [ "&" algorandparams ]
algorandparam = [ amountparam / labelparam / noteparam / assetparam / otherparam ]
algorandparam = [ amountparam / labelparam / noteparam / assetparam / appparam / methodparam / argparam/ boxparam / assetarrayparam / accountarrayparam / apparrayparam / otherparam ]
emg110 marked this conversation as resolved.
Show resolved Hide resolved
amountparam = "amount=" *digit
labelparam = "label=" *qchar
assetparam = "asset=" *digit
appparam = "app=" *digit
noteparam = (xnote | note)
xnote = "xnote=" *qchar
note = "note=" *qchar
note = "note=" *qchar
methodparam = "method=" *qchar
boxparam = "box=" *qchar
argparam = "arg=" (*qchar | *digit)
accountarrayparam = "account=" *qchar
assetarrayparam = "asset=" *digit
apparrayparam = "app=" *digit
otherparam = qchar *qchar [ "=" *qchar ]
```

Here, "qchar" corresponds to valid characters of an RFC 3986 URI query component, excluding the "=" and "&" characters, which this specification takes as separators.

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.

Note 1: the first `app=` in the presence of the method interprets as the destination app Id and the next ones in sequence would be considered app array members.

Note 2: the `asset=` in the presence of the method interprets as an asset array member.

!!! Caveat
When it comes to generation of an address' QR, many exchanges and wallets encodes the address w/o the scheme component (“algorand:”). This is not a URI so it is OK.

Expand All @@ -56,7 +67,17 @@

- amount: microAlgos or smallest unit of asset

- asset: The asset id this request refers to (if Algos, simply omit this parameter)
- asset: The asset id this request refers to (if Algos, simply omit this parameter). When the method is available, the asset is an Asset Array member for the ABI call.

- method: The full ABI method to call. E.g. claim(uint64,uint64)byte[]

- arg: The argument to be added to ABI call arguments array.

- box: The box name refference.

- app: The app id this request refers to. When method is available, first app is the destination app for ABI call and from second index app is an App Array member for ABI call.

- account: The account address to add to accounts array after sender. Only when method is available.

- (others): optional, for future extensions

Expand Down Expand Up @@ -99,12 +120,20 @@
algorand://TMTAD6N22HCS2LKH7677L2KFLT3PAQWY6M4JFQFXQS32ECBFC23F57RYX4?amount=150&asset=45
```

call claim(uint64,uint64)byte[] method on contract 11111111
emg110 marked this conversation as resolved.
Show resolved Hide resolved

```
algorand://TMTAD6N22HCS2LKH7677L2KFLT3PAQWY6M4JFQFXQS32ECBFC23F57RYX4?app=11111111&method=claim(uint64,uint64)byte[]&arg=20000&arg=474567&asset=45
```

## Rationale

The addition of ARC4 support to ARC26 is a mandatory step for effective interactivity of Algorand operations with users and increases interoperability amongst users as well

Check failure on line 131 in ARCs/arc-0026.md

View workflow job for this annotation

GitHub Actions / ARC Walidator

proposals must be referenced with the form `ARC-N` (not `ARCN` or `ARC N`)

error[markdown-re-arc-dash]: proposals must be referenced with the form `ARC-N` (not `ARCN` or `ARC N`) --> ARCs/arc-0026.md | 131 | The addition of ARC4 support to ARC26 is a mandatory step for effective interactivity of Algorand operations with users and increases interoperability amongst users as well | = info: the pattern in question: `(?i)ARC[\s]*[0-9]+`

emg110 marked this conversation as resolved.
Show resolved Hide resolved
## Security Considerations

None.

## Copyright

Copyright and related rights waived via <a href="https://creativecommons.org/publicdomain/zero/1.0/">CCO</a>.
Copyright and related rights waived via <a href="https://creativecommons.org/publicdomain/zero/1.0/">CCO</a>.
Loading