frostfs-contract/tests/balance_test.go
Evgenii Stratonikov d890a7eba4 [#50] Replace interface{} with any
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-07 15:18:48 +03:00

27 lines
734 B
Go

package tests
import (
"path"
"testing"
"github.com/nspcc-dev/neo-go/pkg/neotest"
"github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
)
const balancePath = "../balance"
func deployBalanceContract(t *testing.T, e *neotest.Executor, addrNetmap, addrContainer util.Uint160) util.Uint160 {
c := neotest.CompileFile(t, e.CommitteeHash, balancePath, path.Join(balancePath, "config.yml"))
args := make([]any, 3)
args[0] = addrNetmap
args[1] = addrContainer
e.DeployContract(t, c, args)
return c.Hash
}
func balanceMint(t *testing.T, c *neotest.ContractInvoker, acc neotest.Signer, amount int64, details []byte) {
c.Invoke(t, stackitem.Null{}, "mint", acc.ScriptHash(), amount, details)
}