From 1be2215a35120c15c08649377024cfb8d53cb43d Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 23 Jan 2025 13:50:57 +0100 Subject: [PATCH] accounts/abi/abigen: use tabs for indent in v2 template --- accounts/abi/abigen/source2.go.tpl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/accounts/abi/abigen/source2.go.tpl b/accounts/abi/abigen/source2.go.tpl index d102a03f83..bc67f713eb 100644 --- a/accounts/abi/abigen/source2.go.tpl +++ b/accounts/abi/abigen/source2.go.tpl @@ -1,3 +1,4 @@ +{{- /* -*- indent-tabs-mode: t -*- */ -}} // Code generated via abigen V2 - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. @@ -62,13 +63,13 @@ var ( return &{{.Type}}{abi: *parsed} } - // Instance creates a wrapper for a deployed contract instance at the given address. - // Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. - func (c *{{.Type}}) Instance(backend bind.ContractBackend, addr common.Address) bind.ContractInstance { - return bind.NewContractInstance(backend, addr, c.abi) - } + // Instance creates a wrapper for a deployed contract instance at the given address. + // Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. + func (c *{{.Type}}) Instance(backend bind.ContractBackend, addr common.Address) bind.ContractInstance { + return bind.NewContractInstance(backend, addr, c.abi) + } - {{ if .Constructor.Inputs }} + {{ if .Constructor.Inputs }} func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) PackConstructor({{range .Constructor.Inputs}} {{.Name}} {{bindtype .Type $structs}}, {{end}}) []byte { res, _ := {{ decapitalise $contract.Type}}.abi.Pack("" {{range .Constructor.Inputs}}, {{.Name}}{{end}}) return res