github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/algod/tealDryrun.go (about) 1 package algod 2 3 import ( 4 "context" 5 6 "github.com/algorand/go-algorand-sdk/client/v2/common" 7 "github.com/algorand/go-algorand-sdk/client/v2/common/models" 8 "github.com/algorand/go-algorand-sdk/encoding/msgpack" 9 ) 10 11 // TealDryrun executes TEAL program(s) in context and returns debugging information 12 // about the execution. This endpoint is only enabled when a node's configuration 13 // file sets EnableDeveloperAPI to true. 14 type TealDryrun struct { 15 c *Client 16 17 request models.DryrunRequest 18 } 19 20 // Do performs the HTTP request 21 func (s *TealDryrun) Do(ctx context.Context, headers ...*common.Header) (response models.DryrunResponse, err error) { 22 err = s.c.post(ctx, &response, "/v2/teal/dryrun", nil, headers, msgpack.Encode(&s.request)) 23 return 24 }