accounts/abi: generate TryPack* methods for abigen v2 bindings (#31692)

1. Fix the error return format.
**todo**: ~~`bindtype` needs more complex logic to fix it.~~
`
if err != nil {
  return nil, err
}
if err == nil {
  return obj, nil
}
`
2. ~~Return pointer type object to avoid copying the whole struct
content.~~
3. Give the panic decision to the user.
4. Fix empty line at the end of function.

**TODO**: ~~fix some related test cases.~~

---------

Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
This commit is contained in:
maskpp 2025-07-02 14:16:54 +08:00 committed by GitHub
parent 3fb6499fc9
commit bc67e7dd48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 1186 additions and 197 deletions

View file

@ -281,7 +281,7 @@ func TestBindingV2ConvertedV1Tests(t *testing.T) {
} }
// Set this environment variable to regenerate the test outputs. // Set this environment variable to regenerate the test outputs.
if os.Getenv("WRITE_TEST_FILES") != "" { if os.Getenv("WRITE_TEST_FILES") != "" {
if err := os.WriteFile((fname), []byte(have), 0666); err != nil { if err := os.WriteFile(fname, []byte(have), 0666); err != nil {
t.Fatalf("err writing expected output to file: %v\n", err) t.Fatalf("err writing expected output to file: %v\n", err)
} }
} }

View file

@ -90,7 +90,8 @@ var (
{{range .Calls}} {{range .Calls}}
// Pack{{.Normalized.Name}} is the Go binding used to pack the parameters required for calling // Pack{{.Normalized.Name}} is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x{{printf "%x" .Original.ID}}. // the contract method with ID 0x{{printf "%x" .Original.ID}}. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: {{.Original.String}} // Solidity: {{.Original.String}}
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Pack{{.Normalized.Name}}({{range .Normalized.Inputs}} {{.Name}} {{bindtype .Type $structs}}, {{end}}) []byte { func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Pack{{.Normalized.Name}}({{range .Normalized.Inputs}} {{.Name}} {{bindtype .Type $structs}}, {{end}}) []byte {
@ -101,6 +102,15 @@ var (
return enc return enc
} }
// TryPack{{.Normalized.Name}} is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x{{printf "%x" .Original.ID}}. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: {{.Original.String}}
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) TryPack{{.Normalized.Name}}({{range .Normalized.Inputs}} {{.Name}} {{bindtype .Type $structs}}, {{end}}) ([]byte, error) {
return {{ decapitalise $contract.Type}}.abi.Pack("{{.Original.Name}}" {{range .Normalized.Inputs}}, {{.Name}}{{end}})
}
{{/* Unpack method is needed only when there are return args */}} {{/* Unpack method is needed only when there are return args */}}
{{if .Normalized.Outputs }} {{if .Normalized.Outputs }}
{{ if .Structured }} {{ if .Structured }}
@ -133,8 +143,7 @@ var (
outstruct.{{capitalise .Name}} = *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}}) outstruct.{{capitalise .Name}} = *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}})
{{- end }} {{- end }}
{{- end }} {{- end }}
return *outstruct, err return *outstruct, nil{{else}}
{{else}}
if err != nil { if err != nil {
return {{range $i, $_ := .Normalized.Outputs}}{{if ispointertype .Type}}new({{underlyingbindtype .Type }}), {{else}}*new({{bindtype .Type $structs}}), {{end}}{{end}} err return {{range $i, $_ := .Normalized.Outputs}}{{if ispointertype .Type}}new({{underlyingbindtype .Type }}), {{else}}*new({{bindtype .Type $structs}}), {{end}}{{end}} err
} }
@ -145,8 +154,8 @@ var (
out{{$i}} := *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}}) out{{$i}} := *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}})
{{- end }} {{- end }}
{{- end}} {{- end}}
return {{range $i, $t := .Normalized.Outputs}}out{{$i}}, {{end}} err return {{range $i, $t := .Normalized.Outputs}}out{{$i}}, {{end}} nil
{{- end}} {{- end}}
} }
{{end}} {{end}}
{{end}} {{end}}

View file

@ -52,7 +52,8 @@ func (c *CallbackParam) Instance(backend bind.ContractBackend, addr common.Addre
} }
// PackTest is the Go binding used to pack the parameters required for calling // PackTest is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd7a5aba2. // the contract method with ID 0xd7a5aba2. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function test(function callback) returns() // Solidity: function test(function callback) returns()
func (callbackParam *CallbackParam) PackTest(callback [24]byte) []byte { func (callbackParam *CallbackParam) PackTest(callback [24]byte) []byte {
@ -62,3 +63,12 @@ func (callbackParam *CallbackParam) PackTest(callback [24]byte) []byte {
} }
return enc return enc
} }
// TryPackTest is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd7a5aba2. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function test(function callback) returns()
func (callbackParam *CallbackParam) TryPackTest(callback [24]byte) ([]byte, error) {
return callbackParam.abi.Pack("test", callback)
}

View file

