2018-03-14 09:36:59 +00:00
|
|
|
package transaction
|
|
|
|
|
2019-08-27 16:58:50 +00:00
|
|
|
import (
|
|
|
|
"encoding/hex"
|
|
|
|
"testing"
|
|
|
|
|
2020-06-18 09:00:51 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
2019-08-27 16:58:50 +00:00
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
2018-03-14 09:36:59 +00:00
|
|
|
var (
|
2020-08-18 12:09:30 +00:00
|
|
|
// tx from testnet 58ea0709dac398c451fd51fdf4466f5257c77927c7909834a0ef3b469cd1a2ce
|
|
|
|
rawInvocationTX = "00be80024f7673890000000000261c130000000000e404210001f813c2cc8e18bbe4b3b87f8ef9105b50bb93918e01005d0300743ba40b0000000c14aa07cc3f2193a973904a09a6e60b87f1f96273970c14f813c2cc8e18bbe4b3b87f8ef9105b50bb93918e13c00c087472616e736665720c14bcaf41d684c7d4ad6ee0d99da9707b9d1f0c8e6641627d5b523801420c402360bbf64b9644c25f066dbd406454b07ab9f56e8e25d92d90c96c598f6c29d97eabdcf226f3575481662cfcdd064ee410978e5fae3f09a2f83129ba9cd82641290c2103caf763f91d3691cba5b5df3eb13e668fdace0295b37e2e259fd0fb152d354f900b4195440d78"
|
2018-03-14 09:36:59 +00:00
|
|
|
)
|
2019-08-27 16:58:50 +00:00
|
|
|
|
|
|
|
func decodeTransaction(rawTX string, t *testing.T) *Transaction {
|
|
|
|
b, err1 := hex.DecodeString(rawTX)
|
|
|
|
assert.Nil(t, err1)
|
2020-08-18 12:09:30 +00:00
|
|
|
tx, err := NewTransactionFromBytes(netmode.TestNet, b)
|
2020-04-13 09:02:18 +00:00
|
|
|
assert.NoError(t, err)
|
2019-08-27 16:58:50 +00:00
|
|
|
return tx
|
|
|
|
}
|