Documentation ¶
Index ¶
- Constants
- Variables
- func AppAddress(app sdk.AppIndex) sdk.Address
- func ArbitraryString() []byte
- func DecodeAddressOrPanic(addr string) sdk.Address
- func ExitValue() int
- func MakeAppCallWithInnerTxn(...) sdk.SignedTxnWithAD
- func MakeAppDestroyTxn(appid uint64, sender sdk.Address) sdk.SignedTxnWithAD
- func MakeAppOptInTxn(appid uint64, sender sdk.Address) sdk.SignedTxnWithAD
- func MakeAssetConfigTxn(configid, total, decimals uint64, defaultFrozen bool, ...) sdk.SignedTxnWithAD
- func MakeAssetDestroyTxn(assetID uint64, sender sdk.Address) sdk.SignedTxnWithAD
- func MakeAssetOptInTxn(assetid uint64, address sdk.Address) sdk.SignedTxnWithAD
- func MakeAssetTransferTxn(assetid, amt uint64, sender, receiver, close sdk.Address) sdk.SignedTxnWithAD
- func MakeBlockForTxns(prevHeader sdk.BlockHeader, inputs ...*sdk.SignedTxnWithAD) (sdk.Block, error)
- func MakeCreateAppTxn(sender sdk.Address) sdk.SignedTxnWithAD
- func MakeGenesis() sdk.Genesis
- func MakeGenesisBlock() sdk.Block
- func MakePaymentTxn(fee, amt, closeAmt, sendRewards, receiveRewards, closeRewards uint64, ...) sdk.SignedTxnWithAD
- func MakeSimpleAppCallTxn(appid uint64, sender sdk.Address) sdk.SignedTxnWithAD
- func PrintAccountQuery(db idb.IndexerDb, q idb.AccountQueryOptions)
- func PrintAssetQuery(db idb.IndexerDb, q idb.AssetsQuery)
- func PrintTxnQuery(db idb.IndexerDb, q idb.TransactionFilter)
- func ReadValidatedBlockFromFile(filename string) (types.ValidatedBlock, error)
- func SetQuiet(q bool)
Constants ¶
const BoxClearProgram string = `#pragma version 8
int 1
`
BoxClearProgram is a vanilla TEAL clear state program
Variables ¶
var ( // AccountA is a premade account for use in tests. AccountA = DecodeAddressOrPanic("GJR76Q6OXNZ2CYIVCFCDTJRBAAR6TYEJJENEII3G2U3JH546SPBQA62IFY") // AccountB is a premade account for use in tests. AccountB = DecodeAddressOrPanic("N5T74SANUWLHI6ZWYFQBEB6J2VXBTYUYZNWQB2V26DCF4ARKC7GDUW3IRU") // AccountC is a premade account for use in tests. AccountC = DecodeAddressOrPanic("OKUWMFFEKF4B4D7FRQYBVV3C2SNS54ZO4WZ2MJ3576UYKFDHM5P3AFMRWE") // AccountD is a premade account for use in tests. AccountD = DecodeAddressOrPanic("6TB2ZQA2GEEDH6XTIOH5A7FUSGINXDPW5ONN6XBOBBGGUXVHRQTITAIIVI") // AccountE is a premade account for use in tests. AccountE = DecodeAddressOrPanic("QYE3RIRIIUS4VRZ4WYR7E5R6WBHTQXUY7F62C7U77SSRAXUSFTSRQPXPPU") // FeeAddr is the fee addess to use when creating the state object. FeeAddr = DecodeAddressOrPanic("ZROKLZW4GVOK5WQIF2GUR6LHFVEZBMV56BIQEQD4OTIZL2BPSYYUKFBSHM") // RewardAddr is the fee addess to use when creating the state object. RewardAddr = DecodeAddressOrPanic("4C3S3A5II6AYMEADSW7EVL7JAKVU2ASJMMJAGVUROIJHYMS6B24NCXVEWM") // GenesisHash is a genesis hash used in tests. GenesisHash = MakeGenesis().Hash() // Signature is a signature for transactions used in tests. Signature = sdk.Signature{88} // Proto is a fake protocol version. Proto = protocol.ConsensusFuture // PaysetFlat is the payset HashID defined in go-algorand/protocol/hash.go PaysetFlat = "PF" )
var BoxApprovalProgram string
BoxApprovalProgram is a TEAL program which allows for testing box functionality
var Info = info
Info is the the only logging level for this thing.
Functions ¶
func AppAddress ¶
AppAddress generates Address for the given appID
func ArbitraryString ¶
func ArbitraryString() []byte
ArbitraryString should be used to generate a pseudo-random string to put in the Note field of a Txn Header. This is necessary to ensure the hash of any two txns used in tests are never the same.
func DecodeAddressOrPanic ¶
DecodeAddressOrPanic is a helper to ensure addresses are initialized.
func MakeAppCallWithInnerTxn ¶
func MakeAppCallWithInnerTxn(appSender, paymentSender, paymentReceiver, assetSender, assetReceiver sdk.Address) sdk.SignedTxnWithAD
MakeAppCallWithInnerTxn is a MakeAppCallWithInnerTxn returning sdk.SignedTxnWithAD
func MakeAppDestroyTxn ¶
func MakeAppDestroyTxn(appid uint64, sender sdk.Address) sdk.SignedTxnWithAD
MakeAppDestroyTxn makes a transaction that destroys an app.
func MakeAppOptInTxn ¶
func MakeAppOptInTxn(appid uint64, sender sdk.Address) sdk.SignedTxnWithAD
MakeAppOptInTxn makes a transaction that opts in an app.
func MakeAssetConfigTxn ¶
func MakeAssetConfigTxn(configid, total, decimals uint64, defaultFrozen bool, unitName, assetName, url string, addr sdk.Address) sdk.SignedTxnWithAD
MakeAssetConfigTxn is a helper to ensure test asset config are initialized.
func MakeAssetDestroyTxn ¶
func MakeAssetDestroyTxn(assetID uint64, sender sdk.Address) sdk.SignedTxnWithAD
MakeAssetDestroyTxn makes a transaction that destroys an asset.
func MakeAssetOptInTxn ¶
func MakeAssetOptInTxn(assetid uint64, address sdk.Address) sdk.SignedTxnWithAD
MakeAssetOptInTxn makes a transaction that opts in an asset.
func MakeAssetTransferTxn ¶
func MakeAssetTransferTxn(assetid, amt uint64, sender, receiver, close sdk.Address) sdk.SignedTxnWithAD
MakeAssetTransferTxn creates an asset transfer transaction.
func MakeBlockForTxns ¶
func MakeBlockForTxns(prevHeader sdk.BlockHeader, inputs ...*sdk.SignedTxnWithAD) (sdk.Block, error)
MakeBlockForTxns takes some transactions and constructs a block compatible with the indexer import function.
func MakeCreateAppTxn ¶
func MakeCreateAppTxn(sender sdk.Address) sdk.SignedTxnWithAD
MakeCreateAppTxn makes a transaction that creates a simple application.
func MakePaymentTxn ¶
func MakePaymentTxn(fee, amt, closeAmt, sendRewards, receiveRewards, closeRewards uint64, sender, receiver, close, rekeyTo sdk.Address) sdk.SignedTxnWithAD
MakePaymentTxn creates an algo transfer transaction.
func MakeSimpleAppCallTxn ¶
func MakeSimpleAppCallTxn(appid uint64, sender sdk.Address) sdk.SignedTxnWithAD
MakeSimpleAppCallTxn is a MakeSimpleAppCallTxn return sdk.SignedTxnWithAD.
func PrintAccountQuery ¶
func PrintAccountQuery(db idb.IndexerDb, q idb.AccountQueryOptions)
PrintAccountQuery prints information about an account query.
func PrintAssetQuery ¶
func PrintAssetQuery(db idb.IndexerDb, q idb.AssetsQuery)
PrintAssetQuery prints information about an asset query.
func PrintTxnQuery ¶
func PrintTxnQuery(db idb.IndexerDb, q idb.TransactionFilter)
PrintTxnQuery prints information about a transaction query.
func ReadValidatedBlockFromFile ¶
func ReadValidatedBlockFromFile(filename string) (types.ValidatedBlock, error)
ReadValidatedBlockFromFile reads a validated block from file
Types ¶
This section is empty.