Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8590499
Three new globals for to help contract-to-contract usability
jannotti Nov 21, 2021
24055a3
detritis
jannotti Nov 21, 2021
92a26b6
Check error
jannotti Nov 22, 2021
d268300
doc comments
jannotti Nov 22, 2021
e5a1e53
Merge remote-tracking branch 'upstream/feature/contract-to-contract' …
jannotti Nov 23, 2021
db80261
Impose limits on the entire "tree" of inner calls.
jannotti Dec 7, 2021
34d35fd
Move appID tracking into EvalContext, out of LedgerForLogic
jannotti Dec 9, 2021
6260b9d
Stupid linter
jannotti Dec 9, 2021
4624e33
Fix unit tests error messages
jannotti Dec 10, 2021
d494c40
Allow access to resources created in the same transaction group
jannotti Dec 15, 2021
4d25744
Merge branch 'master' into feature/contract-to-contract
jannotti Dec 16, 2021
320e11d
Merge remote-tracking branch 'upstream/feature/contract-to-contract' …
jannotti Dec 16, 2021
6df82a1
Merge remote-tracking branch 'upstream/feature/contract-to-contract' …
jannotti Dec 16, 2021
b3215c0
Access to apps created in group
jannotti Dec 17, 2021
06edcf5
Remove tracked created mechanism in favor of examining applydata.
jannotti Dec 17, 2021
b7ee4a1
Allow v6 AVM code to use in-group created asas, apps (& their accts)
jannotti Dec 21, 2021
813bdf8
lint docs
jannotti Dec 21, 2021
0fcc77b
typo
jannotti Dec 21, 2021
50665a2
The review dog needs obedience training.
jannotti Dec 21, 2021
7422318
Use one EvalParams for logic evals, another for apps in dry run
jannotti Dec 22, 2021
02bd552
Use logic.NewAppEvalParams to decrease copying and bugs in debugger
jannotti Dec 22, 2021
82d9ef5
Simplify use of NewEvalParams. No more nil return when no apps.
jannotti Dec 22, 2021
11a5b53
Remove explicit PastSideEffects handling in tealdbg
jannotti Dec 22, 2021
8fa33c9
Always create EvalParams to evaluate a transaction group.
jannotti Dec 23, 2021
7e8d997
Correct mistaken commit
jannotti Dec 23, 2021
222e4f8
Spec improvments
jannotti Dec 29, 2021
325b86b
More spec improvments, including resource "availability"
jannotti Jan 4, 2022
f879152
Recursively return inner transaction tree
jannotti Jan 4, 2022
5c69765
Lint
jannotti Jan 4, 2022
e9e78fd
No need for ConfirmedRound, so don't deref a nil pointer!
jannotti Jan 4, 2022
d591ab6
Merge branch 'master' into feature/contract-to-contract
jannotti Jan 5, 2022
bc9a03f
license check
jannotti Jan 5, 2022
00cbd47
Merge branch 'feature/contract-to-contract' into feature/contract-to-…
jannotti Jan 5, 2022
6870ea2
Shut up, dawg.
jannotti Jan 5, 2022
9ec5395
Merge branch 'master' into feature/contract-to-contract
jannotti Jan 7, 2022
4945347
Merge remote-tracking branch 'upstream/feature/contract-to-contract' …
jannotti Jan 7, 2022
e4a2420
Merge branch 'algorand:feature/contract-to-contract' into feature/con…
jannotti Jan 7, 2022
6baa253
Merge branch 'algorand:feature/contract-to-contract' into feature/con…
jannotti Jan 7, 2022
e2b34d2
base64 merge cleanup
jannotti Jan 7, 2022
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
11 changes: 0 additions & 11 deletions data/transactions/logic/TEAL_opcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -778,17 +778,6 @@ When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on

Decodes A using the base64 encoding E. Specify the encoding with an immediate arg either as URL and Filename Safe (`URLEncoding`) or Standard (`StdEncoding`). See <a href="https://rfc-editor.org/rfc/rfc4648.html#section-4">RFC 4648</a> (sections 4 and 5). It is assumed that the encoding ends with the exact number of `=` padding characters as required by the RFC. When padding occurs, any unused pad bits in the encoding must be set to zero or the decoding will fail. The special cases of `\n` and `\r` are allowed but completely ignored. An error will result when attempting to decode a string with a character that is not in the encoding alphabet or not one of `=`, `\r`, or `\n`.