@ -64,7 +64,8 @@ func (crowdsale *Crowdsale) PackConstructor(ifSuccessfulSendTo common.Address, f
} }
// PackAmountRaised is the Go binding used to pack the parameters required for calling // PackAmountRaised is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x7b3e5e7b. // the contract method with ID 0x7b3e5e7b. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function amountRaised() returns(uint256) // Solidity: function amountRaised() returns(uint256)
func (crowdsale *Crowdsale) PackAmountRaised() []byte { func (crowdsale *Crowdsale) PackAmountRaised() []byte {
@ -75,6 +76,15 @@ func (crowdsale *Crowdsale) PackAmountRaised() []byte {
return enc return enc
} }
// TryPackAmountRaised is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x7b3e5e7b. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function amountRaised() returns(uint256)
func (crowdsale *Crowdsale) TryPackAmountRaised() ([]byte, error) {
return crowdsale.abi.Pack("amountRaised")
}
// UnpackAmountRaised is the Go binding that unpacks the parameters returned // UnpackAmountRaised is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x7b3e5e7b. // from invoking the contract method with ID 0x7b3e5e7b.
// //
@ -85,11 +95,12 @@ func (crowdsale *Crowdsale) UnpackAmountRaised(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackBeneficiary is the Go binding used to pack the parameters required for calling // PackBeneficiary is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x38af3eed. // the contract method with ID 0x38af3eed. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function beneficiary() returns(address) // Solidity: function beneficiary() returns(address)
func (crowdsale *Crowdsale) PackBeneficiary() []byte { func (crowdsale *Crowdsale) PackBeneficiary() []byte {
@ -100,6 +111,15 @@ func (crowdsale *Crowdsale) PackBeneficiary() []byte {
return enc return enc
} }
// TryPackBeneficiary is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x38af3eed. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function beneficiary() returns(address)
func (crowdsale *Crowdsale) TryPackBeneficiary() ([]byte, error) {
return crowdsale.abi.Pack("beneficiary")
}
// UnpackBeneficiary is the Go binding that unpacks the parameters returned // UnpackBeneficiary is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x38af3eed. // from invoking the contract method with ID 0x38af3eed.
// //
@ -110,11 +130,12 @@ func (crowdsale *Crowdsale) UnpackBeneficiary(data []byte) (common.Address, erro
return *new(common.Address), err return *new(common.Address), err
} }
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err return out0, nil
} }
// PackCheckGoalReached is the Go binding used to pack the parameters required for calling // PackCheckGoalReached is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x01cb3b20. // the contract method with ID 0x01cb3b20. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function checkGoalReached() returns() // Solidity: function checkGoalReached() returns()
func (crowdsale *Crowdsale) PackCheckGoalReached() []byte { func (crowdsale *Crowdsale) PackCheckGoalReached() []byte {
@ -125,8 +146,18 @@ func (crowdsale *Crowdsale) PackCheckGoalReached() []byte {
return enc return enc
} }
// TryPackCheckGoalReached is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x01cb3b20. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function checkGoalReached() returns()
func (crowdsale *Crowdsale) TryPackCheckGoalReached() ([]byte, error) {
return crowdsale.abi.Pack("checkGoalReached")
}
// PackDeadline is the Go binding used to pack the parameters required for calling // PackDeadline is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x29dcb0cf. // the contract method with ID 0x29dcb0cf. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function deadline() returns(uint256) // Solidity: function deadline() returns(uint256)
func (crowdsale *Crowdsale) PackDeadline() []byte { func (crowdsale *Crowdsale) PackDeadline() []byte {
@ -137,6 +168,15 @@ func (crowdsale *Crowdsale) PackDeadline() []byte {
return enc return enc
} }
// TryPackDeadline is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x29dcb0cf. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function deadline() returns(uint256)
func (crowdsale *Crowdsale) TryPackDeadline() ([]byte, error) {
return crowdsale.abi.Pack("deadline")
}
// UnpackDeadline is the Go binding that unpacks the parameters returned // UnpackDeadline is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x29dcb0cf. // from invoking the contract method with ID 0x29dcb0cf.
// //
@ -147,11 +187,12 @@ func (crowdsale *Crowdsale) UnpackDeadline(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackFunders is the Go binding used to pack the parameters required for calling // PackFunders is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xdc0d3dff. // the contract method with ID 0xdc0d3dff. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function funders(uint256 ) returns(address addr, uint256 amount) // Solidity: function funders(uint256 ) returns(address addr, uint256 amount)
func (crowdsale *Crowdsale) PackFunders(arg0 *big.Int) []byte { func (crowdsale *Crowdsale) PackFunders(arg0 *big.Int) []byte {
@ -162,6 +203,15 @@ func (crowdsale *Crowdsale) PackFunders(arg0 *big.Int) []byte {
return enc return enc
} }
// TryPackFunders is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xdc0d3dff. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function funders(uint256 ) returns(address addr, uint256 amount)
func (crowdsale *Crowdsale) TryPackFunders(arg0 *big.Int) ([]byte, error) {
return crowdsale.abi.Pack("funders", arg0)
}
// FundersOutput serves as a container for the return parameters of contract // FundersOutput serves as a container for the return parameters of contract
// method Funders. // method Funders.
type FundersOutput struct { type FundersOutput struct {
@ -181,12 +231,12 @@ func (crowdsale *Crowdsale) UnpackFunders(data []byte) (FundersOutput, error) {
} }
outstruct.Addr = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) outstruct.Addr = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
return *outstruct, err return *outstruct, nil
} }
// PackFundingGoal is the Go binding used to pack the parameters required for calling // PackFundingGoal is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x7a3a0e84. // the contract method with ID 0x7a3a0e84. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function fundingGoal() returns(uint256) // Solidity: function fundingGoal() returns(uint256)
func (crowdsale *Crowdsale) PackFundingGoal() []byte { func (crowdsale *Crowdsale) PackFundingGoal() []byte {
@ -197,6 +247,15 @@ func (crowdsale *Crowdsale) PackFundingGoal() []byte {
return enc return enc
} }
// TryPackFundingGoal is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x7a3a0e84. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function fundingGoal() returns(uint256)
func (crowdsale *Crowdsale) TryPackFundingGoal() ([]byte, error) {
return crowdsale.abi.Pack("fundingGoal")
}
// UnpackFundingGoal is the Go binding that unpacks the parameters returned // UnpackFundingGoal is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x7a3a0e84. // from invoking the contract method with ID 0x7a3a0e84.
// //
@ -207,11 +266,12 @@ func (crowdsale *Crowdsale) UnpackFundingGoal(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackPrice is the Go binding used to pack the parameters required for calling // PackPrice is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xa035b1fe. // the contract method with ID 0xa035b1fe. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function price() returns(uint256) // Solidity: function price() returns(uint256)
func (crowdsale *Crowdsale) PackPrice() []byte { func (crowdsale *Crowdsale) PackPrice() []byte {
@ -222,6 +282,15 @@ func (crowdsale *Crowdsale) PackPrice() []byte {
return enc return enc
} }
// TryPackPrice is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xa035b1fe. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function price() returns(uint256)
func (crowdsale *Crowdsale) TryPackPrice() ([]byte, error) {
return crowdsale.abi.Pack("price")
}
// UnpackPrice is the Go binding that unpacks the parameters returned // UnpackPrice is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xa035b1fe. // from invoking the contract method with ID 0xa035b1fe.
// //
@ -232,11 +301,12 @@ func (crowdsale *Crowdsale) UnpackPrice(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackTokenReward is the Go binding used to pack the parameters required for calling // PackTokenReward is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x6e66f6e9. // the contract method with ID 0x6e66f6e9. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function tokenReward() returns(address) // Solidity: function tokenReward() returns(address)
func (crowdsale *Crowdsale) PackTokenReward() []byte { func (crowdsale *Crowdsale) PackTokenReward() []byte {
@ -247,6 +317,15 @@ func (crowdsale *Crowdsale) PackTokenReward() []byte {
return enc return enc
} }
// TryPackTokenReward is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x6e66f6e9. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function tokenReward() returns(address)
func (crowdsale *Crowdsale) TryPackTokenReward() ([]byte, error) {
return crowdsale.abi.Pack("tokenReward")
}
// UnpackTokenReward is the Go binding that unpacks the parameters returned // UnpackTokenReward is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x6e66f6e9. // from invoking the contract method with ID 0x6e66f6e9.
// //
@ -257,7 +336,7 @@ func (crowdsale *Crowdsale) UnpackTokenReward(data []byte) (common.Address, erro
return *new(common.Address), err return *new(common.Address), err
} }
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err return out0, nil
} }
// CrowdsaleFundTransfer represents a FundTransfer event raised by the Crowdsale contract. // CrowdsaleFundTransfer represents a FundTransfer event raised by the Crowdsale contract.

View file

@ -64,7 +64,8 @@ func (dAO *DAO) PackConstructor(minimumQuorumForProposals *big.Int, minutesForDe
} }
// PackChangeMembership is the Go binding used to pack the parameters required for calling // PackChangeMembership is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x9644fcbd. // the contract method with ID 0x9644fcbd. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function changeMembership(address targetMember, bool canVote, string memberName) returns() // Solidity: function changeMembership(address targetMember, bool canVote, string memberName) returns()
func (dAO *DAO) PackChangeMembership(targetMember common.Address, canVote bool, memberName string) []byte { func (dAO *DAO) PackChangeMembership(targetMember common.Address, canVote bool, memberName string) []byte {
@ -75,8 +76,18 @@ func (dAO *DAO) PackChangeMembership(targetMember common.Address, canVote bool,
return enc return enc
} }
// TryPackChangeMembership is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x9644fcbd. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function changeMembership(address targetMember, bool canVote, string memberName) returns()
func (dAO *DAO) TryPackChangeMembership(targetMember common.Address, canVote bool, memberName string) ([]byte, error) {
return dAO.abi.Pack("changeMembership", targetMember, canVote, memberName)
}
// PackChangeVotingRules is the Go binding used to pack the parameters required for calling // PackChangeVotingRules is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xbcca1fd3. // the contract method with ID 0xbcca1fd3. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function changeVotingRules(uint256 minimumQuorumForProposals, uint256 minutesForDebate, int256 marginOfVotesForMajority) returns() // Solidity: function changeVotingRules(uint256 minimumQuorumForProposals, uint256 minutesForDebate, int256 marginOfVotesForMajority) returns()
func (dAO *DAO) PackChangeVotingRules(minimumQuorumForProposals *big.Int, minutesForDebate *big.Int, marginOfVotesForMajority *big.Int) []byte { func (dAO *DAO) PackChangeVotingRules(minimumQuorumForProposals *big.Int, minutesForDebate *big.Int, marginOfVotesForMajority *big.Int) []byte {
@ -87,8 +98,18 @@ func (dAO *DAO) PackChangeVotingRules(minimumQuorumForProposals *big.Int, minute
return enc return enc
} }
// TryPackChangeVotingRules is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xbcca1fd3. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function changeVotingRules(uint256 minimumQuorumForProposals, uint256 minutesForDebate, int256 marginOfVotesForMajority) returns()
func (dAO *DAO) TryPackChangeVotingRules(minimumQuorumForProposals *big.Int, minutesForDebate *big.Int, marginOfVotesForMajority *big.Int) ([]byte, error) {
return dAO.abi.Pack("changeVotingRules", minimumQuorumForProposals, minutesForDebate, marginOfVotesForMajority)
}
// PackCheckProposalCode is the Go binding used to pack the parameters required for calling // PackCheckProposalCode is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xeceb2945. // the contract method with ID 0xeceb2945. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function checkProposalCode(uint256 proposalNumber, address beneficiary, uint256 etherAmount, bytes transactionBytecode) returns(bool codeChecksOut) // Solidity: function checkProposalCode(uint256 proposalNumber, address beneficiary, uint256 etherAmount, bytes transactionBytecode) returns(bool codeChecksOut)
func (dAO *DAO) PackCheckProposalCode(proposalNumber *big.Int, beneficiary common.Address, etherAmount *big.Int, transactionBytecode []byte) []byte { func (dAO *DAO) PackCheckProposalCode(proposalNumber *big.Int, beneficiary common.Address, etherAmount *big.Int, transactionBytecode []byte) []byte {
@ -99,6 +120,15 @@ func (dAO *DAO) PackCheckProposalCode(proposalNumber *big.Int, beneficiary commo
return enc return enc
} }
// TryPackCheckProposalCode is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xeceb2945. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function checkProposalCode(uint256 proposalNumber, address beneficiary, uint256 etherAmount, bytes transactionBytecode) returns(bool codeChecksOut)
func (dAO *DAO) TryPackCheckProposalCode(proposalNumber *big.Int, beneficiary common.Address, etherAmount *big.Int, transactionBytecode []byte) ([]byte, error) {
return dAO.abi.Pack("checkProposalCode", proposalNumber, beneficiary, etherAmount, transactionBytecode)
}
// UnpackCheckProposalCode is the Go binding that unpacks the parameters returned // UnpackCheckProposalCode is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xeceb2945. // from invoking the contract method with ID 0xeceb2945.
// //
@ -109,11 +139,12 @@ func (dAO *DAO) UnpackCheckProposalCode(data []byte) (bool, error) {
return *new(bool), err return *new(bool), err
} }
out0 := *abi.ConvertType(out[0], new(bool)).(*bool) out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err return out0, nil
} }
// PackDebatingPeriodInMinutes is the Go binding used to pack the parameters required for calling // PackDebatingPeriodInMinutes is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x69bd3436. // the contract method with ID 0x69bd3436. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function debatingPeriodInMinutes() returns(uint256) // Solidity: function debatingPeriodInMinutes() returns(uint256)
func (dAO *DAO) PackDebatingPeriodInMinutes() []byte { func (dAO *DAO) PackDebatingPeriodInMinutes() []byte {
@ -124,6 +155,15 @@ func (dAO *DAO) PackDebatingPeriodInMinutes() []byte {
return enc return enc
} }
// TryPackDebatingPeriodInMinutes is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x69bd3436. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function debatingPeriodInMinutes() returns(uint256)
func (dAO *DAO) TryPackDebatingPeriodInMinutes() ([]byte, error) {
return dAO.abi.Pack("debatingPeriodInMinutes")
}
// UnpackDebatingPeriodInMinutes is the Go binding that unpacks the parameters returned // UnpackDebatingPeriodInMinutes is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x69bd3436. // from invoking the contract method with ID 0x69bd3436.
// //
@ -134,11 +174,12 @@ func (dAO *DAO) UnpackDebatingPeriodInMinutes(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackExecuteProposal is the Go binding used to pack the parameters required for calling // PackExecuteProposal is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x237e9492. // the contract method with ID 0x237e9492. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function executeProposal(uint256 proposalNumber, bytes transactionBytecode) returns(int256 result) // Solidity: function executeProposal(uint256 proposalNumber, bytes transactionBytecode) returns(int256 result)
func (dAO *DAO) PackExecuteProposal(proposalNumber *big.Int, transactionBytecode []byte) []byte { func (dAO *DAO) PackExecuteProposal(proposalNumber *big.Int, transactionBytecode []byte) []byte {
@ -149,6 +190,15 @@ func (dAO *DAO) PackExecuteProposal(proposalNumber *big.Int, transactionBytecode
return enc return enc
} }
// TryPackExecuteProposal is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x237e9492. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function executeProposal(uint256 proposalNumber, bytes transactionBytecode) returns(int256 result)
func (dAO *DAO) TryPackExecuteProposal(proposalNumber *big.Int, transactionBytecode []byte) ([]byte, error) {
return dAO.abi.Pack("executeProposal", proposalNumber, transactionBytecode)
}
// UnpackExecuteProposal is the Go binding that unpacks the parameters returned // UnpackExecuteProposal is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x237e9492. // from invoking the contract method with ID 0x237e9492.
// //
@ -159,11 +209,12 @@ func (dAO *DAO) UnpackExecuteProposal(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackMajorityMargin is the Go binding used to pack the parameters required for calling // PackMajorityMargin is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xaa02a90f. // the contract method with ID 0xaa02a90f. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function majorityMargin() returns(int256) // Solidity: function majorityMargin() returns(int256)
func (dAO *DAO) PackMajorityMargin() []byte { func (dAO *DAO) PackMajorityMargin() []byte {
@ -174,6 +225,15 @@ func (dAO *DAO) PackMajorityMargin() []byte {
return enc return enc
} }
// TryPackMajorityMargin is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xaa02a90f. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function majorityMargin() returns(int256)
func (dAO *DAO) TryPackMajorityMargin() ([]byte, error) {
return dAO.abi.Pack("majorityMargin")
}
// UnpackMajorityMargin is the Go binding that unpacks the parameters returned // UnpackMajorityMargin is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xaa02a90f. // from invoking the contract method with ID 0xaa02a90f.
// //
@ -184,11 +244,12 @@ func (dAO *DAO) UnpackMajorityMargin(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackMemberId is the Go binding used to pack the parameters required for calling // PackMemberId is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x39106821. // the contract method with ID 0x39106821. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function memberId(address ) returns(uint256) // Solidity: function memberId(address ) returns(uint256)
func (dAO *DAO) PackMemberId(arg0 common.Address) []byte { func (dAO *DAO) PackMemberId(arg0 common.Address) []byte {
@ -199,6 +260,15 @@ func (dAO *DAO) PackMemberId(arg0 common.Address) []byte {
return enc return enc
} }
// TryPackMemberId is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x39106821. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function memberId(address ) returns(uint256)
func (dAO *DAO) TryPackMemberId(arg0 common.Address) ([]byte, error) {
return dAO.abi.Pack("memberId", arg0)
}
// UnpackMemberId is the Go binding that unpacks the parameters returned // UnpackMemberId is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x39106821. // from invoking the contract method with ID 0x39106821.
// //
@ -209,11 +279,12 @@ func (dAO *DAO) UnpackMemberId(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackMembers is the Go binding used to pack the parameters required for calling // PackMembers is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x5daf08ca. // the contract method with ID 0x5daf08ca. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function members(uint256 ) returns(address member, bool canVote, string name, uint256 memberSince) // Solidity: function members(uint256 ) returns(address member, bool canVote, string name, uint256 memberSince)
func (dAO *DAO) PackMembers(arg0 *big.Int) []byte { func (dAO *DAO) PackMembers(arg0 *big.Int) []byte {
@ -224,6 +295,15 @@ func (dAO *DAO) PackMembers(arg0 *big.Int) []byte {
return enc return enc
} }
// TryPackMembers is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x5daf08ca. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function members(uint256 ) returns(address member, bool canVote, string name, uint256 memberSince)
func (dAO *DAO) TryPackMembers(arg0 *big.Int) ([]byte, error) {
return dAO.abi.Pack("members", arg0)
}
// MembersOutput serves as a container for the return parameters of contract // MembersOutput serves as a container for the return parameters of contract
// method Members. // method Members.
type MembersOutput struct { type MembersOutput struct {
@ -247,12 +327,12 @@ func (dAO *DAO) UnpackMembers(data []byte) (MembersOutput, error) {
outstruct.CanVote = *abi.ConvertType(out[1], new(bool)).(*bool) outstruct.CanVote = *abi.ConvertType(out[1], new(bool)).(*bool)
outstruct.Name = *abi.ConvertType(out[2], new(string)).(*string) outstruct.Name = *abi.ConvertType(out[2], new(string)).(*string)
outstruct.MemberSince = abi.ConvertType(out[3], new(big.Int)).(*big.Int) outstruct.MemberSince = abi.ConvertType(out[3], new(big.Int)).(*big.Int)
return *outstruct, err return *outstruct, nil
} }
// PackMinimumQuorum is the Go binding used to pack the parameters required for calling // PackMinimumQuorum is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x8160f0b5. // the contract method with ID 0x8160f0b5. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function minimumQuorum() returns(uint256) // Solidity: function minimumQuorum() returns(uint256)
func (dAO *DAO) PackMinimumQuorum() []byte { func (dAO *DAO) PackMinimumQuorum() []byte {
@ -263,6 +343,15 @@ func (dAO *DAO) PackMinimumQuorum() []byte {
return enc return enc
} }
// TryPackMinimumQuorum is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x8160f0b5. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function minimumQuorum() returns(uint256)
func (dAO *DAO) TryPackMinimumQuorum() ([]byte, error) {
return dAO.abi.Pack("minimumQuorum")
}
// UnpackMinimumQuorum is the Go binding that unpacks the parameters returned // UnpackMinimumQuorum is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x8160f0b5. // from invoking the contract method with ID 0x8160f0b5.
// //
@ -273,11 +362,12 @@ func (dAO *DAO) UnpackMinimumQuorum(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackNewProposal is the Go binding used to pack the parameters required for calling // PackNewProposal is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xb1050da5. // the contract method with ID 0xb1050da5. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function newProposal(address beneficiary, uint256 etherAmount, string JobDescription, bytes transactionBytecode) returns(uint256 proposalID) // Solidity: function newProposal(address beneficiary, uint256 etherAmount, string JobDescription, bytes transactionBytecode) returns(uint256 proposalID)
func (dAO *DAO) PackNewProposal(beneficiary common.Address, etherAmount *big.Int, jobDescription string, transactionBytecode []byte) []byte { func (dAO *DAO) PackNewProposal(beneficiary common.Address, etherAmount *big.Int, jobDescription string, transactionBytecode []byte) []byte {
@ -288,6 +378,15 @@ func (dAO *DAO) PackNewProposal(beneficiary common.Address, etherAmount *big.Int
return enc return enc
} }
// TryPackNewProposal is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xb1050da5. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function newProposal(address beneficiary, uint256 etherAmount, string JobDescription, bytes transactionBytecode) returns(uint256 proposalID)
func (dAO *DAO) TryPackNewProposal(beneficiary common.Address, etherAmount *big.Int, jobDescription string, transactionBytecode []byte) ([]byte, error) {
return dAO.abi.Pack("newProposal", beneficiary, etherAmount, jobDescription, transactionBytecode)
}
// UnpackNewProposal is the Go binding that unpacks the parameters returned // UnpackNewProposal is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xb1050da5. // from invoking the contract method with ID 0xb1050da5.
// //
@ -298,11 +397,12 @@ func (dAO *DAO) UnpackNewProposal(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackNumProposals is the Go binding used to pack the parameters required for calling // PackNumProposals is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x400e3949. // the contract method with ID 0x400e3949. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function numProposals() returns(uint256) // Solidity: function numProposals() returns(uint256)
func (dAO *DAO) PackNumProposals() []byte { func (dAO *DAO) PackNumProposals() []byte {
@ -313,6 +413,15 @@ func (dAO *DAO) PackNumProposals() []byte {
return enc return enc
} }
// TryPackNumProposals is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x400e3949. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function numProposals() returns(uint256)
func (dAO *DAO) TryPackNumProposals() ([]byte, error) {
return dAO.abi.Pack("numProposals")
}
// UnpackNumProposals is the Go binding that unpacks the parameters returned // UnpackNumProposals is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x400e3949. // from invoking the contract method with ID 0x400e3949.
// //
@ -323,11 +432,12 @@ func (dAO *DAO) UnpackNumProposals(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackOwner is the Go binding used to pack the parameters required for calling // PackOwner is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x8da5cb5b. // the contract method with ID 0x8da5cb5b. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function owner() returns(address) // Solidity: function owner() returns(address)
func (dAO *DAO) PackOwner() []byte { func (dAO *DAO) PackOwner() []byte {
@ -338,6 +448,15 @@ func (dAO *DAO) PackOwner() []byte {
return enc return enc
} }
// TryPackOwner is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x8da5cb5b. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function owner() returns(address)
func (dAO *DAO) TryPackOwner() ([]byte, error) {
return dAO.abi.Pack("owner")
}
// UnpackOwner is the Go binding that unpacks the parameters returned // UnpackOwner is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x8da5cb5b. // from invoking the contract method with ID 0x8da5cb5b.
// //
@ -348,11 +467,12 @@ func (dAO *DAO) UnpackOwner(data []byte) (common.Address, error) {
return *new(common.Address), err return *new(common.Address), err
} }
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err return out0, nil
} }
// PackProposals is the Go binding used to pack the parameters required for calling // PackProposals is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x013cf08b. // the contract method with ID 0x013cf08b. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function proposals(uint256 ) returns(address recipient, uint256 amount, string description, uint256 votingDeadline, bool executed, bool proposalPassed, uint256 numberOfVotes, int256 currentResult, bytes32 proposalHash) // Solidity: function proposals(uint256 ) returns(address recipient, uint256 amount, string description, uint256 votingDeadline, bool executed, bool proposalPassed, uint256 numberOfVotes, int256 currentResult, bytes32 proposalHash)
func (dAO *DAO) PackProposals(arg0 *big.Int) []byte { func (dAO *DAO) PackProposals(arg0 *big.Int) []byte {
@ -363,6 +483,15 @@ func (dAO *DAO) PackProposals(arg0 *big.Int) []byte {
return enc return enc
} }
// TryPackProposals is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x013cf08b. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function proposals(uint256 ) returns(address recipient, uint256 amount, string description, uint256 votingDeadline, bool executed, bool proposalPassed, uint256 numberOfVotes, int256 currentResult, bytes32 proposalHash)
func (dAO *DAO) TryPackProposals(arg0 *big.Int) ([]byte, error) {
return dAO.abi.Pack("proposals", arg0)
}
// ProposalsOutput serves as a container for the return parameters of contract // ProposalsOutput serves as a container for the return parameters of contract
// method Proposals. // method Proposals.
type ProposalsOutput struct { type ProposalsOutput struct {
@ -396,12 +525,12 @@ func (dAO *DAO) UnpackProposals(data []byte) (ProposalsOutput, error) {
outstruct.NumberOfVotes = abi.ConvertType(out[6], new(big.Int)).(*big.Int) outstruct.NumberOfVotes = abi.ConvertType(out[6], new(big.Int)).(*big.Int)
outstruct.CurrentResult = abi.ConvertType(out[7], new(big.Int)).(*big.Int) outstruct.CurrentResult = abi.ConvertType(out[7], new(big.Int)).(*big.Int)
outstruct.ProposalHash = *abi.ConvertType(out[8], new([32]byte)).(*[32]byte) outstruct.ProposalHash = *abi.ConvertType(out[8], new([32]byte)).(*[32]byte)
return *outstruct, err return *outstruct, nil
} }
// PackTransferOwnership is the Go binding used to pack the parameters required for calling // PackTransferOwnership is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xf2fde38b. // the contract method with ID 0xf2fde38b. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function transferOwnership(address newOwner) returns() // Solidity: function transferOwnership(address newOwner) returns()
func (dAO *DAO) PackTransferOwnership(newOwner common.Address) []byte { func (dAO *DAO) PackTransferOwnership(newOwner common.Address) []byte {
@ -412,8 +541,18 @@ func (dAO *DAO) PackTransferOwnership(newOwner common.Address) []byte {
return enc return enc
} }
// TryPackTransferOwnership is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xf2fde38b. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (dAO *DAO) TryPackTransferOwnership(newOwner common.Address) ([]byte, error) {
return dAO.abi.Pack("transferOwnership", newOwner)
}
// PackVote is the Go binding used to pack the parameters required for calling // PackVote is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd3c0715b. // the contract method with ID 0xd3c0715b. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function vote(uint256 proposalNumber, bool supportsProposal, string justificationText) returns(uint256 voteID) // Solidity: function vote(uint256 proposalNumber, bool supportsProposal, string justificationText) returns(uint256 voteID)
func (dAO *DAO) PackVote(proposalNumber *big.Int, supportsProposal bool, justificationText string) []byte { func (dAO *DAO) PackVote(proposalNumber *big.Int, supportsProposal bool, justificationText string) []byte {
@ -424,6 +563,15 @@ func (dAO *DAO) PackVote(proposalNumber *big.Int, supportsProposal bool, justifi
return enc return enc
} }
// TryPackVote is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd3c0715b. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function vote(uint256 proposalNumber, bool supportsProposal, string justificationText) returns(uint256 voteID)
func (dAO *DAO) TryPackVote(proposalNumber *big.Int, supportsProposal bool, justificationText string) ([]byte, error) {
return dAO.abi.Pack("vote", proposalNumber, supportsProposal, justificationText)
}
// UnpackVote is the Go binding that unpacks the parameters returned // UnpackVote is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xd3c0715b. // from invoking the contract method with ID 0xd3c0715b.
// //
@ -434,7 +582,7 @@ func (dAO *DAO) UnpackVote(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// DAOChangeOfRules represents a ChangeOfRules event raised by the DAO contract. // DAOChangeOfRules represents a ChangeOfRules event raised by the DAO contract.

View file

@ -52,7 +52,8 @@ func (c *DeeplyNestedArray) Instance(backend bind.ContractBackend, addr common.A
} }
// PackDeepUint64Array is the Go binding used to pack the parameters required for calling // PackDeepUint64Array is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x98ed1856. // the contract method with ID 0x98ed1856. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function deepUint64Array(uint256 , uint256 , uint256 ) view returns(uint64) // Solidity: function deepUint64Array(uint256 , uint256 , uint256 ) view returns(uint64)
func (deeplyNestedArray *DeeplyNestedArray) PackDeepUint64Array(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int) []byte { func (deeplyNestedArray *DeeplyNestedArray) PackDeepUint64Array(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int) []byte {
@ -63,6 +64,15 @@ func (deeplyNestedArray *DeeplyNestedArray) PackDeepUint64Array(arg0 *big.Int, a
return enc return enc
} }
// TryPackDeepUint64Array is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x98ed1856. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function deepUint64Array(uint256 , uint256 , uint256 ) view returns(uint64)
func (deeplyNestedArray *DeeplyNestedArray) TryPackDeepUint64Array(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int) ([]byte, error) {
return deeplyNestedArray.abi.Pack("deepUint64Array", arg0, arg1, arg2)
}
// UnpackDeepUint64Array is the Go binding that unpacks the parameters returned // UnpackDeepUint64Array is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x98ed1856. // from invoking the contract method with ID 0x98ed1856.
// //
@ -73,11 +83,12 @@ func (deeplyNestedArray *DeeplyNestedArray) UnpackDeepUint64Array(data []byte) (
return *new(uint64), err return *new(uint64), err
} }
out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err return out0, nil
} }
// PackRetrieveDeepArray is the Go binding used to pack the parameters required for calling // PackRetrieveDeepArray is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x8ed4573a. // the contract method with ID 0x8ed4573a. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function retrieveDeepArray() view returns(uint64[3][4][5]) // Solidity: function retrieveDeepArray() view returns(uint64[3][4][5])
func (deeplyNestedArray *DeeplyNestedArray) PackRetrieveDeepArray() []byte { func (deeplyNestedArray *DeeplyNestedArray) PackRetrieveDeepArray() []byte {
@ -88,6 +99,15 @@ func (deeplyNestedArray *DeeplyNestedArray) PackRetrieveDeepArray() []byte {
return enc return enc
} }
// TryPackRetrieveDeepArray is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x8ed4573a. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function retrieveDeepArray() view returns(uint64[3][4][5])
func (deeplyNestedArray *DeeplyNestedArray) TryPackRetrieveDeepArray() ([]byte, error) {
return deeplyNestedArray.abi.Pack("retrieveDeepArray")
}
// UnpackRetrieveDeepArray is the Go binding that unpacks the parameters returned // UnpackRetrieveDeepArray is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x8ed4573a. // from invoking the contract method with ID 0x8ed4573a.
// //
@ -98,11 +118,12 @@ func (deeplyNestedArray *DeeplyNestedArray) UnpackRetrieveDeepArray(data []byte)
return *new([5][4][3]uint64), err return *new([5][4][3]uint64), err
} }
out0 := *abi.ConvertType(out[0], new([5][4][3]uint64)).(*[5][4][3]uint64) out0 := *abi.ConvertType(out[0], new([5][4][3]uint64)).(*[5][4][3]uint64)
return out0, err return out0, nil
} }
// PackStoreDeepUintArray is the Go binding used to pack the parameters required for calling // PackStoreDeepUintArray is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x34424855. // the contract method with ID 0x34424855. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function storeDeepUintArray(uint64[3][4][5] arr) returns() // Solidity: function storeDeepUintArray(uint64[3][4][5] arr) returns()
func (deeplyNestedArray *DeeplyNestedArray) PackStoreDeepUintArray(arr [5][4][3]uint64) []byte { func (deeplyNestedArray *DeeplyNestedArray) PackStoreDeepUintArray(arr [5][4][3]uint64) []byte {
@ -112,3 +133,12 @@ func (deeplyNestedArray *DeeplyNestedArray) PackStoreDeepUintArray(arr [5][4][3]
} }
return enc return enc
} }
// TryPackStoreDeepUintArray is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x34424855. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function storeDeepUintArray(uint64[3][4][5] arr) returns()
func (deeplyNestedArray *DeeplyNestedArray) TryPackStoreDeepUintArray(arr [5][4][3]uint64) ([]byte, error) {
return deeplyNestedArray.abi.Pack("storeDeepUintArray", arr)
}

View file

@ -52,7 +52,8 @@ func (c *Getter) Instance(backend bind.ContractBackend, addr common.Address) *bi
} }
// PackGetter is the Go binding used to pack the parameters required for calling // PackGetter is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x993a04b7. // the contract method with ID 0x993a04b7. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function getter() returns(string, int256, bytes32) // Solidity: function getter() returns(string, int256, bytes32)
func (getter *Getter) PackGetter() []byte { func (getter *Getter) PackGetter() []byte {
@ -63,6 +64,15 @@ func (getter *Getter) PackGetter() []byte {
return enc return enc
} }
// TryPackGetter is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x993a04b7. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function getter() returns(string, int256, bytes32)
func (getter *Getter) TryPackGetter() ([]byte, error) {
return getter.abi.Pack("getter")
}
// GetterOutput serves as a container for the return parameters of contract // GetterOutput serves as a container for the return parameters of contract
// method Getter. // method Getter.
type GetterOutput struct { type GetterOutput struct {
@ -84,6 +94,5 @@ func (getter *Getter) UnpackGetter(data []byte) (GetterOutput, error) {
outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string) outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
outstruct.Arg2 = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte) outstruct.Arg2 = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte)
return *outstruct, err return *outstruct, nil
} }

View file

@ -52,7 +52,8 @@ func (c *IdentifierCollision) Instance(backend bind.ContractBackend, addr common
} }
// PackMyVar is the Go binding used to pack the parameters required for calling // PackMyVar is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x4ef1f0ad. // the contract method with ID 0x4ef1f0ad. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function MyVar() view returns(uint256) // Solidity: function MyVar() view returns(uint256)
func (identifierCollision *IdentifierCollision) PackMyVar() []byte { func (identifierCollision *IdentifierCollision) PackMyVar() []byte {
@ -63,6 +64,15 @@ func (identifierCollision *IdentifierCollision) PackMyVar() []byte {
return enc return enc
} }
// TryPackMyVar is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x4ef1f0ad. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function MyVar() view returns(uint256)
func (identifierCollision *IdentifierCollision) TryPackMyVar() ([]byte, error) {
return identifierCollision.abi.Pack("MyVar")
}
// UnpackMyVar is the Go binding that unpacks the parameters returned // UnpackMyVar is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x4ef1f0ad. // from invoking the contract method with ID 0x4ef1f0ad.
// //
@ -73,11 +83,12 @@ func (identifierCollision *IdentifierCollision) UnpackMyVar(data []byte) (*big.I
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackPubVar is the Go binding used to pack the parameters required for calling // PackPubVar is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x01ad4d87. // the contract method with ID 0x01ad4d87. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function _myVar() view returns(uint256) // Solidity: function _myVar() view returns(uint256)
func (identifierCollision *IdentifierCollision) PackPubVar() []byte { func (identifierCollision *IdentifierCollision) PackPubVar() []byte {
@ -88,6 +99,15 @@ func (identifierCollision *IdentifierCollision) PackPubVar() []byte {
return enc return enc
} }
// TryPackPubVar is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x01ad4d87. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function _myVar() view returns(uint256)
func (identifierCollision *IdentifierCollision) TryPackPubVar() ([]byte, error) {
return identifierCollision.abi.Pack("_myVar")
}
// UnpackPubVar is the Go binding that unpacks the parameters returned // UnpackPubVar is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x01ad4d87. // from invoking the contract method with ID 0x01ad4d87.
// //
@ -98,5 +118,5 @@ func (identifierCollision *IdentifierCollision) UnpackPubVar(data []byte) (*big.
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }

View file

@ -51,7 +51,8 @@ func (c *InputChecker) Instance(backend bind.ContractBackend, addr common.Addres
} }
// PackAnonInput is the Go binding used to pack the parameters required for calling // PackAnonInput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x3e708e82. // the contract method with ID 0x3e708e82. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function anonInput(string ) returns() // Solidity: function anonInput(string ) returns()
func (inputChecker *InputChecker) PackAnonInput(arg0 string) []byte { func (inputChecker *InputChecker) PackAnonInput(arg0 string) []byte {
@ -62,8 +63,18 @@ func (inputChecker *InputChecker) PackAnonInput(arg0 string) []byte {
return enc return enc
} }
// TryPackAnonInput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x3e708e82. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function anonInput(string ) returns()
func (inputChecker *InputChecker) TryPackAnonInput(arg0 string) ([]byte, error) {
return inputChecker.abi.Pack("anonInput", arg0)
}
// PackAnonInputs is the Go binding used to pack the parameters required for calling // PackAnonInputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x28160527. // the contract method with ID 0x28160527. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function anonInputs(string , string ) returns() // Solidity: function anonInputs(string , string ) returns()
func (inputChecker *InputChecker) PackAnonInputs(arg0 string, arg1 string) []byte { func (inputChecker *InputChecker) PackAnonInputs(arg0 string, arg1 string) []byte {
@ -74,8 +85,18 @@ func (inputChecker *InputChecker) PackAnonInputs(arg0 string, arg1 string) []byt
return enc return enc
} }
// TryPackAnonInputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x28160527. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function anonInputs(string , string ) returns()
func (inputChecker *InputChecker) TryPackAnonInputs(arg0 string, arg1 string) ([]byte, error) {
return inputChecker.abi.Pack("anonInputs", arg0, arg1)
}
// PackMixedInputs is the Go binding used to pack the parameters required for calling // PackMixedInputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xc689ebdc. // the contract method with ID 0xc689ebdc. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function mixedInputs(string , string str) returns() // Solidity: function mixedInputs(string , string str) returns()
func (inputChecker *InputChecker) PackMixedInputs(arg0 string, str string) []byte { func (inputChecker *InputChecker) PackMixedInputs(arg0 string, str string) []byte {
@ -86,8 +107,18 @@ func (inputChecker *InputChecker) PackMixedInputs(arg0 string, str string) []byt
return enc return enc
} }
// TryPackMixedInputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xc689ebdc. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function mixedInputs(string , string str) returns()
func (inputChecker *InputChecker) TryPackMixedInputs(arg0 string, str string) ([]byte, error) {
return inputChecker.abi.Pack("mixedInputs", arg0, str)
}
// PackNamedInput is the Go binding used to pack the parameters required for calling // PackNamedInput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x0d402005. // the contract method with ID 0x0d402005. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function namedInput(string str) returns() // Solidity: function namedInput(string str) returns()
func (inputChecker *InputChecker) PackNamedInput(str string) []byte { func (inputChecker *InputChecker) PackNamedInput(str string) []byte {
@ -98,8 +129,18 @@ func (inputChecker *InputChecker) PackNamedInput(str string) []byte {
return enc return enc
} }
// TryPackNamedInput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x0d402005. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function namedInput(string str) returns()
func (inputChecker *InputChecker) TryPackNamedInput(str string) ([]byte, error) {
return inputChecker.abi.Pack("namedInput", str)
}
// PackNamedInputs is the Go binding used to pack the parameters required for calling // PackNamedInputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x63c796ed. // the contract method with ID 0x63c796ed. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function namedInputs(string str1, string str2) returns() // Solidity: function namedInputs(string str1, string str2) returns()
func (inputChecker *InputChecker) PackNamedInputs(str1 string, str2 string) []byte { func (inputChecker *InputChecker) PackNamedInputs(str1 string, str2 string) []byte {
@ -110,8 +151,18 @@ func (inputChecker *InputChecker) PackNamedInputs(str1 string, str2 string) []by
return enc return enc
} }
// TryPackNamedInputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x63c796ed. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function namedInputs(string str1, string str2) returns()
func (inputChecker *InputChecker) TryPackNamedInputs(str1 string, str2 string) ([]byte, error) {
return inputChecker.abi.Pack("namedInputs", str1, str2)
}
// PackNoInput is the Go binding used to pack the parameters required for calling // PackNoInput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x53539029. // the contract method with ID 0x53539029. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function noInput() returns() // Solidity: function noInput() returns()
func (inputChecker *InputChecker) PackNoInput() []byte { func (inputChecker *InputChecker) PackNoInput() []byte {
@ -121,3 +172,12 @@ func (inputChecker *InputChecker) PackNoInput() []byte {
} }
return enc return enc
} }
// TryPackNoInput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x53539029. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function noInput() returns()
func (inputChecker *InputChecker) TryPackNoInput() ([]byte, error) {
return inputChecker.abi.Pack("noInput")
}

View file

@ -64,7 +64,8 @@ func (interactor *Interactor) PackConstructor(str string) []byte {
} }
// PackDeployString is the Go binding used to pack the parameters required for calling // PackDeployString is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x6874e809. // the contract method with ID 0x6874e809. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function deployString() returns(string) // Solidity: function deployString() returns(string)
func (interactor *Interactor) PackDeployString() []byte { func (interactor *Interactor) PackDeployString() []byte {
@ -75,6 +76,15 @@ func (interactor *Interactor) PackDeployString() []byte {
return enc return enc
} }
// TryPackDeployString is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x6874e809. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function deployString() returns(string)
func (interactor *Interactor) TryPackDeployString() ([]byte, error) {
return interactor.abi.Pack("deployString")
}
// UnpackDeployString is the Go binding that unpacks the parameters returned // UnpackDeployString is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x6874e809. // from invoking the contract method with ID 0x6874e809.
// //
@ -85,11 +95,12 @@ func (interactor *Interactor) UnpackDeployString(data []byte) (string, error) {
return *new(string), err return *new(string), err
} }
out0 := *abi.ConvertType(out[0], new(string)).(*string) out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err return out0, nil
} }
// PackTransact is the Go binding used to pack the parameters required for calling // PackTransact is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd736c513. // the contract method with ID 0xd736c513. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function transact(string str) returns() // Solidity: function transact(string str) returns()
func (interactor *Interactor) PackTransact(str string) []byte { func (interactor *Interactor) PackTransact(str string) []byte {
@ -100,8 +111,18 @@ func (interactor *Interactor) PackTransact(str string) []byte {
return enc return enc
} }
// TryPackTransact is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd736c513. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function transact(string str) returns()
func (interactor *Interactor) TryPackTransact(str string) ([]byte, error) {
return interactor.abi.Pack("transact", str)
}
// PackTransactString is the Go binding used to pack the parameters required for calling // PackTransactString is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x0d86a0e1. // the contract method with ID 0x0d86a0e1. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function transactString() returns(string) // Solidity: function transactString() returns(string)
func (interactor *Interactor) PackTransactString() []byte { func (interactor *Interactor) PackTransactString() []byte {
@ -112,6 +133,15 @@ func (interactor *Interactor) PackTransactString() []byte {
return enc return enc
} }
// TryPackTransactString is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x0d86a0e1. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function transactString() returns(string)
func (interactor *Interactor) TryPackTransactString() ([]byte, error) {
return interactor.abi.Pack("transactString")
}
// UnpackTransactString is the Go binding that unpacks the parameters returned // UnpackTransactString is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x0d86a0e1. // from invoking the contract method with ID 0x0d86a0e1.
// //
@ -122,5 +152,5 @@ func (interactor *Interactor) UnpackTransactString(data []byte) (string, error)
return *new(string), err return *new(string), err
} }
out0 := *abi.ConvertType(out[0], new(string)).(*string) out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err return out0, nil
} }

View file

@ -58,7 +58,8 @@ func (c *NameConflict) Instance(backend bind.ContractBackend, addr common.Addres
} }
// PackAddRequest is the Go binding used to pack the parameters required for calling // PackAddRequest is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xcce7b048. // the contract method with ID 0xcce7b048. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function addRequest((bytes,bytes) req) pure returns() // Solidity: function addRequest((bytes,bytes) req) pure returns()
func (nameConflict *NameConflict) PackAddRequest(req Oraclerequest) []byte { func (nameConflict *NameConflict) PackAddRequest(req Oraclerequest) []byte {
@ -69,8 +70,18 @@ func (nameConflict *NameConflict) PackAddRequest(req Oraclerequest) []byte {
return enc return enc
} }
// TryPackAddRequest is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xcce7b048. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function addRequest((bytes,bytes) req) pure returns()
func (nameConflict *NameConflict) TryPackAddRequest(req Oraclerequest) ([]byte, error) {
return nameConflict.abi.Pack("addRequest", req)
}
// PackGetRequest is the Go binding used to pack the parameters required for calling // PackGetRequest is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xc2bb515f. // the contract method with ID 0xc2bb515f. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function getRequest() pure returns((bytes,bytes)) // Solidity: function getRequest() pure returns((bytes,bytes))
func (nameConflict *NameConflict) PackGetRequest() []byte { func (nameConflict *NameConflict) PackGetRequest() []byte {
@ -81,6 +92,15 @@ func (nameConflict *NameConflict) PackGetRequest() []byte {
return enc return enc
} }
// TryPackGetRequest is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xc2bb515f. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function getRequest() pure returns((bytes,bytes))
func (nameConflict *NameConflict) TryPackGetRequest() ([]byte, error) {
return nameConflict.abi.Pack("getRequest")
}
// UnpackGetRequest is the Go binding that unpacks the parameters returned // UnpackGetRequest is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xc2bb515f. // from invoking the contract method with ID 0xc2bb515f.
// //
@ -91,7 +111,7 @@ func (nameConflict *NameConflict) UnpackGetRequest(data []byte) (Oraclerequest,
return *new(Oraclerequest), err return *new(Oraclerequest), err
} }
out0 := *abi.ConvertType(out[0], new(Oraclerequest)).(*Oraclerequest) out0 := *abi.ConvertType(out[0], new(Oraclerequest)).(*Oraclerequest)
return out0, err return out0, nil
} }
// NameConflictLog represents a log event raised by the NameConflict contract. // NameConflictLog represents a log event raised by the NameConflict contract.

View file

@ -52,7 +52,8 @@ func (c *NumericMethodName) Instance(backend bind.ContractBackend, addr common.A
} }
// PackE1test is the Go binding used to pack the parameters required for calling // PackE1test is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xffa02795. // the contract method with ID 0xffa02795. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function _1test() pure returns() // Solidity: function _1test() pure returns()
func (numericMethodName *NumericMethodName) PackE1test() []byte { func (numericMethodName *NumericMethodName) PackE1test() []byte {
@ -63,8 +64,18 @@ func (numericMethodName *NumericMethodName) PackE1test() []byte {
return enc return enc
} }
// TryPackE1test is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xffa02795. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function _1test() pure returns()
func (numericMethodName *NumericMethodName) TryPackE1test() ([]byte, error) {
return numericMethodName.abi.Pack("_1test")
}
// PackE1test0 is the Go binding used to pack the parameters required for calling // PackE1test0 is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd02767c7. // the contract method with ID 0xd02767c7. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function __1test() pure returns() // Solidity: function __1test() pure returns()
func (numericMethodName *NumericMethodName) PackE1test0() []byte { func (numericMethodName *NumericMethodName) PackE1test0() []byte {
@ -75,8 +86,18 @@ func (numericMethodName *NumericMethodName) PackE1test0() []byte {
return enc return enc
} }
// TryPackE1test0 is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd02767c7. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function __1test() pure returns()
func (numericMethodName *NumericMethodName) TryPackE1test0() ([]byte, error) {
return numericMethodName.abi.Pack("__1test")
}
// PackE2test is the Go binding used to pack the parameters required for calling // PackE2test is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x9d993132. // the contract method with ID 0x9d993132. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function __2test() pure returns() // Solidity: function __2test() pure returns()
func (numericMethodName *NumericMethodName) PackE2test() []byte { func (numericMethodName *NumericMethodName) PackE2test() []byte {
@ -87,6 +108,15 @@ func (numericMethodName *NumericMethodName) PackE2test() []byte {
return enc return enc
} }
// TryPackE2test is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x9d993132. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function __2test() pure returns()
func (numericMethodName *NumericMethodName) TryPackE2test() ([]byte, error) {
return numericMethodName.abi.Pack("__2test")
}
// NumericMethodNameE1TestEvent represents a _1TestEvent event raised by the NumericMethodName contract. // NumericMethodNameE1TestEvent represents a _1TestEvent event raised by the NumericMethodName contract.
type NumericMethodNameE1TestEvent struct { type NumericMethodNameE1TestEvent struct {
Param common.Address Param common.Address

View file

@ -51,7 +51,8 @@ func (c *OutputChecker) Instance(backend bind.ContractBackend, addr common.Addre
} }
// PackAnonOutput is the Go binding used to pack the parameters required for calling // PackAnonOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x008bda05. // the contract method with ID 0x008bda05. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function anonOutput() returns(string) // Solidity: function anonOutput() returns(string)
func (outputChecker *OutputChecker) PackAnonOutput() []byte { func (outputChecker *OutputChecker) PackAnonOutput() []byte {
@ -62,6 +63,15 @@ func (outputChecker *OutputChecker) PackAnonOutput() []byte {
return enc return enc
} }
// TryPackAnonOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x008bda05. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function anonOutput() returns(string)
func (outputChecker *OutputChecker) TryPackAnonOutput() ([]byte, error) {
return outputChecker.abi.Pack("anonOutput")
}
// UnpackAnonOutput is the Go binding that unpacks the parameters returned // UnpackAnonOutput is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x008bda05. // from invoking the contract method with ID 0x008bda05.
// //
@ -72,11 +82,12 @@ func (outputChecker *OutputChecker) UnpackAnonOutput(data []byte) (string, error
return *new(string), err return *new(string), err
} }
out0 := *abi.ConvertType(out[0], new(string)).(*string) out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err return out0, nil
} }
// PackAnonOutputs is the Go binding used to pack the parameters required for calling // PackAnonOutputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x3c401115. // the contract method with ID 0x3c401115. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function anonOutputs() returns(string, string) // Solidity: function anonOutputs() returns(string, string)
func (outputChecker *OutputChecker) PackAnonOutputs() []byte { func (outputChecker *OutputChecker) PackAnonOutputs() []byte {
@ -87,6 +98,15 @@ func (outputChecker *OutputChecker) PackAnonOutputs() []byte {
return enc return enc
} }
// TryPackAnonOutputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x3c401115. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function anonOutputs() returns(string, string)
func (outputChecker *OutputChecker) TryPackAnonOutputs() ([]byte, error) {
return outputChecker.abi.Pack("anonOutputs")
}
// AnonOutputsOutput serves as a container for the return parameters of contract // AnonOutputsOutput serves as a container for the return parameters of contract
// method AnonOutputs. // method AnonOutputs.
type AnonOutputsOutput struct { type AnonOutputsOutput struct {
@ -106,12 +126,12 @@ func (outputChecker *OutputChecker) UnpackAnonOutputs(data []byte) (AnonOutputsO
} }
outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string) outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
outstruct.Arg1 = *abi.ConvertType(out[1], new(string)).(*string) outstruct.Arg1 = *abi.ConvertType(out[1], new(string)).(*string)
return *outstruct, err return *outstruct, nil
} }
// PackCollidingOutputs is the Go binding used to pack the parameters required for calling // PackCollidingOutputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xeccbc1ee. // the contract method with ID 0xeccbc1ee. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function collidingOutputs() returns(string str, string Str) // Solidity: function collidingOutputs() returns(string str, string Str)
func (outputChecker *OutputChecker) PackCollidingOutputs() []byte { func (outputChecker *OutputChecker) PackCollidingOutputs() []byte {
@ -122,6 +142,15 @@ func (outputChecker *OutputChecker) PackCollidingOutputs() []byte {
return enc return enc
} }
// TryPackCollidingOutputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xeccbc1ee. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function collidingOutputs() returns(string str, string Str)
func (outputChecker *OutputChecker) TryPackCollidingOutputs() ([]byte, error) {
return outputChecker.abi.Pack("collidingOutputs")
}
// CollidingOutputsOutput serves as a container for the return parameters of contract // CollidingOutputsOutput serves as a container for the return parameters of contract
// method CollidingOutputs. // method CollidingOutputs.
type CollidingOutputsOutput struct { type CollidingOutputsOutput struct {
@ -141,12 +170,12 @@ func (outputChecker *OutputChecker) UnpackCollidingOutputs(data []byte) (Collidi
} }
outstruct.Str = *abi.ConvertType(out[0], new(string)).(*string) outstruct.Str = *abi.ConvertType(out[0], new(string)).(*string)
outstruct.Str0 = *abi.ConvertType(out[1], new(string)).(*string) outstruct.Str0 = *abi.ConvertType(out[1], new(string)).(*string)
return *outstruct, err return *outstruct, nil
} }
// PackMixedOutputs is the Go binding used to pack the parameters required for calling // PackMixedOutputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x21b77b44. // the contract method with ID 0x21b77b44. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function mixedOutputs() returns(string, string str) // Solidity: function mixedOutputs() returns(string, string str)
func (outputChecker *OutputChecker) PackMixedOutputs() []byte { func (outputChecker *OutputChecker) PackMixedOutputs() []byte {
@ -157,6 +186,15 @@ func (outputChecker *OutputChecker) PackMixedOutputs() []byte {
return enc return enc
} }
// TryPackMixedOutputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x21b77b44. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function mixedOutputs() returns(string, string str)
func (outputChecker *OutputChecker) TryPackMixedOutputs() ([]byte, error) {
return outputChecker.abi.Pack("mixedOutputs")
}
// MixedOutputsOutput serves as a container for the return parameters of contract // MixedOutputsOutput serves as a container for the return parameters of contract
// method MixedOutputs. // method MixedOutputs.
type MixedOutputsOutput struct { type MixedOutputsOutput struct {
@ -176,12 +214,12 @@ func (outputChecker *OutputChecker) UnpackMixedOutputs(data []byte) (MixedOutput
} }
outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string) outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
outstruct.Str = *abi.ConvertType(out[1], new(string)).(*string) outstruct.Str = *abi.ConvertType(out[1], new(string)).(*string)
return *outstruct, err return *outstruct, nil
} }
// PackNamedOutput is the Go binding used to pack the parameters required for calling // PackNamedOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x5e632bd5. // the contract method with ID 0x5e632bd5. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function namedOutput() returns(string str) // Solidity: function namedOutput() returns(string str)
func (outputChecker *OutputChecker) PackNamedOutput() []byte { func (outputChecker *OutputChecker) PackNamedOutput() []byte {
@ -192,6 +230,15 @@ func (outputChecker *OutputChecker) PackNamedOutput() []byte {
return enc return enc
} }
// TryPackNamedOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x5e632bd5. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function namedOutput() returns(string str)
func (outputChecker *OutputChecker) TryPackNamedOutput() ([]byte, error) {
return outputChecker.abi.Pack("namedOutput")
}
// UnpackNamedOutput is the Go binding that unpacks the parameters returned // UnpackNamedOutput is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x5e632bd5. // from invoking the contract method with ID 0x5e632bd5.
// //
@ -202,11 +249,12 @@ func (outputChecker *OutputChecker) UnpackNamedOutput(data []byte) (string, erro
return *new(string), err return *new(string), err
} }
out0 := *abi.ConvertType(out[0], new(string)).(*string) out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err return out0, nil
} }
// PackNamedOutputs is the Go binding used to pack the parameters required for calling // PackNamedOutputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x7970a189. // the contract method with ID 0x7970a189. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function namedOutputs() returns(string str1, string str2) // Solidity: function namedOutputs() returns(string str1, string str2)
func (outputChecker *OutputChecker) PackNamedOutputs() []byte { func (outputChecker *OutputChecker) PackNamedOutputs() []byte {
@ -217,6 +265,15 @@ func (outputChecker *OutputChecker) PackNamedOutputs() []byte {
return enc return enc
} }
// TryPackNamedOutputs is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x7970a189. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function namedOutputs() returns(string str1, string str2)
func (outputChecker *OutputChecker) TryPackNamedOutputs() ([]byte, error) {
return outputChecker.abi.Pack("namedOutputs")
}
// NamedOutputsOutput serves as a container for the return parameters of contract // NamedOutputsOutput serves as a container for the return parameters of contract
// method NamedOutputs. // method NamedOutputs.
type NamedOutputsOutput struct { type NamedOutputsOutput struct {
@ -236,12 +293,12 @@ func (outputChecker *OutputChecker) UnpackNamedOutputs(data []byte) (NamedOutput
} }
outstruct.Str1 = *abi.ConvertType(out[0], new(string)).(*string) outstruct.Str1 = *abi.ConvertType(out[0], new(string)).(*string)
outstruct.Str2 = *abi.ConvertType(out[1], new(string)).(*string) outstruct.Str2 = *abi.ConvertType(out[1], new(string)).(*string)
return *outstruct, err return *outstruct, nil
} }
// PackNoOutput is the Go binding used to pack the parameters required for calling // PackNoOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x625f0306. // the contract method with ID 0x625f0306. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function noOutput() returns() // Solidity: function noOutput() returns()
func (outputChecker *OutputChecker) PackNoOutput() []byte { func (outputChecker *OutputChecker) PackNoOutput() []byte {
@ -251,3 +308,12 @@ func (outputChecker *OutputChecker) PackNoOutput() []byte {
} }
return enc return enc
} }
// TryPackNoOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x625f0306. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function noOutput() returns()
func (outputChecker *OutputChecker) TryPackNoOutput() ([]byte, error) {
return outputChecker.abi.Pack("noOutput")
}

View file

@ -52,7 +52,8 @@ func (c *Overload) Instance(backend bind.ContractBackend, addr common.Address) *
} }
// PackFoo is the Go binding used to pack the parameters required for calling // PackFoo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x04bc52f8. // the contract method with ID 0x04bc52f8. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function foo(uint256 i, uint256 j) returns() // Solidity: function foo(uint256 i, uint256 j) returns()
func (overload *Overload) PackFoo(i *big.Int, j *big.Int) []byte { func (overload *Overload) PackFoo(i *big.Int, j *big.Int) []byte {
@ -63,8 +64,18 @@ func (overload *Overload) PackFoo(i *big.Int, j *big.Int) []byte {
return enc return enc
} }
// TryPackFoo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x04bc52f8. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function foo(uint256 i, uint256 j) returns()
func (overload *Overload) TryPackFoo(i *big.Int, j *big.Int) ([]byte, error) {
return overload.abi.Pack("foo", i, j)
}
// PackFoo0 is the Go binding used to pack the parameters required for calling // PackFoo0 is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2fbebd38. // the contract method with ID 0x2fbebd38. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function foo(uint256 i) returns() // Solidity: function foo(uint256 i) returns()
func (overload *Overload) PackFoo0(i *big.Int) []byte { func (overload *Overload) PackFoo0(i *big.Int) []byte {
@ -75,6 +86,15 @@ func (overload *Overload) PackFoo0(i *big.Int) []byte {
return enc return enc
} }
// TryPackFoo0 is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2fbebd38. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function foo(uint256 i) returns()
func (overload *Overload) TryPackFoo0(i *big.Int) ([]byte, error) {
return overload.abi.Pack("foo0", i)
}
// OverloadBar represents a bar event raised by the Overload contract. // OverloadBar represents a bar event raised by the Overload contract.
type OverloadBar struct { type OverloadBar struct {
I *big.Int I *big.Int

View file

@ -52,7 +52,8 @@ func (c *RangeKeyword) Instance(backend bind.ContractBackend, addr common.Addres
} }
// PackFunctionWithKeywordParameter is the Go binding used to pack the parameters required for calling // PackFunctionWithKeywordParameter is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x527a119f. // the contract method with ID 0x527a119f. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function functionWithKeywordParameter(uint256 range) pure returns() // Solidity: function functionWithKeywordParameter(uint256 range) pure returns()
func (rangeKeyword *RangeKeyword) PackFunctionWithKeywordParameter(arg0 *big.Int) []byte { func (rangeKeyword *RangeKeyword) PackFunctionWithKeywordParameter(arg0 *big.Int) []byte {
@ -62,3 +63,12 @@ func (rangeKeyword *RangeKeyword) PackFunctionWithKeywordParameter(arg0 *big.Int
} }
return enc return enc
} }
// TryPackFunctionWithKeywordParameter is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x527a119f. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function functionWithKeywordParameter(uint256 range) pure returns()
func (rangeKeyword *RangeKeyword) TryPackFunctionWithKeywordParameter(arg0 *big.Int) ([]byte, error) {
return rangeKeyword.abi.Pack("functionWithKeywordParameter", arg0)
}

View file

@ -52,7 +52,8 @@ func (c *Slicer) Instance(backend bind.ContractBackend, addr common.Address) *bi
} }
// PackEchoAddresses is the Go binding used to pack the parameters required for calling // PackEchoAddresses is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xbe1127a3. // the contract method with ID 0xbe1127a3. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function echoAddresses(address[] input) returns(address[] output) // Solidity: function echoAddresses(address[] input) returns(address[] output)
func (slicer *Slicer) PackEchoAddresses(input []common.Address) []byte { func (slicer *Slicer) PackEchoAddresses(input []common.Address) []byte {
@ -63,6 +64,15 @@ func (slicer *Slicer) PackEchoAddresses(input []common.Address) []byte {
return enc return enc
} }
// TryPackEchoAddresses is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xbe1127a3. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function echoAddresses(address[] input) returns(address[] output)
func (slicer *Slicer) TryPackEchoAddresses(input []common.Address) ([]byte, error) {
return slicer.abi.Pack("echoAddresses", input)
}
// UnpackEchoAddresses is the Go binding that unpacks the parameters returned // UnpackEchoAddresses is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xbe1127a3. // from invoking the contract method with ID 0xbe1127a3.
// //
@ -73,11 +83,12 @@ func (slicer *Slicer) UnpackEchoAddresses(data []byte) ([]common.Address, error)
return *new([]common.Address), err return *new([]common.Address), err
} }
out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address)
return out0, err return out0, nil
} }
// PackEchoBools is the Go binding used to pack the parameters required for calling // PackEchoBools is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xf637e589. // the contract method with ID 0xf637e589. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function echoBools(bool[] input) returns(bool[] output) // Solidity: function echoBools(bool[] input) returns(bool[] output)
func (slicer *Slicer) PackEchoBools(input []bool) []byte { func (slicer *Slicer) PackEchoBools(input []bool) []byte {
@ -88,6 +99,15 @@ func (slicer *Slicer) PackEchoBools(input []bool) []byte {
return enc return enc
} }
// TryPackEchoBools is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xf637e589. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function echoBools(bool[] input) returns(bool[] output)
func (slicer *Slicer) TryPackEchoBools(input []bool) ([]byte, error) {
return slicer.abi.Pack("echoBools", input)
}
// UnpackEchoBools is the Go binding that unpacks the parameters returned // UnpackEchoBools is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xf637e589. // from invoking the contract method with ID 0xf637e589.
// //
@ -98,11 +118,12 @@ func (slicer *Slicer) UnpackEchoBools(data []byte) ([]bool, error) {
return *new([]bool), err return *new([]bool), err
} }
out0 := *abi.ConvertType(out[0], new([]bool)).(*[]bool) out0 := *abi.ConvertType(out[0], new([]bool)).(*[]bool)
return out0, err return out0, nil
} }
// PackEchoFancyInts is the Go binding used to pack the parameters required for calling // PackEchoFancyInts is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd88becc0. // the contract method with ID 0xd88becc0. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function echoFancyInts(uint24[23] input) returns(uint24[23] output) // Solidity: function echoFancyInts(uint24[23] input) returns(uint24[23] output)
func (slicer *Slicer) PackEchoFancyInts(input [23]*big.Int) []byte { func (slicer *Slicer) PackEchoFancyInts(input [23]*big.Int) []byte {
@ -113,6 +134,15 @@ func (slicer *Slicer) PackEchoFancyInts(input [23]*big.Int) []byte {
return enc return enc
} }
// TryPackEchoFancyInts is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd88becc0. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function echoFancyInts(uint24[23] input) returns(uint24[23] output)
func (slicer *Slicer) TryPackEchoFancyInts(input [23]*big.Int) ([]byte, error) {
return slicer.abi.Pack("echoFancyInts", input)
}
// UnpackEchoFancyInts is the Go binding that unpacks the parameters returned // UnpackEchoFancyInts is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xd88becc0. // from invoking the contract method with ID 0xd88becc0.
// //
@ -123,11 +153,12 @@ func (slicer *Slicer) UnpackEchoFancyInts(data []byte) ([23]*big.Int, error) {
return *new([23]*big.Int), err return *new([23]*big.Int), err
} }
out0 := *abi.ConvertType(out[0], new([23]*big.Int)).(*[23]*big.Int) out0 := *abi.ConvertType(out[0], new([23]*big.Int)).(*[23]*big.Int)
return out0, err return out0, nil
} }
// PackEchoInts is the Go binding used to pack the parameters required for calling // PackEchoInts is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe15a3db7. // the contract method with ID 0xe15a3db7. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function echoInts(int256[] input) returns(int256[] output) // Solidity: function echoInts(int256[] input) returns(int256[] output)
func (slicer *Slicer) PackEchoInts(input []*big.Int) []byte { func (slicer *Slicer) PackEchoInts(input []*big.Int) []byte {
@ -138,6 +169,15 @@ func (slicer *Slicer) PackEchoInts(input []*big.Int) []byte {
return enc return enc
} }
// TryPackEchoInts is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe15a3db7. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function echoInts(int256[] input) returns(int256[] output)
func (slicer *Slicer) TryPackEchoInts(input []*big.Int) ([]byte, error) {
return slicer.abi.Pack("echoInts", input)
}
// UnpackEchoInts is the Go binding that unpacks the parameters returned // UnpackEchoInts is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xe15a3db7. // from invoking the contract method with ID 0xe15a3db7.
// //
@ -148,5 +188,5 @@ func (slicer *Slicer) UnpackEchoInts(data []byte) ([]*big.Int, error) {
return *new([]*big.Int), err return *new([]*big.Int), err
} }
out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int)
return out0, err return out0, nil
} }

