MCPcopy Create free account
hub / github.com/CPChain/chain / TestMainnetInitContract

Function TestMainnetInitContract

tools/smartcontract/deploy/init_contract_test.go:29–57  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27)
28
29func TestMainnetInitContract(t *testing.T) {
30 t.Skip("skip contract verify test")
31
32 client, err := cpclient.Dial("http://localhost:8501")
33 if err != nil {
34 log.Fatal(err.Error())
35 t.Skip("skip mainnet init verify contract")
36 }
37 ctx := context.Background()
38
39 // admission.go
40 // addr := common.HexToAddress("0x3DCe838fded8631E1CcBC6373121d83e0a3C7dCD")// proxy
41 // addr := common.HexToAddress("0xe691f6C6688f109102E04253d6FA55497238bA57") // real
42
43 // campaign
44 // addr := common.HexToAddress("0x34eF33413C6578611CF39A9b8d59D5f1e724f240") // proxy
45 addr := common.HexToAddress("0xED111e097C77253bc0febBd7e85F5Af6D60A8196") // real
46
47 code, err := client.CodeAt(ctx, addr, nil)
48 if len(code) > 0 {
49 fmt.Println("contract code exist")
50 } else {
51 fmt.Println("contract code not exist")
52 }
53 if err != nil {
54 println("DeployContract failed")
55 log.Fatal(err.Error())
56 }
57}
58
59func TestDevInitContract(t *testing.T) {
60 t.Skip("skip contract verify test")

Callers

nothing calls this directly

Calls 3

FatalMethod · 0.65
ErrorMethod · 0.65
CodeAtMethod · 0.65

Tested by

no test coverage detected