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

move lg-arc4.md content to docstrings #364

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion docs/language-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ lg-logs
lg-transactions
lg-ops
lg-opcode-budget
lg-arc4
lg-arc28
lg-calling-apps
lg-compile
Expand Down
4 changes: 2 additions & 2 deletions docs/lg-arc28.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[ARC-28](https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0028.md) provides a methodology for structured logging by Algorand smart contracts. It introduces the concept of Events, where data contained in logs may be categorized and structured.

Each Event is identified by a unique 4-byte identifier derived from its `Event Signature`. The Event Signature is a UTF-8 string comprised of the event's name, followed by the names of the [ARC-4](./lg-arc4.md) data types contained in the event, all enclosed in parentheses (`EventName(type1,type2,...)`) e.g.:
Each Event is identified by a unique 4-byte identifier derived from its `Event Signature`. The Event Signature is a UTF-8 string comprised of the event's name, followed by the names of the ARC-4 data types contained in the event, all enclosed in parentheses (`EventName(type1,type2,...)`) e.g.:

```
Swapped(uint64,uint64)
Expand All @@ -14,7 +14,7 @@ Events are emitting by including them in the [log output](./lg-logs.md). The met

To emit an ARC-28 event in Algorand Python you can use the `emit` function, which appears in the `algopy.arc4` namespace for convenience since it heavily uses ARC-4 types and is essentially an extension of the ARC-4 specification. This function takes care of encoding the event payload to conform to the ARC-28 specification and there are 3 overloads:

- An [ARC-4 struct](./lg-arc4.md), from what the name of the struct will be used as a the event name and the struct parameters will be used as the event fields - `arc4.emit(Swapped(a, b))`
- An ARC-4 struct, from what the name of the struct will be used as a the event name and the struct parameters will be used as the event fields - `arc4.emit(Swapped(a, b))`
- An event signature as a [string literal (or module variable)](./lg-types.md), followed by the values - `arc4.emit("Swapped(uint64,uint64)", a, b)`
- An event name as a [string literal (or module variable)](./lg-types.md), followed by the values - `arc4.emit("Swapped", a, b)`

Expand Down
225 changes: 0 additions & 225 deletions docs/lg-arc4.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/lg-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Note: we don't currently have support for while-else statements.

## For Loops

For loops are used to iterate over sequences, ranges and [ARC-4 arrays](./lg-arc4.md). They work the same as Python.
For loops are used to iterate over sequences, ranges and ARC-4 arrays. They work the same as Python.

Algorand Python provides functions like `uenumerate` and `urange` to facilitate creating sequences and ranges; in-built Python `reversed` method works with these.

Expand Down
2 changes: 1 addition & 1 deletion docs/lg-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ Things to note here:
methods must be decorated with one of `algopy.arc4.abimethod`, `alogpy.arc4.baremethod`, or
`algopy.subroutine`. `subroutines` won't be directly callable through the default router.

See the [ARC-4 section](lg-arc4.md) of this language guide for more info on the above.
See the ARC-4 section of this language guide for more info on the above.

## Logic signatures

Expand Down
3 changes: 1 addition & 2 deletions docs/lg-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ bytes of the public key (without the checksum). It has various account related m

Also see [`algopy.arc4.Address`](#algopy.arc4.Address) if needing to represent the address as a distinct type.


### Asset

[`Asset`](#algopy.Asset) represents a logical Asset, backed by a `uint64` ID.
Expand Down Expand Up @@ -315,5 +314,5 @@ the `native` property to retrieve the value. Most of the ARC-4 types also allow
you can edit values in arrays by index.

Please see the [reference documentation](./api-algopy.arc4.md) for the different classes that can
be used to represent ARC-4 values or the [ARC-4 documentation](./lg-arc4.md) for more information
be used to represent ARC-4 values or the ARC-4 documentation for more information
about ARC-4.
Loading
Loading