various small fixes: better error message, remove unecessary comments. address review about missing word in function documentation.

This commit is contained in:
Jared Wasinger 2024-11-26 19:31:58 +07:00 committed by Felix Lange
parent d0a8ead758
commit 77158e5bf0
2 changed files with 3 additions and 6 deletions

View File

@ -365,7 +365,8 @@ func bind(types []string, abis []string, bytecodes []string, fsigs []map[string]
// methods (which in v1 recursively deploy their // methods (which in v1 recursively deploy their
// library dependencies). So, the entire set of // library dependencies). So, the entire set of
// library dependencies is required, and we will // library dependencies is required, and we will
// the order to deploy and link them at runtime. // determine the order to deploy and link them at
// runtime.
var findDeps func(contract *tmplContract) map[string]struct{} var findDeps func(contract *tmplContract) map[string]struct{}
findDeps = func(contract *tmplContract) map[string]struct{} { findDeps = func(contract *tmplContract) map[string]struct{} {
// 1) match all libraries that this contract depends on // 1) match all libraries that this contract depends on

View File

@ -92,9 +92,6 @@ func TestDeployment(t *testing.T) {
Backend: backend, Backend: backend,
Client: backend.Client(), Client: backend.Client(),
} }
//log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stdout, log.LevelDebug, true)))
ctrct, err := nested_libraries.NewC1() ctrct, err := nested_libraries.NewC1()
if err != nil { if err != nil {
panic(err) panic(err)
@ -102,9 +99,8 @@ func TestDeployment(t *testing.T) {
constructorInput, err := ctrct.PackConstructor(big.NewInt(42), big.NewInt(1)) constructorInput, err := ctrct.PackConstructor(big.NewInt(42), big.NewInt(1))
if err != nil { if err != nil {
t.Fatalf("fack %v", err) t.Fatalf("failed to pack constructor: %v", err)
} }
// TODO: test case with arguments-containing constructor
deploymentParams := DeploymentParams{ deploymentParams := DeploymentParams{
Contracts: []ContractDeployParams{ Contracts: []ContractDeployParams{
{ {