From 72925917b1ca00deb86266911fda4a4e0b812099 Mon Sep 17 00:00:00 2001 From: andOneBasketball Date: Tue, 22 Oct 2024 18:45:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 +- .../UniswapV2Factory.go | 288 +++++++++--------- contracts/readme.md | 8 +- 3 files changed, 156 insertions(+), 146 deletions(-) rename contracts/{Uniswap-v2 => UniswapV2}/UniswapV2Factory.go (79%) diff --git a/.gitignore b/.gitignore index 48f99ea..16324f0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,9 @@ # OpenZeppelin contracts /contracts/@openzeppelin +/contracts/UniswapV2/*.sol +/contracts/UniswapV2/test +/contracts/UniswapV2/interfaces +/contracts/UniswapV2/libraries -/keystore +/keystore diff --git a/contracts/Uniswap-v2/UniswapV2Factory.go b/contracts/UniswapV2/UniswapV2Factory.go similarity index 79% rename from contracts/Uniswap-v2/UniswapV2Factory.go rename to contracts/UniswapV2/UniswapV2Factory.go index 65c5e5e..5b23fc0 100644 --- a/contracts/Uniswap-v2/UniswapV2Factory.go +++ b/contracts/UniswapV2/UniswapV2Factory.go @@ -1,7 +1,7 @@ // Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. -package UniswapV2Factory +package UniswapV2 import ( "errors" @@ -29,23 +29,23 @@ var ( _ = abi.ConvertType ) -// UniswapV2FactoryMetaData contains all meta data concerning the UniswapV2Factory contract. -var UniswapV2FactoryMetaData = &bind.MetaData{ +// UniswapV2MetaData contains all meta data concerning the UniswapV2 contract. +var UniswapV2MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToSetter\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"PairCreated\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allPairs\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"allPairsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"}],\"name\":\"createPair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeToSetter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getPair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeTo\",\"type\":\"address\"}],\"name\":\"setFeeTo\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToSetter\",\"type\":\"address\"}],\"name\":\"setFeeToSetter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Bin: "0x608060405234801561001057600080fd5b50604051614a45380380614a458339818101604052602081101561003357600080fd5b810190808051906020019092919050505080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506149b0806100956000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063a2e74af61161005b578063a2e74af6146101ad578063c9c65396146101f1578063e6a4390514610295578063f46901ed1461033957610088565b8063017e7e581461008d578063094b7415146100d75780631e3dd18b14610121578063574f2ba31461018f575b600080fd5b61009561037d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100df6103a2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61014d6004803603602081101561013757600080fd5b81019080803590602001909291905050506103c8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610197610404565b6040518082815260200191505060405180910390f35b6101ef600480360360208110156101c357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610411565b005b6102536004803603604081101561020757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610518565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7600480360360408110156102ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bf5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61037b6004803603602081101561034f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c37565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600381815481106103d557fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600380549050905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f556e697377617056323a20464f5242494444454e00000000000000000000000081525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156105bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f556e697377617056323a204944454e544943414c5f414444524553534553000081525060200191505060405180910390fd5b6000808373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16106105f95783856105fc565b84845b91509150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156106a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f556e697377617056323a205a45524f5f4144445245535300000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f556e697377617056323a20504149525f4558495354530000000000000000000081525060200191505060405180910390fd5b6060604051806020016107f390610d3d565b6020820181038252601f19601f82011660405250905060008383604051602001808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140192505050604051602081830303815290604052805190602001209050808251602084016000f594508473ffffffffffffffffffffffffffffffffffffffff1663485cc95585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561095957600080fd5b505af115801561096d573d6000803e3d6000fd5b5050505084600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060038590806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e987600380549050604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a35050505092915050565b60026020528160005260406000206020528060005260406000206000915091509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cfa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f556e697377617056323a20464f5242494444454e00000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b613c3180610d4b8339019056fe60806040526001600c5534801561001557600080fd5b5060004690506040518080613bdf60529139605201905060405180910390206040518060400160405280600a81526020017f556e697377617020563200000000000000000000000000000000000000000000815250805190602001206040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250805190602001208330604051602001808681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200195505050505050604051602081830303815290604052805190602001206003819055505033600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613a6a806101756000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80636a627842116100f9578063ba9a7a5611610097578063d21220a711610071578063d21220a7146108c4578063d505accf1461090e578063dd62ed3e146109a7578063fff6cae914610a1f576101a9565b8063ba9a7a5614610818578063bc25cf7714610836578063c45a01551461087a576101a9565b80637ecebe00116100d35780637ecebe001461067857806389afcb44146106d057806395d89b411461072f578063a9059cbb146107b2576101a9565b80636a627842146105aa57806370a08231146106025780637464fc3d1461065a576101a9565b806323b872dd116101665780633644e515116101405780633644e515146104ec578063485cc9551461050a5780635909c0d51461056e5780635a3d54931461058c576101a9565b806323b872dd1461042457806330adf81f146104aa578063313ce567146104c8576101a9565b8063022c0d9f146101ae57806306fdde031461025b5780630902f1ac146102de578063095ea7b3146103565780630dfe1681146103bc57806318160ddd14610406575b600080fd5b610259600480360360808110156101c457600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610a29565b005b610263611216565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102a3578082015181840152602081019050610288565b50505050905090810190601f1680156102d05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e661124f565b60405180846dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff168152602001836dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff1681526020018263ffffffff1663ffffffff168152602001935050505060405180910390f35b6103a26004803603604081101561036c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112ac565b604051808215151515815260200191505060405180910390f35b6103c46112c3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61040e6112e9565b6040518082815260200191505060405180910390f35b6104906004803603606081101561043a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112ef565b604051808215151515815260200191505060405180910390f35b6104b26114ba565b6040518082815260200191505060405180910390f35b6104d06114e1565b604051808260ff1660ff16815260200191505060405180910390f35b6104f46114e6565b6040518082815260200191505060405180910390f35b61056c6004803603604081101561052057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114ec565b005b610576611635565b6040518082815260200191505060405180910390f35b61059461163b565b6040518082815260200191505060405180910390f35b6105ec600480360360208110156105c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611641565b6040518082815260200191505060405180910390f35b6106446004803603602081101561061857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611af2565b6040518082815260200191505060405180910390f35b610662611b0a565b6040518082815260200191505060405180910390f35b6106ba6004803603602081101561068e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b10565b6040518082815260200191505060405180910390f35b610712600480360360208110156106e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b28565b604051808381526020018281526020019250505060405180910390f35b610737612115565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561077757808201518184015260208101905061075c565b50505050905090810190601f1680156107a45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6107fe600480360360408110156107c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061214e565b604051808215151515815260200191505060405180910390f35b610820612165565b6040518082815260200191505060405180910390f35b6108786004803603602081101561084c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061216b565b005b610882612446565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108cc61246c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6109a5600480360360e081101561092457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803560ff1690602001909291908035906020019092919080359060200190929190505050612492565b005b610a09600480360360408110156109bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506127d6565b6040518082815260200191505060405180910390f35b610a276127fb565b005b6001600c5414610aa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600c819055506000851180610ab85750600084115b610b0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061397c6025913960400191505060405180910390fd5b600080610b1861124f565b5091509150816dffffffffffffffffffffffffffff1687108015610b4b5750806dffffffffffffffffffffffffffff1686105b610ba0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806139c56021913960400191505060405180910390fd5b6000806000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614158015610c5957508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614155b610ccb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f556e697377617056323a20494e56414c49445f544f000000000000000000000081525060200191505060405180910390fd5b60008b1115610ce057610cdf828a8d612a7b565b5b60008a1115610cf557610cf4818a8c612a7b565b5b6000888890501115610ddd578873ffffffffffffffffffffffffffffffffffffffff166310d1e85c338d8d8c8c6040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b158015610dc457600080fd5b505af1158015610dd8573d6000803e3d6000fd5b505050505b8173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610e5a57600080fd5b505afa158015610e6e573d6000803e3d6000fd5b505050506040513d6020811015610e8457600080fd5b810190808051906020019092919050505093508073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610f1457600080fd5b505afa158015610f28573d6000803e3d6000fd5b505050506040513d6020811015610f3e57600080fd5b810190808051906020019092919050505092505050600089856dffffffffffffffffffffffffffff16038311610f75576000610f8b565b89856dffffffffffffffffffffffffffff160383035b9050600089856dffffffffffffffffffffffffffff16038311610faf576000610fc5565b89856dffffffffffffffffffffffffffff160383035b90506000821180610fd65750600081115b61102b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806139a16024913960400191505060405180910390fd5b6000611067611044600385612cc890919063ffffffff16565b6110596103e888612cc890919063ffffffff16565b612d5d90919063ffffffff16565b905060006110a5611082600385612cc890919063ffffffff16565b6110976103e888612cc890919063ffffffff16565b612d5d90919063ffffffff16565b90506110ef620f42406110e1896dffffffffffffffffffffffffffff168b6dffffffffffffffffffffffffffff16612cc890919063ffffffff16565b612cc890919063ffffffff16565b6111028284612cc890919063ffffffff16565b1015611176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f556e697377617056323a204b000000000000000000000000000000000000000081525060200191505060405180910390fd5b505061118484848888612de0565b8873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d82284848f8f6040518085815260200184815260200183815260200182815260200194505050505060405180910390a35050505050506001600c819055505050505050565b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b6000806000600860009054906101000a90046dffffffffffffffffffffffffffff1692506008600e9054906101000a90046dffffffffffffffffffffffffffff1691506008601c9054906101000a900463ffffffff169050909192565b60006112b933848461315e565b6001905092915050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146114a45761142382600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d5d90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6114af848484613249565b600190509392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c960001b81565b601281565b60035481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f556e697377617056323a20464f5242494444454e00000000000000000000000081525060200191505060405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60095481565b600a5481565b60006001600c54146116bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600c819055506000806116ce61124f565b50915091506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561177457600080fd5b505afa158015611788573d6000803e3d6000fd5b505050506040513d602081101561179e57600080fd5b810190808051906020019092919050505090506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561185257600080fd5b505afa158015611866573d6000803e3d6000fd5b505050506040513d602081101561187c57600080fd5b8101908080519060200190929190505050905060006118b4856dffffffffffffffffffffffffffff1684612d5d90919063ffffffff16565b905060006118db856dffffffffffffffffffffffffffff1684612d5d90919063ffffffff16565b905060006118e987876133dd565b9050600080549050600081141561193d576119296103e861191b6119168688612cc890919063ffffffff16565b6135be565b612d5d90919063ffffffff16565b985061193860006103e8613620565b6119a0565b61199d886dffffffffffffffffffffffffffff166119648387612cc890919063ffffffff16565b8161196b57fe5b04886dffffffffffffffffffffffffffff166119908487612cc890919063ffffffff16565b8161199757fe5b0461373a565b98505b600089116119f9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180613a0e6028913960400191505060405180910390fd5b611a038a8a613620565b611a0f86868a8a612de0565b8115611a8757611a806008600e9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16600860009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16612cc890919063ffffffff16565b600b819055505b3373ffffffffffffffffffffffffffffffffffffffff167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f8585604051808381526020018281526020019250505060405180910390a250505050505050506001600c81905550919050565b60016020528060005260406000206000915090505481565b600b5481565b60046020528060005260406000206000915090505481565b6000806001600c5414611ba3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600c81905550600080611bb661124f565b50915091506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c8857600080fd5b505afa158015611c9c573d6000803e3d6000fd5b505050506040513d6020811015611cb257600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d4457600080fd5b505afa158015611d58573d6000803e3d6000fd5b505050506040513d6020811015611d6e57600080fd5b810190808051906020019092919050505090506000600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000611dd188886133dd565b905060008054905080611ded8685612cc890919063ffffffff16565b81611df457fe5b049a5080611e0b8585612cc890919063ffffffff16565b81611e1257fe5b04995060008b118015611e25575060008a115b611e7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806139e66028913960400191505060405180910390fd5b611e843084613753565b611e8f878d8d612a7b565b611e9a868d8c612a7b565b8673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611f1757600080fd5b505afa158015611f2b573d6000803e3d6000fd5b505050506040513d6020811015611f4157600080fd5b810190808051906020019092919050505094508573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611fd157600080fd5b505afa158015611fe5573d6000803e3d6000fd5b505050506040513d6020811015611ffb57600080fd5b8101908080519060200190929190505050935061201a85858b8b612de0565b81156120925761208b6008600e9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16600860009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16612cc890919063ffffffff16565b600b819055505b8b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d819364968d8d604051808381526020018281526020019250505060405180910390a35050505050505050506001600c81905550915091565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b600061215b338484613249565b6001905092915050565b6103e881565b6001600c54146121e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600c819055506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506123398284612334600860009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156122eb57600080fd5b505afa1580156122ff573d6000803e3d6000fd5b505050506040513d602081101561231557600080fd5b8101908080519060200190929190505050612d5d90919063ffffffff16565b612a7b565b61243981846124346008600e9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156123eb57600080fd5b505afa1580156123ff573d6000803e3d6000fd5b505050506040513d602081101561241557600080fd5b8101908080519060200190929190505050612d5d90919063ffffffff16565b612a7b565b50506001600c8190555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b42841015612508576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f556e697377617056323a2045585049524544000000000000000000000000000081525060200191505060405180910390fd5b60006003547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c960001b898989600460008e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190600101919050558a604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040528051906020012060405160200180807f190100000000000000000000000000000000000000000000000000000000000081525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050600060018286868660405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156126da573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561274e57508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b6127c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f556e697377617056323a20494e56414c49445f5349474e41545552450000000081525060200191505060405180910390fd5b6127cb89898961315e565b505050505050505050565b6002602052816000526040600020602052806000526040600020600091509150505481565b6001600c5414612873576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600c81905550612a71600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561291d57600080fd5b505afa158015612931573d6000803e3d6000fd5b505050506040513d602081101561294757600080fd5b8101908080519060200190929190505050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156129f757600080fd5b505afa158015612a0b573d6000803e3d6000fd5b505050506040513d6020811015612a2157600080fd5b8101908080519060200190929190505050600860009054906101000a90046dffffffffffffffffffffffffffff166008600e9054906101000a90046dffffffffffffffffffffffffffff16612de0565b6001600c81905550565b600060608473ffffffffffffffffffffffffffffffffffffffff166040518060400160405280601981526020017f7472616e7366657228616464726573732c75696e743235362900000000000000815250805190602001208585604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310612ba85780518252602082019150602081019050602083039250612b85565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612c0a576040519150601f19603f3d011682016040523d82523d6000602084013e612c0f565b606091505b5091509150818015612c4f5750600081511480612c4e5750808060200190516020811015612c3c57600080fd5b81019080805190602001909291905050505b5b612cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f556e697377617056323a205452414e534645525f4641494c454400000000000081525060200191505060405180910390fd5b5050505050565b600080821480612ce55750828283850292508281612ce257fe5b04145b612d57576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6d756c2d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b92915050565b6000828284039150811115612dda576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f64732d6d6174682d7375622d756e646572666c6f77000000000000000000000081525060200191505060405180910390fd5b92915050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6dffffffffffffffffffffffffffff168411158015612e5057507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6dffffffffffffffffffffffffffff168311155b612ec2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f556e697377617056323a204f564552464c4f570000000000000000000000000081525060200191505060405180910390fd5b60006401000000004281612ed257fe5b06905060006008601c9054906101000a900463ffffffff168203905060008163ffffffff16118015612f1557506000846dffffffffffffffffffffffffffff1614155b8015612f3257506000836dffffffffffffffffffffffffffff1614155b15613014578063ffffffff16612f7785612f4b8661386d565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1661389890919063ffffffff16565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16026009600082825401925050819055508063ffffffff16612fe584612fb98761386d565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1661389890919063ffffffff16565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1602600a600082825401925050819055505b85600860006101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff160217905550846008600e6101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff160217905550816008601c6101000a81548163ffffffff021916908363ffffffff1602179055507f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1600860009054906101000a90046dffffffffffffffffffffffffffff166008600e9054906101000a90046dffffffffffffffffffffffffffff1660405180836dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff168152602001826dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff1681526020019250505060405180910390a1505050505050565b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b61329b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d5d90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061333081600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138f890919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b15801561344857600080fd5b505afa15801561345c573d6000803e3d6000fd5b505050506040513d602081101561347257600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141591506000600b54905082156135a4576000811461359f57600061350a613505866dffffffffffffffffffffffffffff16886dffffffffffffffffffffffffffff16612cc890919063ffffffff16565b6135be565b90506000613517836135be565b90508082111561359c57600061354a6135398385612d5d90919063ffffffff16565b600054612cc890919063ffffffff16565b9050600061357483613566600587612cc890919063ffffffff16565b6138f890919063ffffffff16565b9050600081838161358157fe5b0490506000811115613598576135978782613620565b5b5050505b50505b6135b6565b600081146135b5576000600b819055505b5b505092915050565b6000600382111561360d5781905060006001600284816135da57fe5b040190505b81811015613607578091506002818285816135f657fe5b0401816135ff57fe5b0490506135df565b5061361b565b6000821461361a57600190505b5b919050565b613635816000546138f890919063ffffffff16565b60008190555061368d81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138f890919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000818310613749578161374b565b825b905092915050565b6137a581600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d5d90919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506137fd81600054612d5d90919063ffffffff16565b600081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60006e010000000000000000000000000000826dffffffffffffffffffffffffffff16029050919050565b6000816dffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16816138ef57fe5b04905092915050565b6000828284019150811015613975576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6164642d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b9291505056fe556e697377617056323a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f494e5055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f4c4951554944495459556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4255524e4544556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4d494e544544a265627a7a7231582008c5b6ed132508c04d8b27eb03dd73aa13e728d5778d72483dcb28448174303d64736f6c63430005100032454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429a265627a7a723158203e97dc4b29ae137d490df910c3a8cd37241e3242a3807f72d51bafd9371652b364736f6c63430005100032", } -// UniswapV2FactoryABI is the input ABI used to generate the binding from. -// Deprecated: Use UniswapV2FactoryMetaData.ABI instead. -var UniswapV2FactoryABI = UniswapV2FactoryMetaData.ABI +// UniswapV2ABI is the input ABI used to generate the binding from. +// Deprecated: Use UniswapV2MetaData.ABI instead. +var UniswapV2ABI = UniswapV2MetaData.ABI -// UniswapV2FactoryBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use UniswapV2FactoryMetaData.Bin instead. -var UniswapV2FactoryBin = UniswapV2FactoryMetaData.Bin +// UniswapV2Bin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use UniswapV2MetaData.Bin instead. +var UniswapV2Bin = UniswapV2MetaData.Bin -// DeployUniswapV2Factory deploys a new Ethereum contract, binding an instance of UniswapV2Factory to it. -func DeployUniswapV2Factory(auth *bind.TransactOpts, backend bind.ContractBackend, _feeToSetter common.Address) (common.Address, *types.Transaction, *UniswapV2Factory, error) { - parsed, err := UniswapV2FactoryMetaData.GetAbi() +// DeployUniswapV2 deploys a new Ethereum contract, binding an instance of UniswapV2 to it. +func DeployUniswapV2(auth *bind.TransactOpts, backend bind.ContractBackend, _feeToSetter common.Address) (common.Address, *types.Transaction, *UniswapV2, error) { + parsed, err := UniswapV2MetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err } @@ -53,111 +53,111 @@ func DeployUniswapV2Factory(auth *bind.TransactOpts, backend bind.ContractBacken return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(UniswapV2FactoryBin), backend, _feeToSetter) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(UniswapV2Bin), backend, _feeToSetter) if err != nil { return common.Address{}, nil, nil, err } - return address, tx, &UniswapV2Factory{UniswapV2FactoryCaller: UniswapV2FactoryCaller{contract: contract}, UniswapV2FactoryTransactor: UniswapV2FactoryTransactor{contract: contract}, UniswapV2FactoryFilterer: UniswapV2FactoryFilterer{contract: contract}}, nil + return address, tx, &UniswapV2{UniswapV2Caller: UniswapV2Caller{contract: contract}, UniswapV2Transactor: UniswapV2Transactor{contract: contract}, UniswapV2Filterer: UniswapV2Filterer{contract: contract}}, nil } -// UniswapV2Factory is an auto generated Go binding around an Ethereum contract. -type UniswapV2Factory struct { - UniswapV2FactoryCaller // Read-only binding to the contract - UniswapV2FactoryTransactor // Write-only binding to the contract - UniswapV2FactoryFilterer // Log filterer for contract events +// UniswapV2 is an auto generated Go binding around an Ethereum contract. +type UniswapV2 struct { + UniswapV2Caller // Read-only binding to the contract + UniswapV2Transactor // Write-only binding to the contract + UniswapV2Filterer // Log filterer for contract events } -// UniswapV2FactoryCaller is an auto generated read-only Go binding around an Ethereum contract. -type UniswapV2FactoryCaller struct { +// UniswapV2Caller is an auto generated read-only Go binding around an Ethereum contract. +type UniswapV2Caller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// UniswapV2FactoryTransactor is an auto generated write-only Go binding around an Ethereum contract. -type UniswapV2FactoryTransactor struct { +// UniswapV2Transactor is an auto generated write-only Go binding around an Ethereum contract. +type UniswapV2Transactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// UniswapV2FactoryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type UniswapV2FactoryFilterer struct { +// UniswapV2Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UniswapV2Filterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// UniswapV2FactorySession is an auto generated Go binding around an Ethereum contract, +// UniswapV2Session is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type UniswapV2FactorySession struct { - Contract *UniswapV2Factory // Generic contract binding to set the session for +type UniswapV2Session struct { + Contract *UniswapV2 // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// UniswapV2FactoryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// UniswapV2CallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type UniswapV2FactoryCallerSession struct { - Contract *UniswapV2FactoryCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session +type UniswapV2CallerSession struct { + Contract *UniswapV2Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session } -// UniswapV2FactoryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// UniswapV2TransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type UniswapV2FactoryTransactorSession struct { - Contract *UniswapV2FactoryTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +type UniswapV2TransactorSession struct { + Contract *UniswapV2Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// UniswapV2FactoryRaw is an auto generated low-level Go binding around an Ethereum contract. -type UniswapV2FactoryRaw struct { - Contract *UniswapV2Factory // Generic contract binding to access the raw methods on +// UniswapV2Raw is an auto generated low-level Go binding around an Ethereum contract. +type UniswapV2Raw struct { + Contract *UniswapV2 // Generic contract binding to access the raw methods on } -// UniswapV2FactoryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type UniswapV2FactoryCallerRaw struct { - Contract *UniswapV2FactoryCaller // Generic read-only contract binding to access the raw methods on +// UniswapV2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UniswapV2CallerRaw struct { + Contract *UniswapV2Caller // Generic read-only contract binding to access the raw methods on } -// UniswapV2FactoryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type UniswapV2FactoryTransactorRaw struct { - Contract *UniswapV2FactoryTransactor // Generic write-only contract binding to access the raw methods on +// UniswapV2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UniswapV2TransactorRaw struct { + Contract *UniswapV2Transactor // Generic write-only contract binding to access the raw methods on } -// NewUniswapV2Factory creates a new instance of UniswapV2Factory, bound to a specific deployed contract. -func NewUniswapV2Factory(address common.Address, backend bind.ContractBackend) (*UniswapV2Factory, error) { - contract, err := bindUniswapV2Factory(address, backend, backend, backend) +// NewUniswapV2 creates a new instance of UniswapV2, bound to a specific deployed contract. +func NewUniswapV2(address common.Address, backend bind.ContractBackend) (*UniswapV2, error) { + contract, err := bindUniswapV2(address, backend, backend, backend) if err != nil { return nil, err } - return &UniswapV2Factory{UniswapV2FactoryCaller: UniswapV2FactoryCaller{contract: contract}, UniswapV2FactoryTransactor: UniswapV2FactoryTransactor{contract: contract}, UniswapV2FactoryFilterer: UniswapV2FactoryFilterer{contract: contract}}, nil + return &UniswapV2{UniswapV2Caller: UniswapV2Caller{contract: contract}, UniswapV2Transactor: UniswapV2Transactor{contract: contract}, UniswapV2Filterer: UniswapV2Filterer{contract: contract}}, nil } -// NewUniswapV2FactoryCaller creates a new read-only instance of UniswapV2Factory, bound to a specific deployed contract. -func NewUniswapV2FactoryCaller(address common.Address, caller bind.ContractCaller) (*UniswapV2FactoryCaller, error) { - contract, err := bindUniswapV2Factory(address, caller, nil, nil) +// NewUniswapV2Caller creates a new read-only instance of UniswapV2, bound to a specific deployed contract. +func NewUniswapV2Caller(address common.Address, caller bind.ContractCaller) (*UniswapV2Caller, error) { + contract, err := bindUniswapV2(address, caller, nil, nil) if err != nil { return nil, err } - return &UniswapV2FactoryCaller{contract: contract}, nil + return &UniswapV2Caller{contract: contract}, nil } -// NewUniswapV2FactoryTransactor creates a new write-only instance of UniswapV2Factory, bound to a specific deployed contract. -func NewUniswapV2FactoryTransactor(address common.Address, transactor bind.ContractTransactor) (*UniswapV2FactoryTransactor, error) { - contract, err := bindUniswapV2Factory(address, nil, transactor, nil) +// NewUniswapV2Transactor creates a new write-only instance of UniswapV2, bound to a specific deployed contract. +func NewUniswapV2Transactor(address common.Address, transactor bind.ContractTransactor) (*UniswapV2Transactor, error) { + contract, err := bindUniswapV2(address, nil, transactor, nil) if err != nil { return nil, err } - return &UniswapV2FactoryTransactor{contract: contract}, nil + return &UniswapV2Transactor{contract: contract}, nil } -// NewUniswapV2FactoryFilterer creates a new log filterer instance of UniswapV2Factory, bound to a specific deployed contract. -func NewUniswapV2FactoryFilterer(address common.Address, filterer bind.ContractFilterer) (*UniswapV2FactoryFilterer, error) { - contract, err := bindUniswapV2Factory(address, nil, nil, filterer) +// NewUniswapV2Filterer creates a new log filterer instance of UniswapV2, bound to a specific deployed contract. +func NewUniswapV2Filterer(address common.Address, filterer bind.ContractFilterer) (*UniswapV2Filterer, error) { + contract, err := bindUniswapV2(address, nil, nil, filterer) if err != nil { return nil, err } - return &UniswapV2FactoryFilterer{contract: contract}, nil + return &UniswapV2Filterer{contract: contract}, nil } -// bindUniswapV2Factory binds a generic wrapper to an already deployed contract. -func bindUniswapV2Factory(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := UniswapV2FactoryMetaData.GetAbi() +// bindUniswapV2 binds a generic wrapper to an already deployed contract. +func bindUniswapV2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := UniswapV2MetaData.GetAbi() if err != nil { return nil, err } @@ -168,46 +168,46 @@ func bindUniswapV2Factory(address common.Address, caller bind.ContractCaller, tr // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_UniswapV2Factory *UniswapV2FactoryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _UniswapV2Factory.Contract.UniswapV2FactoryCaller.contract.Call(opts, result, method, params...) +func (_UniswapV2 *UniswapV2Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2.Contract.UniswapV2Caller.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_UniswapV2Factory *UniswapV2FactoryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _UniswapV2Factory.Contract.UniswapV2FactoryTransactor.contract.Transfer(opts) +func (_UniswapV2 *UniswapV2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2.Contract.UniswapV2Transactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_UniswapV2Factory *UniswapV2FactoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _UniswapV2Factory.Contract.UniswapV2FactoryTransactor.contract.Transact(opts, method, params...) +func (_UniswapV2 *UniswapV2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2.Contract.UniswapV2Transactor.contract.Transact(opts, method, params...) } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_UniswapV2Factory *UniswapV2FactoryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _UniswapV2Factory.Contract.contract.Call(opts, result, method, params...) +func (_UniswapV2 *UniswapV2CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2.Contract.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_UniswapV2Factory *UniswapV2FactoryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _UniswapV2Factory.Contract.contract.Transfer(opts) +func (_UniswapV2 *UniswapV2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_UniswapV2Factory *UniswapV2FactoryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _UniswapV2Factory.Contract.contract.Transact(opts, method, params...) +func (_UniswapV2 *UniswapV2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2.Contract.contract.Transact(opts, method, params...) } // AllPairs is a free data retrieval call binding the contract method 0x1e3dd18b. // // Solidity: function allPairs(uint256 ) view returns(address) -func (_UniswapV2Factory *UniswapV2FactoryCaller) AllPairs(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { +func (_UniswapV2 *UniswapV2Caller) AllPairs(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { var out []interface{} - err := _UniswapV2Factory.contract.Call(opts, &out, "allPairs", arg0) + err := _UniswapV2.contract.Call(opts, &out, "allPairs", arg0) if err != nil { return *new(common.Address), err @@ -222,23 +222,23 @@ func (_UniswapV2Factory *UniswapV2FactoryCaller) AllPairs(opts *bind.CallOpts, a // AllPairs is a free data retrieval call binding the contract method 0x1e3dd18b. // // Solidity: function allPairs(uint256 ) view returns(address) -func (_UniswapV2Factory *UniswapV2FactorySession) AllPairs(arg0 *big.Int) (common.Address, error) { - return _UniswapV2Factory.Contract.AllPairs(&_UniswapV2Factory.CallOpts, arg0) +func (_UniswapV2 *UniswapV2Session) AllPairs(arg0 *big.Int) (common.Address, error) { + return _UniswapV2.Contract.AllPairs(&_UniswapV2.CallOpts, arg0) } // AllPairs is a free data retrieval call binding the contract method 0x1e3dd18b. // // Solidity: function allPairs(uint256 ) view returns(address) -func (_UniswapV2Factory *UniswapV2FactoryCallerSession) AllPairs(arg0 *big.Int) (common.Address, error) { - return _UniswapV2Factory.Contract.AllPairs(&_UniswapV2Factory.CallOpts, arg0) +func (_UniswapV2 *UniswapV2CallerSession) AllPairs(arg0 *big.Int) (common.Address, error) { + return _UniswapV2.Contract.AllPairs(&_UniswapV2.CallOpts, arg0) } // AllPairsLength is a free data retrieval call binding the contract method 0x574f2ba3. // // Solidity: function allPairsLength() view returns(uint256) -func (_UniswapV2Factory *UniswapV2FactoryCaller) AllPairsLength(opts *bind.CallOpts) (*big.Int, error) { +func (_UniswapV2 *UniswapV2Caller) AllPairsLength(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _UniswapV2Factory.contract.Call(opts, &out, "allPairsLength") + err := _UniswapV2.contract.Call(opts, &out, "allPairsLength") if err != nil { return *new(*big.Int), err @@ -253,23 +253,23 @@ func (_UniswapV2Factory *UniswapV2FactoryCaller) AllPairsLength(opts *bind.CallO // AllPairsLength is a free data retrieval call binding the contract method 0x574f2ba3. // // Solidity: function allPairsLength() view returns(uint256) -func (_UniswapV2Factory *UniswapV2FactorySession) AllPairsLength() (*big.Int, error) { - return _UniswapV2Factory.Contract.AllPairsLength(&_UniswapV2Factory.CallOpts) +func (_UniswapV2 *UniswapV2Session) AllPairsLength() (*big.Int, error) { + return _UniswapV2.Contract.AllPairsLength(&_UniswapV2.CallOpts) } // AllPairsLength is a free data retrieval call binding the contract method 0x574f2ba3. // // Solidity: function allPairsLength() view returns(uint256) -func (_UniswapV2Factory *UniswapV2FactoryCallerSession) AllPairsLength() (*big.Int, error) { - return _UniswapV2Factory.Contract.AllPairsLength(&_UniswapV2Factory.CallOpts) +func (_UniswapV2 *UniswapV2CallerSession) AllPairsLength() (*big.Int, error) { + return _UniswapV2.Contract.AllPairsLength(&_UniswapV2.CallOpts) } // FeeTo is a free data retrieval call binding the contract method 0x017e7e58. // // Solidity: function feeTo() view returns(address) -func (_UniswapV2Factory *UniswapV2FactoryCaller) FeeTo(opts *bind.CallOpts) (common.Address, error) { +func (_UniswapV2 *UniswapV2Caller) FeeTo(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _UniswapV2Factory.contract.Call(opts, &out, "feeTo") + err := _UniswapV2.contract.Call(opts, &out, "feeTo") if err != nil { return *new(common.Address), err @@ -284,23 +284,23 @@ func (_UniswapV2Factory *UniswapV2FactoryCaller) FeeTo(opts *bind.CallOpts) (com // FeeTo is a free data retrieval call binding the contract method 0x017e7e58. // // Solidity: function feeTo() view returns(address) -func (_UniswapV2Factory *UniswapV2FactorySession) FeeTo() (common.Address, error) { - return _UniswapV2Factory.Contract.FeeTo(&_UniswapV2Factory.CallOpts) +func (_UniswapV2 *UniswapV2Session) FeeTo() (common.Address, error) { + return _UniswapV2.Contract.FeeTo(&_UniswapV2.CallOpts) } // FeeTo is a free data retrieval call binding the contract method 0x017e7e58. // // Solidity: function feeTo() view returns(address) -func (_UniswapV2Factory *UniswapV2FactoryCallerSession) FeeTo() (common.Address, error) { - return _UniswapV2Factory.Contract.FeeTo(&_UniswapV2Factory.CallOpts) +func (_UniswapV2 *UniswapV2CallerSession) FeeTo() (common.Address, error) { + return _UniswapV2.Contract.FeeTo(&_UniswapV2.CallOpts) } // FeeToSetter is a free data retrieval call binding the contract method 0x094b7415. // // Solidity: function feeToSetter() view returns(address) -func (_UniswapV2Factory *UniswapV2FactoryCaller) FeeToSetter(opts *bind.CallOpts) (common.Address, error) { +func (_UniswapV2 *UniswapV2Caller) FeeToSetter(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _UniswapV2Factory.contract.Call(opts, &out, "feeToSetter") + err := _UniswapV2.contract.Call(opts, &out, "feeToSetter") if err != nil { return *new(common.Address), err @@ -315,23 +315,23 @@ func (_UniswapV2Factory *UniswapV2FactoryCaller) FeeToSetter(opts *bind.CallOpts // FeeToSetter is a free data retrieval call binding the contract method 0x094b7415. // // Solidity: function feeToSetter() view returns(address) -func (_UniswapV2Factory *UniswapV2FactorySession) FeeToSetter() (common.Address, error) { - return _UniswapV2Factory.Contract.FeeToSetter(&_UniswapV2Factory.CallOpts) +func (_UniswapV2 *UniswapV2Session) FeeToSetter() (common.Address, error) { + return _UniswapV2.Contract.FeeToSetter(&_UniswapV2.CallOpts) } // FeeToSetter is a free data retrieval call binding the contract method 0x094b7415. // // Solidity: function feeToSetter() view returns(address) -func (_UniswapV2Factory *UniswapV2FactoryCallerSession) FeeToSetter() (common.Address, error) { - return _UniswapV2Factory.Contract.FeeToSetter(&_UniswapV2Factory.CallOpts) +func (_UniswapV2 *UniswapV2CallerSession) FeeToSetter() (common.Address, error) { + return _UniswapV2.Contract.FeeToSetter(&_UniswapV2.CallOpts) } // GetPair is a free data retrieval call binding the contract method 0xe6a43905. // // Solidity: function getPair(address , address ) view returns(address) -func (_UniswapV2Factory *UniswapV2FactoryCaller) GetPair(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (common.Address, error) { +func (_UniswapV2 *UniswapV2Caller) GetPair(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (common.Address, error) { var out []interface{} - err := _UniswapV2Factory.contract.Call(opts, &out, "getPair", arg0, arg1) + err := _UniswapV2.contract.Call(opts, &out, "getPair", arg0, arg1) if err != nil { return *new(common.Address), err @@ -346,83 +346,83 @@ func (_UniswapV2Factory *UniswapV2FactoryCaller) GetPair(opts *bind.CallOpts, ar // GetPair is a free data retrieval call binding the contract method 0xe6a43905. // // Solidity: function getPair(address , address ) view returns(address) -func (_UniswapV2Factory *UniswapV2FactorySession) GetPair(arg0 common.Address, arg1 common.Address) (common.Address, error) { - return _UniswapV2Factory.Contract.GetPair(&_UniswapV2Factory.CallOpts, arg0, arg1) +func (_UniswapV2 *UniswapV2Session) GetPair(arg0 common.Address, arg1 common.Address) (common.Address, error) { + return _UniswapV2.Contract.GetPair(&_UniswapV2.CallOpts, arg0, arg1) } // GetPair is a free data retrieval call binding the contract method 0xe6a43905. // // Solidity: function getPair(address , address ) view returns(address) -func (_UniswapV2Factory *UniswapV2FactoryCallerSession) GetPair(arg0 common.Address, arg1 common.Address) (common.Address, error) { - return _UniswapV2Factory.Contract.GetPair(&_UniswapV2Factory.CallOpts, arg0, arg1) +func (_UniswapV2 *UniswapV2CallerSession) GetPair(arg0 common.Address, arg1 common.Address) (common.Address, error) { + return _UniswapV2.Contract.GetPair(&_UniswapV2.CallOpts, arg0, arg1) } // CreatePair is a paid mutator transaction binding the contract method 0xc9c65396. // // Solidity: function createPair(address tokenA, address tokenB) returns(address pair) -func (_UniswapV2Factory *UniswapV2FactoryTransactor) CreatePair(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { - return _UniswapV2Factory.contract.Transact(opts, "createPair", tokenA, tokenB) +func (_UniswapV2 *UniswapV2Transactor) CreatePair(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { + return _UniswapV2.contract.Transact(opts, "createPair", tokenA, tokenB) } // CreatePair is a paid mutator transaction binding the contract method 0xc9c65396. // // Solidity: function createPair(address tokenA, address tokenB) returns(address pair) -func (_UniswapV2Factory *UniswapV2FactorySession) CreatePair(tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { - return _UniswapV2Factory.Contract.CreatePair(&_UniswapV2Factory.TransactOpts, tokenA, tokenB) +func (_UniswapV2 *UniswapV2Session) CreatePair(tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { + return _UniswapV2.Contract.CreatePair(&_UniswapV2.TransactOpts, tokenA, tokenB) } // CreatePair is a paid mutator transaction binding the contract method 0xc9c65396. // // Solidity: function createPair(address tokenA, address tokenB) returns(address pair) -func (_UniswapV2Factory *UniswapV2FactoryTransactorSession) CreatePair(tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { - return _UniswapV2Factory.Contract.CreatePair(&_UniswapV2Factory.TransactOpts, tokenA, tokenB) +func (_UniswapV2 *UniswapV2TransactorSession) CreatePair(tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { + return _UniswapV2.Contract.CreatePair(&_UniswapV2.TransactOpts, tokenA, tokenB) } // SetFeeTo is a paid mutator transaction binding the contract method 0xf46901ed. // // Solidity: function setFeeTo(address _feeTo) returns() -func (_UniswapV2Factory *UniswapV2FactoryTransactor) SetFeeTo(opts *bind.TransactOpts, _feeTo common.Address) (*types.Transaction, error) { - return _UniswapV2Factory.contract.Transact(opts, "setFeeTo", _feeTo) +func (_UniswapV2 *UniswapV2Transactor) SetFeeTo(opts *bind.TransactOpts, _feeTo common.Address) (*types.Transaction, error) { + return _UniswapV2.contract.Transact(opts, "setFeeTo", _feeTo) } // SetFeeTo is a paid mutator transaction binding the contract method 0xf46901ed. // // Solidity: function setFeeTo(address _feeTo) returns() -func (_UniswapV2Factory *UniswapV2FactorySession) SetFeeTo(_feeTo common.Address) (*types.Transaction, error) { - return _UniswapV2Factory.Contract.SetFeeTo(&_UniswapV2Factory.TransactOpts, _feeTo) +func (_UniswapV2 *UniswapV2Session) SetFeeTo(_feeTo common.Address) (*types.Transaction, error) { + return _UniswapV2.Contract.SetFeeTo(&_UniswapV2.TransactOpts, _feeTo) } // SetFeeTo is a paid mutator transaction binding the contract method 0xf46901ed. // // Solidity: function setFeeTo(address _feeTo) returns() -func (_UniswapV2Factory *UniswapV2FactoryTransactorSession) SetFeeTo(_feeTo common.Address) (*types.Transaction, error) { - return _UniswapV2Factory.Contract.SetFeeTo(&_UniswapV2Factory.TransactOpts, _feeTo) +func (_UniswapV2 *UniswapV2TransactorSession) SetFeeTo(_feeTo common.Address) (*types.Transaction, error) { + return _UniswapV2.Contract.SetFeeTo(&_UniswapV2.TransactOpts, _feeTo) } // SetFeeToSetter is a paid mutator transaction binding the contract method 0xa2e74af6. // // Solidity: function setFeeToSetter(address _feeToSetter) returns() -func (_UniswapV2Factory *UniswapV2FactoryTransactor) SetFeeToSetter(opts *bind.TransactOpts, _feeToSetter common.Address) (*types.Transaction, error) { - return _UniswapV2Factory.contract.Transact(opts, "setFeeToSetter", _feeToSetter) +func (_UniswapV2 *UniswapV2Transactor) SetFeeToSetter(opts *bind.TransactOpts, _feeToSetter common.Address) (*types.Transaction, error) { + return _UniswapV2.contract.Transact(opts, "setFeeToSetter", _feeToSetter) } // SetFeeToSetter is a paid mutator transaction binding the contract method 0xa2e74af6. // // Solidity: function setFeeToSetter(address _feeToSetter) returns() -func (_UniswapV2Factory *UniswapV2FactorySession) SetFeeToSetter(_feeToSetter common.Address) (*types.Transaction, error) { - return _UniswapV2Factory.Contract.SetFeeToSetter(&_UniswapV2Factory.TransactOpts, _feeToSetter) +func (_UniswapV2 *UniswapV2Session) SetFeeToSetter(_feeToSetter common.Address) (*types.Transaction, error) { + return _UniswapV2.Contract.SetFeeToSetter(&_UniswapV2.TransactOpts, _feeToSetter) } // SetFeeToSetter is a paid mutator transaction binding the contract method 0xa2e74af6. // // Solidity: function setFeeToSetter(address _feeToSetter) returns() -func (_UniswapV2Factory *UniswapV2FactoryTransactorSession) SetFeeToSetter(_feeToSetter common.Address) (*types.Transaction, error) { - return _UniswapV2Factory.Contract.SetFeeToSetter(&_UniswapV2Factory.TransactOpts, _feeToSetter) +func (_UniswapV2 *UniswapV2TransactorSession) SetFeeToSetter(_feeToSetter common.Address) (*types.Transaction, error) { + return _UniswapV2.Contract.SetFeeToSetter(&_UniswapV2.TransactOpts, _feeToSetter) } -// UniswapV2FactoryPairCreatedIterator is returned from FilterPairCreated and is used to iterate over the raw logs and unpacked data for PairCreated events raised by the UniswapV2Factory contract. -type UniswapV2FactoryPairCreatedIterator struct { - Event *UniswapV2FactoryPairCreated // Event containing the contract specifics and raw log +// UniswapV2PairCreatedIterator is returned from FilterPairCreated and is used to iterate over the raw logs and unpacked data for PairCreated events raised by the UniswapV2 contract. +type UniswapV2PairCreatedIterator struct { + Event *UniswapV2PairCreated // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -436,7 +436,7 @@ type UniswapV2FactoryPairCreatedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *UniswapV2FactoryPairCreatedIterator) Next() bool { +func (it *UniswapV2PairCreatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -445,7 +445,7 @@ func (it *UniswapV2FactoryPairCreatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(UniswapV2FactoryPairCreated) + it.Event = new(UniswapV2PairCreated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -460,7 +460,7 @@ func (it *UniswapV2FactoryPairCreatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(UniswapV2FactoryPairCreated) + it.Event = new(UniswapV2PairCreated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -476,19 +476,19 @@ func (it *UniswapV2FactoryPairCreatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *UniswapV2FactoryPairCreatedIterator) Error() error { +func (it *UniswapV2PairCreatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *UniswapV2FactoryPairCreatedIterator) Close() error { +func (it *UniswapV2PairCreatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// UniswapV2FactoryPairCreated represents a PairCreated event raised by the UniswapV2Factory contract. -type UniswapV2FactoryPairCreated struct { +// UniswapV2PairCreated represents a PairCreated event raised by the UniswapV2 contract. +type UniswapV2PairCreated struct { Token0 common.Address Token1 common.Address Pair common.Address @@ -499,7 +499,7 @@ type UniswapV2FactoryPairCreated struct { // FilterPairCreated is a free log retrieval operation binding the contract event 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9. // // Solidity: event PairCreated(address indexed token0, address indexed token1, address pair, uint256 arg3) -func (_UniswapV2Factory *UniswapV2FactoryFilterer) FilterPairCreated(opts *bind.FilterOpts, token0 []common.Address, token1 []common.Address) (*UniswapV2FactoryPairCreatedIterator, error) { +func (_UniswapV2 *UniswapV2Filterer) FilterPairCreated(opts *bind.FilterOpts, token0 []common.Address, token1 []common.Address) (*UniswapV2PairCreatedIterator, error) { var token0Rule []interface{} for _, token0Item := range token0 { @@ -510,17 +510,17 @@ func (_UniswapV2Factory *UniswapV2FactoryFilterer) FilterPairCreated(opts *bind. token1Rule = append(token1Rule, token1Item) } - logs, sub, err := _UniswapV2Factory.contract.FilterLogs(opts, "PairCreated", token0Rule, token1Rule) + logs, sub, err := _UniswapV2.contract.FilterLogs(opts, "PairCreated", token0Rule, token1Rule) if err != nil { return nil, err } - return &UniswapV2FactoryPairCreatedIterator{contract: _UniswapV2Factory.contract, event: "PairCreated", logs: logs, sub: sub}, nil + return &UniswapV2PairCreatedIterator{contract: _UniswapV2.contract, event: "PairCreated", logs: logs, sub: sub}, nil } // WatchPairCreated is a free log subscription operation binding the contract event 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9. // // Solidity: event PairCreated(address indexed token0, address indexed token1, address pair, uint256 arg3) -func (_UniswapV2Factory *UniswapV2FactoryFilterer) WatchPairCreated(opts *bind.WatchOpts, sink chan<- *UniswapV2FactoryPairCreated, token0 []common.Address, token1 []common.Address) (event.Subscription, error) { +func (_UniswapV2 *UniswapV2Filterer) WatchPairCreated(opts *bind.WatchOpts, sink chan<- *UniswapV2PairCreated, token0 []common.Address, token1 []common.Address) (event.Subscription, error) { var token0Rule []interface{} for _, token0Item := range token0 { @@ -531,7 +531,7 @@ func (_UniswapV2Factory *UniswapV2FactoryFilterer) WatchPairCreated(opts *bind.W token1Rule = append(token1Rule, token1Item) } - logs, sub, err := _UniswapV2Factory.contract.WatchLogs(opts, "PairCreated", token0Rule, token1Rule) + logs, sub, err := _UniswapV2.contract.WatchLogs(opts, "PairCreated", token0Rule, token1Rule) if err != nil { return nil, err } @@ -541,8 +541,8 @@ func (_UniswapV2Factory *UniswapV2FactoryFilterer) WatchPairCreated(opts *bind.W select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(UniswapV2FactoryPairCreated) - if err := _UniswapV2Factory.contract.UnpackLog(event, "PairCreated", log); err != nil { + event := new(UniswapV2PairCreated) + if err := _UniswapV2.contract.UnpackLog(event, "PairCreated", log); err != nil { return err } event.Raw = log @@ -566,9 +566,9 @@ func (_UniswapV2Factory *UniswapV2FactoryFilterer) WatchPairCreated(opts *bind.W // ParsePairCreated is a log parse operation binding the contract event 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9. // // Solidity: event PairCreated(address indexed token0, address indexed token1, address pair, uint256 arg3) -func (_UniswapV2Factory *UniswapV2FactoryFilterer) ParsePairCreated(log types.Log) (*UniswapV2FactoryPairCreated, error) { - event := new(UniswapV2FactoryPairCreated) - if err := _UniswapV2Factory.contract.UnpackLog(event, "PairCreated", log); err != nil { +func (_UniswapV2 *UniswapV2Filterer) ParsePairCreated(log types.Log) (*UniswapV2PairCreated, error) { + event := new(UniswapV2PairCreated) + if err := _UniswapV2.contract.UnpackLog(event, "PairCreated", log); err != nil { return nil, err } event.Raw = log diff --git a/contracts/readme.md b/contracts/readme.md index ad38b19..c528aee 100644 --- a/contracts/readme.md +++ b/contracts/readme.md @@ -4,4 +4,10 @@ solc --abi --bin test.sol 若是想要输出文件则是: solc --abi --bin -o ./ test.sol abigen 结合bin和abi编译Golang文件 -abigen --bin=Store.bin --abi=Store.abi --pkg=store --out=Store.go \ No newline at end of file +abigen --bin=Store.bin --abi=Store.abi --pkg=store --out=Store.go + +## solc-select +solc-select 切换版本 +pip install solc-select +solc-select install 0.5.16 +solc-select use 0.5.16 \ No newline at end of file