View file

@ -57,7 +57,8 @@ func (c *Structs) Instance(backend bind.ContractBackend, addr common.Address) *b
} }
// PackF is the Go binding used to pack the parameters required for calling // PackF is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x28811f59. // the contract method with ID 0x28811f59. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d) // Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d)
func (structs *Structs) PackF() []byte { func (structs *Structs) PackF() []byte {
@ -68,6 +69,15 @@ func (structs *Structs) PackF() []byte {
return enc return enc
} }
// TryPackF is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x28811f59. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d)
func (structs *Structs) TryPackF() ([]byte, error) {
return structs.abi.Pack("F")
}
// FOutput serves as a container for the return parameters of contract // FOutput serves as a container for the return parameters of contract
// method F. // method F.
type FOutput struct { type FOutput struct {
@ -89,12 +99,12 @@ func (structs *Structs) UnpackF(data []byte) (FOutput, error) {
outstruct.A = *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0) outstruct.A = *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0)
outstruct.C = *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int) outstruct.C = *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int)
outstruct.D = *abi.ConvertType(out[2], new([]bool)).(*[]bool) outstruct.D = *abi.ConvertType(out[2], new([]bool)).(*[]bool)
return *outstruct, err return *outstruct, nil
} }
// PackG is the Go binding used to pack the parameters required for calling // PackG is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x6fecb623. // the contract method with ID 0x6fecb623. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function G() view returns((bytes32)[] a) // Solidity: function G() view returns((bytes32)[] a)
func (structs *Structs) PackG() []byte { func (structs *Structs) PackG() []byte {
@ -105,6 +115,15 @@ func (structs *Structs) PackG() []byte {
return enc return enc
} }
// TryPackG is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x6fecb623. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function G() view returns((bytes32)[] a)
func (structs *Structs) TryPackG() ([]byte, error) {
return structs.abi.Pack("G")
}
// UnpackG is the Go binding that unpacks the parameters returned // UnpackG is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x6fecb623. // from invoking the contract method with ID 0x6fecb623.
// //
@ -115,5 +134,5 @@ func (structs *Structs) UnpackG(data []byte) ([]Struct0, error) {
return *new([]Struct0), err return *new([]Struct0), err
} }
out0 := *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0) out0 := *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0)
return out0, err return out0, nil
} }

