go-transaction-decoder icon indicating copy to clipboard operation
go-transaction-decoder copied to clipboard

generic decoder

Open huahuayu opened this issue 4 years ago • 0 comments

In order to unpack input data, I have to define the input fields.

But if I want to make a generic decoder apply to any contract, for any function input, I can't define all of the input structs in the program.

So if there's a way I can have FunctionInputs struct dynamically, make the fields inside the struct auto reference to the abi?

	// create strut that matches input names to unpack
	type FunctionInputs struct {
		AmountOutMin *big.Int
		Path []common.Address
		To common.Address
		Deadline *big.Int
	}

huahuayu avatar Jan 05 '21 08:01 huahuayu