[#74] tests: Actualize proxy contract deploy parameters

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-01-29 13:34:38 +03:00
parent 93781f1149
commit 60e8abbf49
2 changed files with 4 additions and 12 deletions

View file

@ -47,7 +47,7 @@ func newAlphabetInvoker(t *testing.T) (*neotest.Executor, *neotest.ContractInvok
container.AliasFeeKey, int64(containerAliasFee))
deployBalanceContract(t, e, ctrNetmap.Hash, ctrContainer.Hash)
deployContainerContract(t, e, ctrNetmap.Hash, ctrBalance.Hash, ctrNNS.Hash)
deployProxyContract(t, e, ctrNetmap.Hash)
deployProxyContract(t, e)
hash := deployAlphabetContract(t, e, ctrNetmap.Hash, ctrProxy.Hash, "Az", 0, 1)
alphabet := getAlphabetAcc(t, e)

View file

@ -15,25 +15,17 @@ import (
const proxyPath = "../proxy"
func deployProxyContract(t *testing.T, e *neotest.Executor, addrNetmap util.Uint160) util.Uint160 {
args := make([]any, 1)
args[0] = addrNetmap
func deployProxyContract(t *testing.T, e *neotest.Executor) util.Uint160 {
c := neotest.CompileFile(t, e.CommitteeHash, proxyPath, path.Join(proxyPath, "config.yml"))
e.DeployContract(t, c, args)
e.DeployContract(t, c, []any{})
return c.Hash
}
func newProxyInvoker(t *testing.T) *neotest.ContractInvoker {
e := newExecutor(t)
ctrNetmap := neotest.CompileFile(t, e.CommitteeHash, netmapPath, path.Join(netmapPath, "config.yml"))
ctrBalance := neotest.CompileFile(t, e.CommitteeHash, balancePath, path.Join(balancePath, "config.yml"))
ctrContainer := neotest.CompileFile(t, e.CommitteeHash, containerPath, path.Join(containerPath, "config.yml"))
ctrProxy := neotest.CompileFile(t, e.CommitteeHash, proxyPath, path.Join(proxyPath, "config.yml"))
deployNetmapContract(t, e, ctrBalance.Hash, ctrContainer.Hash)
deployProxyContract(t, e, ctrNetmap.Hash)
deployProxyContract(t, e)
return e.CommitteeInvoker(ctrProxy.Hash)
}