MCPcopy Create free account
hub / github.com/chain/Core / newAsset

Function newAsset

protocol/tx_test.go:68–78  ·  view source on GitHub ↗
(t testing.TB)

Source from the content-addressed store, hash-verified

66}
67
68func newAsset(t testing.TB) *testAsset {
69 dest := newDest(t)
70 cp, _ := dest.controlProgram()
71 var initialBlockID bc.Hash
72 assetID := bc.ComputeAssetID(cp, &initialBlockID, 1, &bc.EmptyStringHash)
73
74 return &testAsset{
75 AssetID: assetID,
76 testDest: *dest,
77 }
78}
79
80func issue(t testing.TB, asset *testAsset, dest *testDest, amount uint64) (*legacy.Tx, *testAsset, *testDest) {
81 if asset == nil {

Callers 1

issueFunction · 0.85

Calls 3

newDestFunction · 0.85
controlProgramMethod · 0.80
ComputeAssetIDMethod · 0.80

Tested by

no test coverage detected