## base64_decode e

- Opcode: 0x5c {uint8 encoding index}
- Pops: *... stack*, []byte
- Pushes: []byte
- decode X which was base64-encoded using _encoding_ E. Fail if X is not base64 encoded with encoding E
- **Cost**: 25
- LogicSigVersion >= 6

Decodes X using the base64 encoding E. Specify the encoding with an immediate arg either as URL and Filename Safe (`URLEncoding`) or Standard (`StdEncoding`). See <a href="https://rfc-editor.org/rfc/rfc4648.html#section-4">RFC 4648</a> (sections 4 and 5). It is assumed that the encoding ends with the exact number of `=` padding characters as required by the RFC. When padding occurs, any unused pad bits in the encoding must be set to zero or the decoding will fail. The special cases of `\n` and `\r` are allowed but completely ignored. An error will result when attempting to decode a string with a character that is not in the encoding alphabet or not one of `=`, `\r`, or `\n`.

## balance

- Opcode: 0x60
Expand Down
13 changes: 0 additions & 13 deletions data/transactions/logic/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,6 @@ var globalFieldDocs = map[string]string{
"CallerApplicationAddress": "The application address of the application that called this application. ZeroAddress if this application is at the top-level.",
}

type extractor interface {
getExtraFor(string) string
}

func addExtra(original string, extra string) string {
if len(original) == 0 {
return extra
Expand All @@ -500,15 +496,6 @@ func addExtra(original string, extra string) string {
return original + sep + extra
}

func fieldsDocWithExtra(source map[string]string, ex extractor) map[string]string {
result := make(map[string]string, len(source))
for name, doc := range source {
extra := ex.getExtraFor(name)
result[name] = addExtra(doc, extra)
}
return result
}

// AssetHoldingFieldDocs are notes on fields available in `asset_holding_get`
var assetHoldingFieldDocs = map[string]string{
"AssetBalance": "Amount of the asset unit held by this account",
Expand Down
47 changes: 10 additions & 37 deletions data/transactions/logic/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
package logic

import (
"fmt"

"github.com/algorand/go-algorand/data/transactions"
"github.com/algorand/go-algorand/protocol"
)
Expand Down Expand Up @@ -557,49 +555,24 @@ var base64EncodingSpecByName base64EncodingSpecMap

type base64EncodingSpecMap map[string]base64EncodingSpec

func (s base64EncodingSpecMap) getExtraFor(name string) (extra string) {
// Uses 6 here because base64_decode fields were introduced in 6
if s[name].version > 6 {
extra = fmt.Sprintf("Introduced v%d.", s[name].version)
}
return
func (fs *base64EncodingSpec) Type() StackType {
return fs.ftype
}

// Base64Encoding is an enum for the `base64decode` opcode
type Base64Encoding int

const (
// URLEncoding represents the base64url encoding defined in https://www.rfc-editor.org/rfc/rfc4648.html
URLEncoding Base64Encoding = iota
// StdEncoding represents the standard encoding of the RFC
StdEncoding
invalidBase64Alphabet
)

// After running `go generate` these strings will be available:
var base64EncodingNames [2]string = [...]string{URLEncoding.String(), StdEncoding.String()}

type base64EncodingSpec struct {
field Base64Encoding
ftype StackType
version uint64
func (fs *base64EncodingSpec) OpVersion() uint64 {
return 6
}

var base64EncodingSpecs = []base64EncodingSpec{
{URLEncoding, StackBytes, 6},
{StdEncoding, StackBytes, 6},
func (fs *base64EncodingSpec) Version() uint64 {
return fs.version
}

var base64EncodingSpecByField map[Base64Encoding]base64EncodingSpec
var base64EncodingSpecByName base64EncodingSpecMap

type base64EncodingSpecMap map[string]base64EncodingSpec

func (fs *base64EncodingSpec) Note() string {
note := "" // no doc list?
return note
}
func (s base64EncodingSpecMap) getExtraFor(name string) (extra string) {
// Uses 6 here because base64_decode fields were introduced in 6
if s[name].version > 6 {
extra = fmt.Sprintf("LogicSigVersion >= %d.", s[name].version)
}
return
}

Expand Down