View file

@ -64,7 +64,8 @@ func (token *Token) PackConstructor(initialSupply *big.Int, tokenName string, de
} }
// PackAllowance is the Go binding used to pack the parameters required for calling // PackAllowance is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xdd62ed3e. // the contract method with ID 0xdd62ed3e. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function allowance(address , address ) returns(uint256) // Solidity: function allowance(address , address ) returns(uint256)
func (token *Token) PackAllowance(arg0 common.Address, arg1 common.Address) []byte { func (token *Token) PackAllowance(arg0 common.Address, arg1 common.Address) []byte {
@ -75,6 +76,15 @@ func (token *Token) PackAllowance(arg0 common.Address, arg1 common.Address) []by
return enc return enc
} }
// TryPackAllowance is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xdd62ed3e. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function allowance(address , address ) returns(uint256)
func (token *Token) TryPackAllowance(arg0 common.Address, arg1 common.Address) ([]byte, error) {
return token.abi.Pack("allowance", arg0, arg1)
}
// UnpackAllowance is the Go binding that unpacks the parameters returned // UnpackAllowance is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xdd62ed3e. // from invoking the contract method with ID 0xdd62ed3e.
// //
@ -85,11 +95,12 @@ func (token *Token) UnpackAllowance(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackApproveAndCall is the Go binding used to pack the parameters required for calling // PackApproveAndCall is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xcae9ca51. // the contract method with ID 0xcae9ca51. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns(bool success) // Solidity: function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns(bool success)
func (token *Token) PackApproveAndCall(spender common.Address, value *big.Int, extraData []byte) []byte { func (token *Token) PackApproveAndCall(spender common.Address, value *big.Int, extraData []byte) []byte {
@ -100,6 +111,15 @@ func (token *Token) PackApproveAndCall(spender common.Address, value *big.Int, e
return enc return enc
} }
// TryPackApproveAndCall is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xcae9ca51. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns(bool success)
func (token *Token) TryPackApproveAndCall(spender common.Address, value *big.Int, extraData []byte) ([]byte, error) {
return token.abi.Pack("approveAndCall", spender, value, extraData)
}
// UnpackApproveAndCall is the Go binding that unpacks the parameters returned // UnpackApproveAndCall is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xcae9ca51. // from invoking the contract method with ID 0xcae9ca51.
// //
@ -110,11 +130,12 @@ func (token *Token) UnpackApproveAndCall(data []byte) (bool, error) {
return *new(bool), err return *new(bool), err
} }
out0 := *abi.ConvertType(out[0], new(bool)).(*bool) out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err return out0, nil
} }
// PackBalanceOf is the Go binding used to pack the parameters required for calling // PackBalanceOf is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x70a08231. // the contract method with ID 0x70a08231. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function balanceOf(address ) returns(uint256) // Solidity: function balanceOf(address ) returns(uint256)
func (token *Token) PackBalanceOf(arg0 common.Address) []byte { func (token *Token) PackBalanceOf(arg0 common.Address) []byte {
@ -125,6 +146,15 @@ func (token *Token) PackBalanceOf(arg0 common.Address) []byte {
return enc return enc
} }
// TryPackBalanceOf is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x70a08231. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function balanceOf(address ) returns(uint256)
func (token *Token) TryPackBalanceOf(arg0 common.Address) ([]byte, error) {
return token.abi.Pack("balanceOf", arg0)
}
// UnpackBalanceOf is the Go binding that unpacks the parameters returned // UnpackBalanceOf is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x70a08231. // from invoking the contract method with ID 0x70a08231.
// //
@ -135,11 +165,12 @@ func (token *Token) UnpackBalanceOf(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackDecimals is the Go binding used to pack the parameters required for calling // PackDecimals is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x313ce567. // the contract method with ID 0x313ce567. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function decimals() returns(uint8) // Solidity: function decimals() returns(uint8)
func (token *Token) PackDecimals() []byte { func (token *Token) PackDecimals() []byte {
@ -150,6 +181,15 @@ func (token *Token) PackDecimals() []byte {
return enc return enc
} }
// TryPackDecimals is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x313ce567. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function decimals() returns(uint8)
func (token *Token) TryPackDecimals() ([]byte, error) {
return token.abi.Pack("decimals")
}
// UnpackDecimals is the Go binding that unpacks the parameters returned // UnpackDecimals is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x313ce567. // from invoking the contract method with ID 0x313ce567.
// //
@ -160,11 +200,12 @@ func (token *Token) UnpackDecimals(data []byte) (uint8, error) {
return *new(uint8), err return *new(uint8), err
} }
out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
return out0, err return out0, nil
} }
// PackName is the Go binding used to pack the parameters required for calling // PackName is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x06fdde03. // the contract method with ID 0x06fdde03. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function name() returns(string) // Solidity: function name() returns(string)
func (token *Token) PackName() []byte { func (token *Token) PackName() []byte {
@ -175,6 +216,15 @@ func (token *Token) PackName() []byte {
return enc return enc
} }
// TryPackName is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x06fdde03. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function name() returns(string)
func (token *Token) TryPackName() ([]byte, error) {
return token.abi.Pack("name")
}
// UnpackName is the Go binding that unpacks the parameters returned // UnpackName is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x06fdde03. // from invoking the contract method with ID 0x06fdde03.
// //
@ -185,11 +235,12 @@ func (token *Token) UnpackName(data []byte) (string, error) {
return *new(string), err return *new(string), err
} }
out0 := *abi.ConvertType(out[0], new(string)).(*string) out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err return out0, nil
} }
// PackSpentAllowance is the Go binding used to pack the parameters required for calling // PackSpentAllowance is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xdc3080f2. // the contract method with ID 0xdc3080f2. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function spentAllowance(address , address ) returns(uint256) // Solidity: function spentAllowance(address , address ) returns(uint256)
func (token *Token) PackSpentAllowance(arg0 common.Address, arg1 common.Address) []byte { func (token *Token) PackSpentAllowance(arg0 common.Address, arg1 common.Address) []byte {
@ -200,6 +251,15 @@ func (token *Token) PackSpentAllowance(arg0 common.Address, arg1 common.Address)
return enc return enc
} }
// TryPackSpentAllowance is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xdc3080f2. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function spentAllowance(address , address ) returns(uint256)
func (token *Token) TryPackSpentAllowance(arg0 common.Address, arg1 common.Address) ([]byte, error) {
return token.abi.Pack("spentAllowance", arg0, arg1)
}
// UnpackSpentAllowance is the Go binding that unpacks the parameters returned // UnpackSpentAllowance is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xdc3080f2. // from invoking the contract method with ID 0xdc3080f2.
// //
@ -210,11 +270,12 @@ func (token *Token) UnpackSpentAllowance(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackSymbol is the Go binding used to pack the parameters required for calling // PackSymbol is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x95d89b41. // the contract method with ID 0x95d89b41. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function symbol() returns(string) // Solidity: function symbol() returns(string)
func (token *Token) PackSymbol() []byte { func (token *Token) PackSymbol() []byte {
@ -225,6 +286,15 @@ func (token *Token) PackSymbol() []byte {
return enc return enc
} }
// TryPackSymbol is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x95d89b41. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function symbol() returns(string)
func (token *Token) TryPackSymbol() ([]byte, error) {
return token.abi.Pack("symbol")
}
// UnpackSymbol is the Go binding that unpacks the parameters returned // UnpackSymbol is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x95d89b41. // from invoking the contract method with ID 0x95d89b41.
// //
@ -235,11 +305,12 @@ func (token *Token) UnpackSymbol(data []byte) (string, error) {
return *new(string), err return *new(string), err
} }
out0 := *abi.ConvertType(out[0], new(string)).(*string) out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err return out0, nil
} }
// PackTransfer is the Go binding used to pack the parameters required for calling // PackTransfer is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xa9059cbb. // the contract method with ID 0xa9059cbb. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function transfer(address _to, uint256 _value) returns() // Solidity: function transfer(address _to, uint256 _value) returns()
func (token *Token) PackTransfer(to common.Address, value *big.Int) []byte { func (token *Token) PackTransfer(to common.Address, value *big.Int) []byte {
@ -250,8 +321,18 @@ func (token *Token) PackTransfer(to common.Address, value *big.Int) []byte {
return enc return enc
} }
// TryPackTransfer is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xa9059cbb. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function transfer(address _to, uint256 _value) returns()
func (token *Token) TryPackTransfer(to common.Address, value *big.Int) ([]byte, error) {
return token.abi.Pack("transfer", to, value)
}
// PackTransferFrom is the Go binding used to pack the parameters required for calling // PackTransferFrom is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x23b872dd. // the contract method with ID 0x23b872dd. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success) // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success)
func (token *Token) PackTransferFrom(from common.Address, to common.Address, value *big.Int) []byte { func (token *Token) PackTransferFrom(from common.Address, to common.Address, value *big.Int) []byte {
@ -262,6 +343,15 @@ func (token *Token) PackTransferFrom(from common.Address, to common.Address, val
return enc return enc
} }
// TryPackTransferFrom is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x23b872dd. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success)
func (token *Token) TryPackTransferFrom(from common.Address, to common.Address, value *big.Int) ([]byte, error) {
return token.abi.Pack("transferFrom", from, to, value)
}
// UnpackTransferFrom is the Go binding that unpacks the parameters returned // UnpackTransferFrom is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x23b872dd. // from invoking the contract method with ID 0x23b872dd.
// //
@ -272,7 +362,7 @@ func (token *Token) UnpackTransferFrom(data []byte) (bool, error) {
return *new(bool), err return *new(bool), err
} }
out0 := *abi.ConvertType(out[0], new(bool)).(*bool) out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err return out0, nil
} }
// TokenTransfer represents a Transfer event raised by the Token contract. // TokenTransfer represents a Transfer event raised by the Token contract.

