github.com/neatio-net/neatio@v1.7.3-0.20231114194659-f4d7a2226baa/chain/accounts/abi/bind/util_test.go (about)

     1  package bind_test
     2  
     3  import (
     4  	"github.com/neatio-net/neatio/chain/accounts/abi/bind"
     5  	"github.com/neatio-net/neatio/utilities/common"
     6  	"github.com/neatio-net/neatio/utilities/crypto"
     7  )
     8  
     9  var testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
    10  
    11  var waitDeployedTests = map[string]struct {
    12  	code        string
    13  	gas         uint64
    14  	wantAddress common.Address
    15  	wantErr     error
    16  }{
    17  	"successful deploy": {
    18  		code:        `6060604052600a8060106000396000f360606040526008565b00`,
    19  		gas:         3000000,
    20  		wantAddress: common.HexToAddress("0x3a220f351252089d385b29beca14e27f204c296a"),
    21  	},
    22  	"empty code": {
    23  		code:        ``,
    24  		gas:         300000,
    25  		wantErr:     bind.ErrNoCodeAfterDeploy,
    26  		wantAddress: common.HexToAddress("0x3a220f351252089d385b29beca14e27f204c296a"),
    27  	},
    28  }