MCPcopy Create free account
hub / github.com/chain/txvm / StackItem

Method StackItem

protocol/txvm/introspection.go:28–30  ·  view source on GitHub ↗

StackItem returns an "inspected" copy of an item on the VM's current contract stack, by position. Position 0 is the bottom of the stack and StackLen()-1 is the top.

(i int)

Source from the content-addressed store, hash-verified

26// current contract stack, by position. Position 0 is the bottom of
27// the stack and StackLen()-1 is the top.
28func (vm *VM) StackItem(i int) Data {
29 return vm.contract.stack[i].inspect()
30}
31
32// Seed returns the contract seed of the VM's current contract.
33func (vm *VM) Seed() []byte {

Callers 3

TestIntrospectionFunction · 0.95
TestOptionsFunction · 0.80
stackHookMethod · 0.80

Calls 1

inspectMethod · 0.65

Tested by 2

TestIntrospectionFunction · 0.76
TestOptionsFunction · 0.64