From 6e2c0e864bd41f1f30fde95e490e1173e489f0bb Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Mon, 11 Nov 2024 15:17:07 +0000 Subject: [PATCH] removing dup --- core/gethwrappers/abigen.go | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/core/gethwrappers/abigen.go b/core/gethwrappers/abigen.go index cdbaf1955d5..59f92d0f337 100644 --- a/core/gethwrappers/abigen.go +++ b/core/gethwrappers/abigen.go @@ -191,7 +191,6 @@ func ImproveAbigenOutput(path string, abiPath string, zkHexString string) { fset, fileNode = parseFile(bs) fileNode = writeInterface(contractName, fileNode) - bs = generateCode(fset, fileNode) bs = addHeader(bs) @@ -247,7 +246,6 @@ func getContractName(fileNode *ast.File) string { func addContractStructFields(contractName string, fileNode *ast.File) *ast.File { fileNode = addContractStructFieldsToStruct(contractName, fileNode) fileNode = addContractStructFieldsToConstructor(contractName, fileNode) - // zksync fileNode = addContractStructFieldsToDeployMethod(contractName, fileNode) return fileNode } @@ -392,38 +390,6 @@ func addContractStructFieldsToDeployMethod(contractName string, fileNode *ast.Fi Value: ast.NewIdent("*parsed"), } lit.Elts = append([]ast.Expr{addressExpr, abiExpr}, lit.Elts...) - - // zksync - // convert tx to &CustomTransaction{Transaction: tx, customHash: tx.Hash()} - txExpr, ok := returnStmt.Results[1].(*ast.Ident) - if !ok { - return true - } - if txExpr.Name != "tx" { - return true - } - txField := &ast.KeyValueExpr{ - Key: ast.NewIdent("Transaction"), - Value: ast.NewIdent("tx"), - } - hashField := &ast.KeyValueExpr{ - Key: ast.NewIdent("CustomHash"), - Value: &ast.CallExpr{ - Fun: &ast.SelectorExpr{ - X: ast.NewIdent("tx"), - Sel: ast.NewIdent("Hash"), - }, - }, - } - newRet := &ast.CompositeLit{ - Type: &ast.SelectorExpr{ - X: &ast.Ident{Name: "generated"}, - Sel: &ast.Ident{Name: "CustomTransaction"}, - }, - Elts: []ast.Expr{txField, hashField}, - } - pointerRet := &ast.UnaryExpr{Op: token.AND, X: newRet} - returnStmt.Results[1] = pointerRet } return false }, nil).(*ast.File)