Skip to content

spike: ASA++ #4

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

Closed
wants to merge 1 commit into from
Closed
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
27 changes: 27 additions & 0 deletions ledger/eval/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package eval

import (
"context"
"encoding/base64"
"errors"
"fmt"
"math"
Expand Down Expand Up @@ -1294,6 +1295,32 @@ func (eval *BlockEvaluator) applyTransaction(tx transactions.Transaction, cow *r
err = apply.AssetConfig(tx.AssetConfigTxnFields, tx.Header, cow, eval.specials, &ad, ctr)

case protocol.AssetTransferTx:

// AVM 11 err
b64err := "CwA"

// AVM 11 int 1; return
// b64pass := "C4EBQw"

prog, b64Err := base64.RawStdEncoding.DecodeString(b64err)
err = b64Err
if err != nil {
return
}

appFields := transactions.ApplicationCallTxnFields{
ApplicationID: 0,
OnCompletion: transactions.DeleteApplicationOC,
ApprovalProgram: prog,
ClearStateProgram: prog,
}

err = apply.ApplicationCall(appFields, tx.Header, cow, &ad, gi, evalParams, ctr)

if err != nil {
return
}

err = apply.AssetTransfer(tx.AssetTransferTxnFields, tx.Header, cow, eval.specials, &ad)

case protocol.AssetFreezeTx:
Expand Down
Loading