frostfs-contract/tests/balance_test.go
Evgenii Stratonikov a7601334f7 [#150] container: allow only alphabet calls in Put
For notary-enabled environment we expect `put` to be signed by alphabet.
Also group notary-disabled logic inside a single if and
add tests for balance checks.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 11:51:16 +03:00

24 lines
710 B
Go

package tests
import (
"testing"
"github.com/nspcc-dev/neo-go/pkg/core"
"github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neo-go/pkg/wallet"
)
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)
}
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)
}