algopy_testing.op.pure
Module Contents
Section titled “Module Contents”Classes
Section titled “Classes”Base64 | Create a collection of name/value pairs. |
|---|---|
JsonRef |
Functions
Section titled “Functions”addw(→ tuple[algopy_testing.UInt64, …) | |
|---|---|
bitlen(→ algopy_testing.UInt64) | |
bsqrt(→ algopy_testing.BigUInt) | |
btoi(→ algopy_testing.UInt64) | |
bzero(→ algopy_testing.Bytes) | |
divmodw(→ tuple[algopy_testing.UInt64, …) | |
divw(→ algopy_testing.UInt64) | |
exp(→ algopy_testing.UInt64) | |
expw(→ tuple[algopy_testing.UInt64, …) | |
extract(→ algopy_testing.Bytes) | |
extract_uint16(→ algopy_testing.UInt64) | |
extract_uint32(→ algopy_testing.UInt64) | |
extract_uint64(→ algopy_testing.UInt64) | |
getbit(→ bool) | |
getbyte(→ algopy_testing.UInt64) | |
itob(→ algopy_testing.Bytes) | |
mulw(→ tuple[algopy_testing.UInt64, …) | |
replace(→ algopy_testing.Bytes) | |
select_bytes(→ algopy_testing.Bytes) | |
select_uint64(→ algopy_testing.UInt64) | |
setbit_bytes(→ algopy_testing.Bytes) | |
setbit_uint64(→ algopy_testing.UInt64) | |
setbyte(→ algopy_testing.Bytes) | |
shl(→ algopy_testing.UInt64) | |
shr(→ algopy_testing.UInt64) | |
sqrt(→ algopy_testing.UInt64) | |
substring(→ algopy_testing.Bytes) | |
concat(→ algopy_testing.Bytes) | |
base64_decode(→ algopy_testing.Bytes) |
addw(a: UInt64 | int, b: UInt64 | int) → tuple[algopy_testing.UInt64, UInt64]
Section titled “addw(a: UInt64 | int, b: UInt64 | int) → tuple[algopy_testing.UInt64, UInt64]”bitlen(a: Bytes | UInt64 | bytes | int) → UInt64
Section titled “bitlen(a: Bytes | UInt64 | bytes | int) → UInt64”bsqrt(a: BigUInt | int) → BigUInt
Section titled “bsqrt(a: BigUInt | int) → BigUInt”btoi(a: Bytes | bytes) → UInt64
Section titled “btoi(a: Bytes | bytes) → UInt64”bzero(a: UInt64 | int) → Bytes
Section titled “bzero(a: UInt64 | int) → Bytes”divmodw(a: UInt64 | int, b: UInt64 | int, c: UInt64 | int, d: UInt64 | int) → tuple[algopy_testing.UInt64, UInt64, UInt64, UInt64]
Section titled “divmodw(a: UInt64 | int, b: UInt64 | int, c: UInt64 | int, d: UInt64 | int) → tuple[algopy_testing.UInt64, UInt64, UInt64, UInt64]”divw(a: UInt64 | int, b: UInt64 | int, c: UInt64 | int) → UInt64
Section titled “divw(a: UInt64 | int, b: UInt64 | int, c: UInt64 | int) → UInt64”exp(a: UInt64 | int, b: UInt64 | int) → UInt64
Section titled “exp(a: UInt64 | int, b: UInt64 | int) → UInt64”expw(a: UInt64 | int, b: UInt64 | int) → tuple[algopy_testing.UInt64, UInt64]
Section titled “expw(a: UInt64 | int, b: UInt64 | int) → tuple[algopy_testing.UInt64, UInt64]”extract(a: Bytes | bytes, b: UInt64 | int, c: UInt64 | int) → Bytes
Section titled “extract(a: Bytes | bytes, b: UInt64 | int, c: UInt64 | int) → Bytes”extract_uint16(a: Bytes | bytes, b: UInt64 | int) → UInt64
Section titled “extract_uint16(a: Bytes | bytes, b: UInt64 | int) → UInt64”extract_uint32(a: Bytes | bytes, b: UInt64 | int) → UInt64
Section titled “extract_uint32(a: Bytes | bytes, b: UInt64 | int) → UInt64”extract_uint64(a: Bytes | bytes, b: UInt64 | int) → UInt64
Section titled “extract_uint64(a: Bytes | bytes, b: UInt64 | int) → UInt64”getbit(a: Bytes | UInt64 | bytes | int, b: UInt64 | int) → bool
Section titled “getbit(a: Bytes | UInt64 | bytes | int, b: UInt64 | int) → bool”getbyte(a: Bytes | bytes, b: UInt64 | int) → UInt64
Section titled “getbyte(a: Bytes | bytes, b: UInt64 | int) → UInt64”itob(a: UInt64 | int) → Bytes
Section titled “itob(a: UInt64 | int) → Bytes”mulw(a: UInt64 | int, b: UInt64 | int) → tuple[algopy_testing.UInt64, UInt64]
Section titled “mulw(a: UInt64 | int, b: UInt64 | int) → tuple[algopy_testing.UInt64, UInt64]”replace(a: Bytes | bytes, b: UInt64 | int, c: Bytes | bytes) → Bytes
Section titled “replace(a: Bytes | bytes, b: UInt64 | int, c: Bytes | bytes) → Bytes”select_bytes(a: Bytes | bytes, b: Bytes | bytes, c: bool | UInt64 | int) → Bytes
Section titled “select_bytes(a: Bytes | bytes, b: Bytes | bytes, c: bool | UInt64 | int) → Bytes”select_uint64(a: UInt64 | int, b: UInt64 | int, c: bool | UInt64 | int) → UInt64
Section titled “select_uint64(a: UInt64 | int, b: UInt64 | int, c: bool | UInt64 | int) → UInt64”setbit_bytes(a: Bytes | bytes, b: UInt64 | int, c: bool) → Bytes
Section titled “setbit_bytes(a: Bytes | bytes, b: UInt64 | int, c: bool) → Bytes”setbit_uint64(a: UInt64 | int, b: UInt64 | int, c: bool) → UInt64
Section titled “setbit_uint64(a: UInt64 | int, b: UInt64 | int, c: bool) → UInt64”setbyte(a: Bytes | bytes, b: UInt64 | int, c: UInt64 | int) → Bytes
Section titled “setbyte(a: Bytes | bytes, b: UInt64 | int, c: UInt64 | int) → Bytes”shl(a: UInt64 | int, b: UInt64 | int) → UInt64
Section titled “shl(a: UInt64 | int, b: UInt64 | int) → UInt64”shr(a: UInt64 | int, b: UInt64 | int) → UInt64
Section titled “shr(a: UInt64 | int, b: UInt64 | int) → UInt64”sqrt(a: UInt64 | int) → UInt64
Section titled “sqrt(a: UInt64 | int) → UInt64”substring(a: Bytes | bytes, b: UInt64 | int, c: UInt64 | int) → Bytes
Section titled “substring(a: Bytes | bytes, b: UInt64 | int, c: UInt64 | int) → Bytes”concat(a: Bytes | bytes, b: Bytes | bytes) → Bytes
Section titled “concat(a: Bytes | bytes, b: Bytes | bytes) → Bytes”class Base64
Section titled “class Base64”Bases: enum.Enum
Create a collection of name/value pairs.
Example enumeration:
class Color(Enum): RED = 1 BLUE = 2 GREEN = 3Access them by:
- attribute access:
Color.RED<Color.RED: 1>
- value lookup:
Color(1)<Color.RED: 1>
- name lookup:
Color['RED']<Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
len(Color)3list(Color)[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.