2021-10-06 11:59:08 +00:00
|
|
|
package tests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/core"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
2021-10-18 11:12:26 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
2021-10-06 11:59:08 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const balancePath = "../balance"
|
|
|
|
|
|
|
|
func deployBalanceContract(t *testing.T, bc *core.Blockchain, addrNetmap, addrContainer util.Uint160) util.Uint160 {
|
|
|
|
args := make([]interface{}, 3)
|
|
|
|
args[0] = false
|
|
|
|
args[1] = addrNetmap
|
|
|
|
args[2] = addrContainer
|
|
|
|
return DeployContract(t, bc, balancePath, args)
|
|
|
|
}
|
2021-10-18 11:12:26 +00:00
|
|
|
|
|
|
|
func balanceMint(t *testing.T, bc *core.Blockchain, acc *wallet.Account, h util.Uint160, amount int64, details []byte) {
|
|
|
|
tx := PrepareInvoke(t, bc, CommitteeAcc, h, "mint", acc.Contract.ScriptHash(), amount, details)
|
|
|
|
AddBlockCheckHalt(t, bc, tx)
|
|
|
|
}
|