View file

@ -77,7 +77,8 @@ func (c *Tuple) Instance(backend bind.ContractBackend, addr common.Address) *bin
} }
// PackFunc1 is the Go binding used to pack the parameters required for calling // PackFunc1 is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x443c79b4. // the contract method with ID 0x443c79b4. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function func1((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e) pure returns((uint256,uint256[],(uint256,uint256)[]), (uint256,uint256)[2][], (uint256,uint256)[][2], (uint256,uint256[],(uint256,uint256)[])[], uint256[]) // Solidity: function func1((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e) pure returns((uint256,uint256[],(uint256,uint256)[]), (uint256,uint256)[2][], (uint256,uint256)[][2], (uint256,uint256[],(uint256,uint256)[])[], uint256[])
func (tuple *Tuple) PackFunc1(a TupleS, b [][2]TupleT, c [2][]TupleT, d []TupleS, e []*big.Int) []byte { func (tuple *Tuple) PackFunc1(a TupleS, b [][2]TupleT, c [2][]TupleT, d []TupleS, e []*big.Int) []byte {
@ -88,6 +89,15 @@ func (tuple *Tuple) PackFunc1(a TupleS, b [][2]TupleT, c [2][]TupleT, d []TupleS
return enc return enc
} }
// TryPackFunc1 is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x443c79b4. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function func1((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e) pure returns((uint256,uint256[],(uint256,uint256)[]), (uint256,uint256)[2][], (uint256,uint256)[][2], (uint256,uint256[],(uint256,uint256)[])[], uint256[])
func (tuple *Tuple) TryPackFunc1(a TupleS, b [][2]TupleT, c [2][]TupleT, d []TupleS, e []*big.Int) ([]byte, error) {
return tuple.abi.Pack("func1", a, b, c, d, e)
}
// Func1Output serves as a container for the return parameters of contract // Func1Output serves as a container for the return parameters of contract
// method Func1. // method Func1.
type Func1Output struct { type Func1Output struct {
@ -113,12 +123,12 @@ func (tuple *Tuple) UnpackFunc1(data []byte) (Func1Output, error) {
outstruct.Arg2 = *abi.ConvertType(out[2], new([2][]TupleT)).(*[2][]TupleT) outstruct.Arg2 = *abi.ConvertType(out[2], new([2][]TupleT)).(*[2][]TupleT)
outstruct.Arg3 = *abi.ConvertType(out[3], new([]TupleS)).(*[]TupleS) outstruct.Arg3 = *abi.ConvertType(out[3], new([]TupleS)).(*[]TupleS)
outstruct.Arg4 = *abi.ConvertType(out[4], new([]*big.Int)).(*[]*big.Int) outstruct.Arg4 = *abi.ConvertType(out[4], new([]*big.Int)).(*[]*big.Int)
return *outstruct, err return *outstruct, nil
} }
// PackFunc2 is the Go binding used to pack the parameters required for calling // PackFunc2 is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd0062cdd. // the contract method with ID 0xd0062cdd. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function func2((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e) returns() // Solidity: function func2((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e) returns()
func (tuple *Tuple) PackFunc2(a TupleS, b [][2]TupleT, c [2][]TupleT, d []TupleS, e []*big.Int) []byte { func (tuple *Tuple) PackFunc2(a TupleS, b [][2]TupleT, c [2][]TupleT, d []TupleS, e []*big.Int) []byte {
@ -129,8 +139,18 @@ func (tuple *Tuple) PackFunc2(a TupleS, b [][2]TupleT, c [2][]TupleT, d []TupleS
return enc return enc
} }
// TryPackFunc2 is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xd0062cdd. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function func2((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e) returns()
func (tuple *Tuple) TryPackFunc2(a TupleS, b [][2]TupleT, c [2][]TupleT, d []TupleS, e []*big.Int) ([]byte, error) {
return tuple.abi.Pack("func2", a, b, c, d, e)
}
// PackFunc3 is the Go binding used to pack the parameters required for calling // PackFunc3 is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe4d9a43b. // the contract method with ID 0xe4d9a43b. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function func3((uint16,uint16)[] ) pure returns() // Solidity: function func3((uint16,uint16)[] ) pure returns()
func (tuple *Tuple) PackFunc3(arg0 []TupleQ) []byte { func (tuple *Tuple) PackFunc3(arg0 []TupleQ) []byte {
@ -141,6 +161,15 @@ func (tuple *Tuple) PackFunc3(arg0 []TupleQ) []byte {
return enc return enc
} }
// TryPackFunc3 is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe4d9a43b. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function func3((uint16,uint16)[] ) pure returns()
func (tuple *Tuple) TryPackFunc3(arg0 []TupleQ) ([]byte, error) {
return tuple.abi.Pack("func3", arg0)
}
// TupleTupleEvent represents a TupleEvent event raised by the Tuple contract. // TupleTupleEvent represents a TupleEvent event raised by the Tuple contract.
type TupleTupleEvent struct { type TupleTupleEvent struct {
A TupleS A TupleS

View file

@ -52,7 +52,8 @@ func (c *Tupler) Instance(backend bind.ContractBackend, addr common.Address) *bi
} }
// PackTuple is the Go binding used to pack the parameters required for calling // PackTuple is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x3175aae2. // the contract method with ID 0x3175aae2. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function tuple() returns(string a, int256 b, bytes32 c) // Solidity: function tuple() returns(string a, int256 b, bytes32 c)
func (tupler *Tupler) PackTuple() []byte { func (tupler *Tupler) PackTuple() []byte {
@ -63,6 +64,15 @@ func (tupler *Tupler) PackTuple() []byte {
return enc return enc
} }
// TryPackTuple is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x3175aae2. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function tuple() returns(string a, int256 b, bytes32 c)
func (tupler *Tupler) TryPackTuple() ([]byte, error) {
return tupler.abi.Pack("tuple")
}
// TupleOutput serves as a container for the return parameters of contract // TupleOutput serves as a container for the return parameters of contract
// method Tuple. // method Tuple.
type TupleOutput struct { type TupleOutput struct {
@ -84,6 +94,5 @@ func (tupler *Tupler) UnpackTuple(data []byte) (TupleOutput, error) {
outstruct.A = *abi.ConvertType(out[0], new(string)).(*string) outstruct.A = *abi.ConvertType(out[0], new(string)).(*string)
outstruct.B = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.B = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
outstruct.C = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte) outstruct.C = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte)
return *outstruct, err return *outstruct, nil
} }

View file

@ -52,7 +52,8 @@ func (c *Underscorer) Instance(backend bind.ContractBackend, addr common.Address
} }
// PackAllPurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling // PackAllPurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xb564b34d. // the contract method with ID 0xb564b34d. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function AllPurelyUnderscoredOutput() view returns(int256 _, int256 __) // Solidity: function AllPurelyUnderscoredOutput() view returns(int256 _, int256 __)
func (underscorer *Underscorer) PackAllPurelyUnderscoredOutput() []byte { func (underscorer *Underscorer) PackAllPurelyUnderscoredOutput() []byte {
@ -63,6 +64,15 @@ func (underscorer *Underscorer) PackAllPurelyUnderscoredOutput() []byte {
return enc return enc
} }
// TryPackAllPurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xb564b34d. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function AllPurelyUnderscoredOutput() view returns(int256 _, int256 __)
func (underscorer *Underscorer) TryPackAllPurelyUnderscoredOutput() ([]byte, error) {
return underscorer.abi.Pack("AllPurelyUnderscoredOutput")
}
// AllPurelyUnderscoredOutputOutput serves as a container for the return parameters of contract // AllPurelyUnderscoredOutputOutput serves as a container for the return parameters of contract
// method AllPurelyUnderscoredOutput. // method AllPurelyUnderscoredOutput.
type AllPurelyUnderscoredOutputOutput struct { type AllPurelyUnderscoredOutputOutput struct {
@ -82,12 +92,12 @@ func (underscorer *Underscorer) UnpackAllPurelyUnderscoredOutput(data []byte) (A
} }
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int) outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
return *outstruct, err return *outstruct, nil
} }
// PackLowerLowerCollision is the Go binding used to pack the parameters required for calling // PackLowerLowerCollision is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe409ca45. // the contract method with ID 0xe409ca45. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function LowerLowerCollision() view returns(int256 _res, int256 res) // Solidity: function LowerLowerCollision() view returns(int256 _res, int256 res)
func (underscorer *Underscorer) PackLowerLowerCollision() []byte { func (underscorer *Underscorer) PackLowerLowerCollision() []byte {
@ -98,6 +108,15 @@ func (underscorer *Underscorer) PackLowerLowerCollision() []byte {
return enc return enc
} }
// TryPackLowerLowerCollision is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe409ca45. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function LowerLowerCollision() view returns(int256 _res, int256 res)
func (underscorer *Underscorer) TryPackLowerLowerCollision() ([]byte, error) {
return underscorer.abi.Pack("LowerLowerCollision")
}
// LowerLowerCollisionOutput serves as a container for the return parameters of contract // LowerLowerCollisionOutput serves as a container for the return parameters of contract
// method LowerLowerCollision. // method LowerLowerCollision.
type LowerLowerCollisionOutput struct { type LowerLowerCollisionOutput struct {
@ -117,12 +136,12 @@ func (underscorer *Underscorer) UnpackLowerLowerCollision(data []byte) (LowerLow
} }
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int) outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
return *outstruct, err return *outstruct, nil
} }
// PackLowerUpperCollision is the Go binding used to pack the parameters required for calling // PackLowerUpperCollision is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x03a59213. // the contract method with ID 0x03a59213. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function LowerUpperCollision() view returns(int256 _res, int256 Res) // Solidity: function LowerUpperCollision() view returns(int256 _res, int256 Res)
func (underscorer *Underscorer) PackLowerUpperCollision() []byte { func (underscorer *Underscorer) PackLowerUpperCollision() []byte {
@ -133,6 +152,15 @@ func (underscorer *Underscorer) PackLowerUpperCollision() []byte {
return enc return enc
} }
// TryPackLowerUpperCollision is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x03a59213. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function LowerUpperCollision() view returns(int256 _res, int256 Res)
func (underscorer *Underscorer) TryPackLowerUpperCollision() ([]byte, error) {
return underscorer.abi.Pack("LowerUpperCollision")
}
// LowerUpperCollisionOutput serves as a container for the return parameters of contract // LowerUpperCollisionOutput serves as a container for the return parameters of contract
// method LowerUpperCollision. // method LowerUpperCollision.
type LowerUpperCollisionOutput struct { type LowerUpperCollisionOutput struct {
@ -152,12 +180,12 @@ func (underscorer *Underscorer) UnpackLowerUpperCollision(data []byte) (LowerUpp
} }
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int) outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
return *outstruct, err return *outstruct, nil
} }
// PackPurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling // PackPurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x9df48485. // the contract method with ID 0x9df48485. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function PurelyUnderscoredOutput() view returns(int256 _, int256 res) // Solidity: function PurelyUnderscoredOutput() view returns(int256 _, int256 res)
func (underscorer *Underscorer) PackPurelyUnderscoredOutput() []byte { func (underscorer *Underscorer) PackPurelyUnderscoredOutput() []byte {
@ -168,6 +196,15 @@ func (underscorer *Underscorer) PackPurelyUnderscoredOutput() []byte {
return enc return enc
} }
// TryPackPurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x9df48485. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function PurelyUnderscoredOutput() view returns(int256 _, int256 res)
func (underscorer *Underscorer) TryPackPurelyUnderscoredOutput() ([]byte, error) {
return underscorer.abi.Pack("PurelyUnderscoredOutput")
}
// PurelyUnderscoredOutputOutput serves as a container for the return parameters of contract // PurelyUnderscoredOutputOutput serves as a container for the return parameters of contract
// method PurelyUnderscoredOutput. // method PurelyUnderscoredOutput.
type PurelyUnderscoredOutputOutput struct { type PurelyUnderscoredOutputOutput struct {
@ -187,12 +224,12 @@ func (underscorer *Underscorer) UnpackPurelyUnderscoredOutput(data []byte) (Pure
} }
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int) outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
outstruct.Res = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Res = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
return *outstruct, err return *outstruct, nil
} }
// PackUnderscoredOutput is the Go binding used to pack the parameters required for calling // PackUnderscoredOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x67e6633d. // the contract method with ID 0x67e6633d. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function UnderscoredOutput() view returns(int256 _int, string _string) // Solidity: function UnderscoredOutput() view returns(int256 _int, string _string)
func (underscorer *Underscorer) PackUnderscoredOutput() []byte { func (underscorer *Underscorer) PackUnderscoredOutput() []byte {
@ -203,6 +240,15 @@ func (underscorer *Underscorer) PackUnderscoredOutput() []byte {
return enc return enc
} }
// TryPackUnderscoredOutput is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x67e6633d. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function UnderscoredOutput() view returns(int256 _int, string _string)
func (underscorer *Underscorer) TryPackUnderscoredOutput() ([]byte, error) {
return underscorer.abi.Pack("UnderscoredOutput")
}
// UnderscoredOutputOutput serves as a container for the return parameters of contract // UnderscoredOutputOutput serves as a container for the return parameters of contract
// method UnderscoredOutput. // method UnderscoredOutput.
type UnderscoredOutputOutput struct { type UnderscoredOutputOutput struct {
@ -222,12 +268,12 @@ func (underscorer *Underscorer) UnpackUnderscoredOutput(data []byte) (Underscore
} }
outstruct.Int = abi.ConvertType(out[0], new(big.Int)).(*big.Int) outstruct.Int = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
outstruct.String = *abi.ConvertType(out[1], new(string)).(*string) outstruct.String = *abi.ConvertType(out[1], new(string)).(*string)
return *outstruct, err return *outstruct, nil
} }
// PackUpperLowerCollision is the Go binding used to pack the parameters required for calling // PackUpperLowerCollision is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xaf7486ab. // the contract method with ID 0xaf7486ab. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function UpperLowerCollision() view returns(int256 _Res, int256 res) // Solidity: function UpperLowerCollision() view returns(int256 _Res, int256 res)
func (underscorer *Underscorer) PackUpperLowerCollision() []byte { func (underscorer *Underscorer) PackUpperLowerCollision() []byte {
@ -238,6 +284,15 @@ func (underscorer *Underscorer) PackUpperLowerCollision() []byte {
return enc return enc
} }
// TryPackUpperLowerCollision is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xaf7486ab. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function UpperLowerCollision() view returns(int256 _Res, int256 res)
func (underscorer *Underscorer) TryPackUpperLowerCollision() ([]byte, error) {
return underscorer.abi.Pack("UpperLowerCollision")
}
// UpperLowerCollisionOutput serves as a container for the return parameters of contract // UpperLowerCollisionOutput serves as a container for the return parameters of contract
// method UpperLowerCollision. // method UpperLowerCollision.
type UpperLowerCollisionOutput struct { type UpperLowerCollisionOutput struct {
@ -257,12 +312,12 @@ func (underscorer *Underscorer) UnpackUpperLowerCollision(data []byte) (UpperLow
} }
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int) outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
return *outstruct, err return *outstruct, nil
} }
// PackUpperUpperCollision is the Go binding used to pack the parameters required for calling // PackUpperUpperCollision is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe02ab24d. // the contract method with ID 0xe02ab24d. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function UpperUpperCollision() view returns(int256 _Res, int256 Res) // Solidity: function UpperUpperCollision() view returns(int256 _Res, int256 Res)
func (underscorer *Underscorer) PackUpperUpperCollision() []byte { func (underscorer *Underscorer) PackUpperUpperCollision() []byte {
@ -273,6 +328,15 @@ func (underscorer *Underscorer) PackUpperUpperCollision() []byte {
return enc return enc
} }
// TryPackUpperUpperCollision is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe02ab24d. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function UpperUpperCollision() view returns(int256 _Res, int256 Res)
func (underscorer *Underscorer) TryPackUpperUpperCollision() ([]byte, error) {
return underscorer.abi.Pack("UpperUpperCollision")
}
// UpperUpperCollisionOutput serves as a container for the return parameters of contract // UpperUpperCollisionOutput serves as a container for the return parameters of contract
// method UpperUpperCollision. // method UpperUpperCollision.
type UpperUpperCollisionOutput struct { type UpperUpperCollisionOutput struct {
@ -292,12 +356,12 @@ func (underscorer *Underscorer) UnpackUpperUpperCollision(data []byte) (UpperUpp
} }
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int) outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
return *outstruct, err return *outstruct, nil
} }
// PackUnderScoredFunc is the Go binding used to pack the parameters required for calling // PackUnderScoredFunc is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x46546dbe. // the contract method with ID 0x46546dbe. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function _under_scored_func() view returns(int256 _int) // Solidity: function _under_scored_func() view returns(int256 _int)
func (underscorer *Underscorer) PackUnderScoredFunc() []byte { func (underscorer *Underscorer) PackUnderScoredFunc() []byte {
@ -308,6 +372,15 @@ func (underscorer *Underscorer) PackUnderScoredFunc() []byte {
return enc return enc
} }
// TryPackUnderScoredFunc is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x46546dbe. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function _under_scored_func() view returns(int256 _int)
func (underscorer *Underscorer) TryPackUnderScoredFunc() ([]byte, error) {
return underscorer.abi.Pack("_under_scored_func")
}
// UnpackUnderScoredFunc is the Go binding that unpacks the parameters returned // UnpackUnderScoredFunc is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x46546dbe. // from invoking the contract method with ID 0x46546dbe.
// //
@ -318,5 +391,5 @@ func (underscorer *Underscorer) UnpackUnderScoredFunc(data []byte) (*big.Int, er
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }

View file

@ -59,7 +59,8 @@ func (c *DB) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
} }
// PackGet is the Go binding used to pack the parameters required for calling // PackGet is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x9507d39a. // the contract method with ID 0x9507d39a. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function get(uint256 k) returns(uint256) // Solidity: function get(uint256 k) returns(uint256)
func (dB *DB) PackGet(k *big.Int) []byte { func (dB *DB) PackGet(k *big.Int) []byte {
@ -70,6 +71,15 @@ func (dB *DB) PackGet(k *big.Int) []byte {
return enc return enc
} }
// TryPackGet is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x9507d39a. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function get(uint256 k) returns(uint256)
func (dB *DB) TryPackGet(k *big.Int) ([]byte, error) {
return dB.abi.Pack("get", k)
}
// UnpackGet is the Go binding that unpacks the parameters returned // UnpackGet is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x9507d39a. // from invoking the contract method with ID 0x9507d39a.
// //
@ -80,11 +90,12 @@ func (dB *DB) UnpackGet(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// PackGetNamedStatParams is the Go binding used to pack the parameters required for calling // PackGetNamedStatParams is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe369ba3b. // the contract method with ID 0xe369ba3b. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function getNamedStatParams() view returns(uint256 gets, uint256 inserts, uint256 mods) // Solidity: function getNamedStatParams() view returns(uint256 gets, uint256 inserts, uint256 mods)
func (dB *DB) PackGetNamedStatParams() []byte { func (dB *DB) PackGetNamedStatParams() []byte {
@ -95,6 +106,15 @@ func (dB *DB) PackGetNamedStatParams() []byte {
return enc return enc
} }
// TryPackGetNamedStatParams is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe369ba3b. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function getNamedStatParams() view returns(uint256 gets, uint256 inserts, uint256 mods)
func (dB *DB) TryPackGetNamedStatParams() ([]byte, error) {
return dB.abi.Pack("getNamedStatParams")
}
// GetNamedStatParamsOutput serves as a container for the return parameters of contract // GetNamedStatParamsOutput serves as a container for the return parameters of contract
// method GetNamedStatParams. // method GetNamedStatParams.
type GetNamedStatParamsOutput struct { type GetNamedStatParamsOutput struct {
@ -116,12 +136,12 @@ func (dB *DB) UnpackGetNamedStatParams(data []byte) (GetNamedStatParamsOutput, e
outstruct.Gets = abi.ConvertType(out[0], new(big.Int)).(*big.Int) outstruct.Gets = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
outstruct.Inserts = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Inserts = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
outstruct.Mods = abi.ConvertType(out[2], new(big.Int)).(*big.Int) outstruct.Mods = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
return *outstruct, err return *outstruct, nil
} }
// PackGetStatParams is the Go binding used to pack the parameters required for calling // PackGetStatParams is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x6fcb9c70. // the contract method with ID 0x6fcb9c70. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function getStatParams() view returns(uint256, uint256, uint256) // Solidity: function getStatParams() view returns(uint256, uint256, uint256)
func (dB *DB) PackGetStatParams() []byte { func (dB *DB) PackGetStatParams() []byte {
@ -132,6 +152,15 @@ func (dB *DB) PackGetStatParams() []byte {
return enc return enc
} }
// TryPackGetStatParams is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x6fcb9c70. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function getStatParams() view returns(uint256, uint256, uint256)
func (dB *DB) TryPackGetStatParams() ([]byte, error) {
return dB.abi.Pack("getStatParams")
}
// GetStatParamsOutput serves as a container for the return parameters of contract // GetStatParamsOutput serves as a container for the return parameters of contract
// method GetStatParams. // method GetStatParams.
type GetStatParamsOutput struct { type GetStatParamsOutput struct {
@ -153,12 +182,12 @@ func (dB *DB) UnpackGetStatParams(data []byte) (GetStatParamsOutput, error) {
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int) outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
outstruct.Arg2 = abi.ConvertType(out[2], new(big.Int)).(*big.Int) outstruct.Arg2 = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
return *outstruct, err return *outstruct, nil
} }
// PackGetStatsStruct is the Go binding used to pack the parameters required for calling // PackGetStatsStruct is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xee8161e0. // the contract method with ID 0xee8161e0. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function getStatsStruct() view returns((uint256,uint256,uint256)) // Solidity: function getStatsStruct() view returns((uint256,uint256,uint256))
func (dB *DB) PackGetStatsStruct() []byte { func (dB *DB) PackGetStatsStruct() []byte {
@ -169,6 +198,15 @@ func (dB *DB) PackGetStatsStruct() []byte {
return enc return enc
} }
// TryPackGetStatsStruct is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xee8161e0. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function getStatsStruct() view returns((uint256,uint256,uint256))
func (dB *DB) TryPackGetStatsStruct() ([]byte, error) {
return dB.abi.Pack("getStatsStruct")
}
// UnpackGetStatsStruct is the Go binding that unpacks the parameters returned // UnpackGetStatsStruct is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xee8161e0. // from invoking the contract method with ID 0xee8161e0.
// //
@ -179,11 +217,12 @@ func (dB *DB) UnpackGetStatsStruct(data []byte) (DBStats, error) {
return *new(DBStats), err return *new(DBStats), err
} }
out0 := *abi.ConvertType(out[0], new(DBStats)).(*DBStats) out0 := *abi.ConvertType(out[0], new(DBStats)).(*DBStats)
return out0, err return out0, nil
} }
// PackInsert is the Go binding used to pack the parameters required for calling // PackInsert is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x1d834a1b. // the contract method with ID 0x1d834a1b. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function insert(uint256 k, uint256 v) returns(uint256) // Solidity: function insert(uint256 k, uint256 v) returns(uint256)
func (dB *DB) PackInsert(k *big.Int, v *big.Int) []byte { func (dB *DB) PackInsert(k *big.Int, v *big.Int) []byte {
@ -194,6 +233,15 @@ func (dB *DB) PackInsert(k *big.Int, v *big.Int) []byte {
return enc return enc
} }
// TryPackInsert is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x1d834a1b. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function insert(uint256 k, uint256 v) returns(uint256)
func (dB *DB) TryPackInsert(k *big.Int, v *big.Int) ([]byte, error) {
return dB.abi.Pack("insert", k, v)
}
// UnpackInsert is the Go binding that unpacks the parameters returned // UnpackInsert is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x1d834a1b. // from invoking the contract method with ID 0x1d834a1b.
// //
@ -204,7 +252,7 @@ func (dB *DB) UnpackInsert(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// DBInsert represents a Insert event raised by the DB contract. // DBInsert represents a Insert event raised by the DB contract.

View file

@ -52,7 +52,8 @@ func (c *C) Instance(backend bind.ContractBackend, addr common.Address) *bind.Bo
} }
// PackEmitMulti is the Go binding used to pack the parameters required for calling // PackEmitMulti is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xcb493749. // the contract method with ID 0xcb493749. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function EmitMulti() returns() // Solidity: function EmitMulti() returns()
func (c *C) PackEmitMulti() []byte { func (c *C) PackEmitMulti() []byte {
@ -63,8 +64,18 @@ func (c *C) PackEmitMulti() []byte {
return enc return enc
} }
// TryPackEmitMulti is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xcb493749. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function EmitMulti() returns()
func (c *C) TryPackEmitMulti() ([]byte, error) {
return c.abi.Pack("EmitMulti")
}
// PackEmitOne is the Go binding used to pack the parameters required for calling // PackEmitOne is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe8e49a71. // the contract method with ID 0xe8e49a71. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function EmitOne() returns() // Solidity: function EmitOne() returns()
func (c *C) PackEmitOne() []byte { func (c *C) PackEmitOne() []byte {
@ -75,6 +86,15 @@ func (c *C) PackEmitOne() []byte {
return enc return enc
} }
// TryPackEmitOne is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xe8e49a71. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function EmitOne() returns()
func (c *C) TryPackEmitOne() ([]byte, error) {
return c.abi.Pack("EmitOne")
}
// CBasic1 represents a basic1 event raised by the C contract. // CBasic1 represents a basic1 event raised by the C contract.
type CBasic1 struct { type CBasic1 struct {
Id *big.Int Id *big.Int

View file

@ -68,7 +68,8 @@ func (c1 *C1) PackConstructor(v1 *big.Int, v2 *big.Int) []byte {
} }
// PackDo is the Go binding used to pack the parameters required for calling // PackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. // the contract method with ID 0x2ad11272. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function Do(uint256 val) pure returns(uint256 res) // Solidity: function Do(uint256 val) pure returns(uint256 res)
func (c1 *C1) PackDo(val *big.Int) []byte { func (c1 *C1) PackDo(val *big.Int) []byte {
@ -79,6 +80,15 @@ func (c1 *C1) PackDo(val *big.Int) []byte {
return enc return enc
} }
// TryPackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function Do(uint256 val) pure returns(uint256 res)
func (c1 *C1) TryPackDo(val *big.Int) ([]byte, error) {
return c1.abi.Pack("Do", val)
}
// UnpackDo is the Go binding that unpacks the parameters returned // UnpackDo is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x2ad11272. // from invoking the contract method with ID 0x2ad11272.
// //
@ -89,7 +99,7 @@ func (c1 *C1) UnpackDo(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// C2MetaData contains all meta data concerning the C2 contract. // C2MetaData contains all meta data concerning the C2 contract.
@ -136,7 +146,8 @@ func (c2 *C2) PackConstructor(v1 *big.Int, v2 *big.Int) []byte {
} }
// PackDo is the Go binding used to pack the parameters required for calling // PackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. // the contract method with ID 0x2ad11272. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function Do(uint256 val) pure returns(uint256 res) // Solidity: function Do(uint256 val) pure returns(uint256 res)
func (c2 *C2) PackDo(val *big.Int) []byte { func (c2 *C2) PackDo(val *big.Int) []byte {
@ -147,6 +158,15 @@ func (c2 *C2) PackDo(val *big.Int) []byte {
return enc return enc
} }
// TryPackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function Do(uint256 val) pure returns(uint256 res)
func (c2 *C2) TryPackDo(val *big.Int) ([]byte, error) {
return c2.abi.Pack("Do", val)
}
// UnpackDo is the Go binding that unpacks the parameters returned // UnpackDo is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x2ad11272. // from invoking the contract method with ID 0x2ad11272.
// //
@ -157,7 +177,7 @@ func (c2 *C2) UnpackDo(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// L1MetaData contains all meta data concerning the L1 contract. // L1MetaData contains all meta data concerning the L1 contract.
@ -188,7 +208,8 @@ func (c *L1) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
} }
// PackDo is the Go binding used to pack the parameters required for calling // PackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. // the contract method with ID 0x2ad11272. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function Do(uint256 val) pure returns(uint256) // Solidity: function Do(uint256 val) pure returns(uint256)
func (l1 *L1) PackDo(val *big.Int) []byte { func (l1 *L1) PackDo(val *big.Int) []byte {
@ -199,6 +220,15 @@ func (l1 *L1) PackDo(val *big.Int) []byte {
return enc return enc
} }
// TryPackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function Do(uint256 val) pure returns(uint256)
func (l1 *L1) TryPackDo(val *big.Int) ([]byte, error) {
return l1.abi.Pack("Do", val)
}
// UnpackDo is the Go binding that unpacks the parameters returned // UnpackDo is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x2ad11272. // from invoking the contract method with ID 0x2ad11272.
// //
@ -209,7 +239,7 @@ func (l1 *L1) UnpackDo(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// L2MetaData contains all meta data concerning the L2 contract. // L2MetaData contains all meta data concerning the L2 contract.
@ -243,7 +273,8 @@ func (c *L2) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
} }
// PackDo is the Go binding used to pack the parameters required for calling // PackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. // the contract method with ID 0x2ad11272. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function Do(uint256 val) pure returns(uint256) // Solidity: function Do(uint256 val) pure returns(uint256)
func (l2 *L2) PackDo(val *big.Int) []byte { func (l2 *L2) PackDo(val *big.Int) []byte {
@ -254,6 +285,15 @@ func (l2 *L2) PackDo(val *big.Int) []byte {
return enc return enc
} }
// TryPackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function Do(uint256 val) pure returns(uint256)
func (l2 *L2) TryPackDo(val *big.Int) ([]byte, error) {
return l2.abi.Pack("Do", val)
}
// UnpackDo is the Go binding that unpacks the parameters returned // UnpackDo is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x2ad11272. // from invoking the contract method with ID 0x2ad11272.
// //
@ -264,7 +304,7 @@ func (l2 *L2) UnpackDo(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// L2bMetaData contains all meta data concerning the L2b contract. // L2bMetaData contains all meta data concerning the L2b contract.
@ -298,7 +338,8 @@ func (c *L2b) Instance(backend bind.ContractBackend, addr common.Address) *bind.
} }
// PackDo is the Go binding used to pack the parameters required for calling // PackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. // the contract method with ID 0x2ad11272. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function Do(uint256 val) pure returns(uint256) // Solidity: function Do(uint256 val) pure returns(uint256)
func (l2b *L2b) PackDo(val *big.Int) []byte { func (l2b *L2b) PackDo(val *big.Int) []byte {
@ -309,6 +350,15 @@ func (l2b *L2b) PackDo(val *big.Int) []byte {
return enc return enc
} }
// TryPackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function Do(uint256 val) pure returns(uint256)
func (l2b *L2b) TryPackDo(val *big.Int) ([]byte, error) {
return l2b.abi.Pack("Do", val)
}
// UnpackDo is the Go binding that unpacks the parameters returned // UnpackDo is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x2ad11272. // from invoking the contract method with ID 0x2ad11272.
// //
@ -319,7 +369,7 @@ func (l2b *L2b) UnpackDo(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// L3MetaData contains all meta data concerning the L3 contract. // L3MetaData contains all meta data concerning the L3 contract.
@ -350,7 +400,8 @@ func (c *L3) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
} }
// PackDo is the Go binding used to pack the parameters required for calling // PackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. // the contract method with ID 0x2ad11272. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function Do(uint256 val) pure returns(uint256) // Solidity: function Do(uint256 val) pure returns(uint256)
func (l3 *L3) PackDo(val *big.Int) []byte { func (l3 *L3) PackDo(val *big.Int) []byte {
@ -361,6 +412,15 @@ func (l3 *L3) PackDo(val *big.Int) []byte {
return enc return enc
} }
// TryPackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function Do(uint256 val) pure returns(uint256)
func (l3 *L3) TryPackDo(val *big.Int) ([]byte, error) {
return l3.abi.Pack("Do", val)
}
// UnpackDo is the Go binding that unpacks the parameters returned // UnpackDo is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x2ad11272. // from invoking the contract method with ID 0x2ad11272.
// //
@ -371,7 +431,7 @@ func (l3 *L3) UnpackDo(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// L4MetaData contains all meta data concerning the L4 contract. // L4MetaData contains all meta data concerning the L4 contract.
@ -406,7 +466,8 @@ func (c *L4) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
} }
// PackDo is the Go binding used to pack the parameters required for calling // PackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. // the contract method with ID 0x2ad11272. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function Do(uint256 val) pure returns(uint256) // Solidity: function Do(uint256 val) pure returns(uint256)
func (l4 *L4) PackDo(val *big.Int) []byte { func (l4 *L4) PackDo(val *big.Int) []byte {
@ -417,6 +478,15 @@ func (l4 *L4) PackDo(val *big.Int) []byte {
return enc return enc
} }
// TryPackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function Do(uint256 val) pure returns(uint256)
func (l4 *L4) TryPackDo(val *big.Int) ([]byte, error) {
return l4.abi.Pack("Do", val)
}
// UnpackDo is the Go binding that unpacks the parameters returned // UnpackDo is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x2ad11272. // from invoking the contract method with ID 0x2ad11272.
// //
@ -427,7 +497,7 @@ func (l4 *L4) UnpackDo(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }
// L4bMetaData contains all meta data concerning the L4b contract. // L4bMetaData contains all meta data concerning the L4b contract.
@ -461,7 +531,8 @@ func (c *L4b) Instance(backend bind.ContractBackend, addr common.Address) *bind.
} }
// PackDo is the Go binding used to pack the parameters required for calling // PackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. // the contract method with ID 0x2ad11272. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function Do(uint256 val) pure returns(uint256) // Solidity: function Do(uint256 val) pure returns(uint256)
func (l4b *L4b) PackDo(val *big.Int) []byte { func (l4b *L4b) PackDo(val *big.Int) []byte {
@ -472,6 +543,15 @@ func (l4b *L4b) PackDo(val *big.Int) []byte {
return enc return enc
} }
// TryPackDo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0x2ad11272. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function Do(uint256 val) pure returns(uint256)
func (l4b *L4b) TryPackDo(val *big.Int) ([]byte, error) {
return l4b.abi.Pack("Do", val)
}
// UnpackDo is the Go binding that unpacks the parameters returned // UnpackDo is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0x2ad11272. // from invoking the contract method with ID 0x2ad11272.
// //
@ -482,5 +562,5 @@ func (l4b *L4b) UnpackDo(data []byte) (*big.Int, error) {
return new(big.Int), err return new(big.Int), err
} }
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
return out0, err return out0, nil
} }

View file

@ -52,7 +52,8 @@ func (c *C) Instance(backend bind.ContractBackend, addr common.Address) *bind.Bo
} }
// PackBar is the Go binding used to pack the parameters required for calling // PackBar is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xb0a378b0. // the contract method with ID 0xb0a378b0. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function Bar() pure returns() // Solidity: function Bar() pure returns()
func (c *C) PackBar() []byte { func (c *C) PackBar() []byte {
@ -63,8 +64,18 @@ func (c *C) PackBar() []byte {
return enc return enc
} }
// TryPackBar is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xb0a378b0. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function Bar() pure returns()
func (c *C) TryPackBar() ([]byte, error) {
return c.abi.Pack("Bar")
}
// PackFoo is the Go binding used to pack the parameters required for calling // PackFoo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xbfb4ebcf. // the contract method with ID 0xbfb4ebcf. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function Foo() pure returns() // Solidity: function Foo() pure returns()
func (c *C) PackFoo() []byte { func (c *C) PackFoo() []byte {
@ -75,6 +86,15 @@ func (c *C) PackFoo() []byte {
return enc return enc
} }
// TryPackFoo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xbfb4ebcf. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function Foo() pure returns()
func (c *C) TryPackFoo() ([]byte, error) {
return c.abi.Pack("Foo")
}
// UnpackError attempts to decode the provided error data using user-defined // UnpackError attempts to decode the provided error data using user-defined
// error definitions. // error definitions.
func (c *C) UnpackError(raw []byte) (any, error) { func (c *C) UnpackError(raw []byte) (any, error) {
@ -169,7 +189,8 @@ func (c *C2) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
} }
// PackFoo is the Go binding used to pack the parameters required for calling // PackFoo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xbfb4ebcf. // the contract method with ID 0xbfb4ebcf. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function Foo() pure returns() // Solidity: function Foo() pure returns()
func (c2 *C2) PackFoo() []byte { func (c2 *C2) PackFoo() []byte {
@ -180,6 +201,15 @@ func (c2 *C2) PackFoo() []byte {
return enc return enc
} }
// TryPackFoo is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xbfb4ebcf. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function Foo() pure returns()
func (c2 *C2) TryPackFoo() ([]byte, error) {
return c2.abi.Pack("Foo")
}
// UnpackError attempts to decode the provided error data using user-defined // UnpackError attempts to decode the provided error data using user-defined
// error definitions. // error definitions.
func (c2 *C2) UnpackError(raw []byte) (any, error) { func (c2 *C2) UnpackError(raw []byte) (any, error) {

View file

@ -52,7 +52,8 @@ func (c *MyContract) Instance(backend bind.ContractBackend, addr common.Address)
} }
// PackGetNums is the Go binding used to pack the parameters required for calling // PackGetNums is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xbd6d1007. // the contract method with ID 0xbd6d1007. This method will panic if any
// invalid/nil inputs are passed.
// //
// Solidity: function GetNums() pure returns(uint256[5]) // Solidity: function GetNums() pure returns(uint256[5])
func (myContract *MyContract) PackGetNums() []byte { func (myContract *MyContract) PackGetNums() []byte {
@ -63,6 +64,15 @@ func (myContract *MyContract) PackGetNums() []byte {
return enc return enc
} }
// TryPackGetNums is the Go binding used to pack the parameters required for calling
// the contract method with ID 0xbd6d1007. This method will return an error
// if any inputs are invalid/nil.
//
// Solidity: function GetNums() pure returns(uint256[5])
func (myContract *MyContract) TryPackGetNums() ([]byte, error) {
return myContract.abi.Pack("GetNums")
}
// UnpackGetNums is the Go binding that unpacks the parameters returned // UnpackGetNums is the Go binding that unpacks the parameters returned
// from invoking the contract method with ID 0xbd6d1007. // from invoking the contract method with ID 0xbd6d1007.
// //
@ -73,5 +83,5 @@ func (myContract *MyContract) UnpackGetNums(data []byte) ([5]*big.Int, error) {
return *new([5]*big.Int), err return *new([5]*big.Int), err
} }
out0 := *abi.ConvertType(out[0], new([5]*big.Int)).(*[5]*big.Int) out0 := *abi.ConvertType(out[0], new([5]*big.Int)).(*[5]*big.Int)
return out0, err return out0, nil
} }