diff --git a/Makefile b/Makefile index 58a74db5..126841ab 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,9 @@ install-subkey: cargo install --force --git https://github.com/paritytech/substrate subkey genmocks: - mockgen -destination=./mock/gas-pricer.go -source=./chains/evm/gaspricer/gas-pricer.go -package mock + mockgen -destination=./mock/client.go -source=./chains/evm/client/client.go -package mock + mockgen -destination=./mock/gas.go -source=./chains/evm/transactor/gas/gas-pricer.go -package mock mockgen -destination=./mock/relayer.go -source=./relayer/relayer.go -package mock mockgen -source=chains/evm/transactor/transact.go -destination=./mock/transact.go -package mock + mockgen -source=chains/evm/transactor/signAndSend/signAndSend.go -destination=./mock/signAndSend.go -package mock + mockgen -source=./store/store.go -destination=./mock/store.go -package mock diff --git a/chains/evm/contracts/contract.go b/chains/evm/contracts/contract.go index d9a78a3a..105d251e 100644 --- a/chains/evm/contracts/contract.go +++ b/chains/evm/contracts/contract.go @@ -9,7 +9,6 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" "github.com/rs/zerolog/log" ) @@ -108,26 +107,3 @@ func (c *Contract) CallContract(method string, args ...interface{}) ([]interface Msgf("method %s called", method) return c.UnpackResult(method, out) } - -func (c *Contract) DeployContract(params ...interface{}) (common.Address, error) { - input, err := c.PackMethod("", params...) - if err != nil { - return common.Address{}, err - } - opts := transactor.TransactOptions{GasLimit: DefaultDeployGasLimit} - hash, err := c.Transact(nil, append(c.bytecode, input...), opts) - if err != nil { - return common.Address{}, err - } - tx, _, err := c.client.GetTransactionByHash(*hash) - if err != nil { - return common.Address{}, err - } - address := crypto.CreateAddress(c.client.From(), tx.Nonce()) - c.contractAddress = address - log.Debug(). - Str("txHash", hash.String()). - Str("deployedAddress", address.String()). - Msgf("successful contract deployment") - return address, nil -} diff --git a/chains/evm/contracts/contract_test.go b/chains/evm/contracts/contract_test.go index 03c232ba..cd395b1a 100644 --- a/chains/evm/contracts/contract_test.go +++ b/chains/evm/contracts/contract_test.go @@ -6,24 +6,23 @@ import ( "strings" "testing" - mock_calls "github.com/ChainSafe/sygma-core/chains/evm/mock" "github.com/ChainSafe/sygma-core/chains/evm/transactor" - mock_transactor "github.com/ChainSafe/sygma-core/chains/evm/transactor/mock" + "github.com/ChainSafe/sygma-core/mock" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "go.uber.org/mock/gomock" ) -const testABI = `[{"inputs":[{"internalType":"uint8","name":"domainID","type":"uint8"},{"internalType":"address[]","name":"initialRelayers","type":"address[]"},{"internalType":"uint256","name":"initialRelayerThreshold","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"destinationDomainID","type":"uint8"},{"indexed":false,"internalType":"bytes32","name":"resourceID","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"depositNonce","type":"uint64"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"handlerResponse","type":"bytes"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"lowLevelData","type":"bytes"}],"name":"FailedHandlerExecution","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"originDomainID","type":"uint8"},{"indexed":false,"internalType":"uint64","name":"depositNonce","type":"uint64"},{"indexed":false,"internalType":"enum Bridge.ProposalStatus","name":"status","type":"uint8"},{"indexed":false,"internalType":"bytes32","name":"dataHash","type":"bytes32"}],"name":"ProposalEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"originDomainID","type":"uint8"},{"indexed":false,"internalType":"uint64","name":"depositNonce","type":"uint64"},{"indexed":false,"internalType":"enum Bridge.ProposalStatus","name":"status","type":"uint8"},{"indexed":false,"internalType":"bytes32","name":"dataHash","type":"bytes32"}],"name":"ProposalVote","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"relayer","type":"address"}],"name":"RelayerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"relayer","type":"address"}],"name":"RelayerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"RelayerThresholdChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_RELAYERS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RELAYER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"_depositCounts","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_domainID","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_expiry","outputs":[{"internalType":"uint40","name":"","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_fee","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_relayerThreshold","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"_resourceIDToHandlerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"getRoleMemberIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isValidForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint72","name":"destNonce","type":"uint72"},{"internalType":"bytes32","name":"dataHash","type":"bytes32"},{"internalType":"address","name":"relayer","type":"address"}],"name":"_hasVotedOnProposal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"relayer","type":"address"}],"name":"isRelayer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"renounceAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminPauseTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminUnpauseTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"adminChangeRelayerThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"relayerAddress","type":"address"}],"name":"adminAddRelayer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"relayerAddress","type":"address"}],"name":"adminRemoveRelayer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"handlerAddress","type":"address"},{"internalType":"bytes32","name":"resourceID","type":"bytes32"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"adminSetResource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"handlerAddress","type":"address"},{"internalType":"bytes32","name":"resourceID","type":"bytes32"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"bytes4","name":"depositFunctionSig","type":"bytes4"},{"internalType":"uint256","name":"depositFunctionDepositerOffset","type":"uint256"},{"internalType":"bytes4","name":"executeFunctionSig","type":"bytes4"}],"name":"adminSetGenericResource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"handlerAddress","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"adminSetBurnable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"domainID","type":"uint8"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"name":"adminSetDepositNonce","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"},{"internalType":"bool","name":"valid","type":"bool"}],"name":"adminSetForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"originDomainID","type":"uint8"},{"internalType":"uint64","name":"depositNonce","type":"uint64"},{"internalType":"bytes32","name":"dataHash","type":"bytes32"}],"name":"getProposal","outputs":[{"components":[{"internalType":"enum Bridge.ProposalStatus","name":"_status","type":"uint8"},{"internalType":"uint200","name":"_yesVotes","type":"uint200"},{"internalType":"uint8","name":"_yesVotesTotal","type":"uint8"},{"internalType":"uint40","name":"_proposedBlock","type":"uint40"}],"internalType":"struct Bridge.Proposal","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_totalRelayers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"adminChangeFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"handlerAddress","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"adminWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"destinationDomainID","type":"uint8"},{"internalType":"bytes32","name":"resourceID","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"domainID","type":"uint8"},{"internalType":"uint64","name":"depositNonce","type":"uint64"},{"internalType":"bytes32","name":"resourceID","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"voteProposal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"domainID","type":"uint8"},{"internalType":"uint64","name":"depositNonce","type":"uint64"},{"internalType":"bytes32","name":"dataHash","type":"bytes32"}],"name":"cancelProposal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"domainID","type":"uint8"},{"internalType":"uint64","name":"depositNonce","type":"uint64"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes32","name":"resourceID","type":"bytes32"},{"internalType":"bool","name":"revertOnFail","type":"bool"}],"name":"executeProposal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"addrs","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"transferFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]` +const testABI = `[{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"}]` const testBin = "0x60806040523480156200001157600080fd5b5060405162003622380380620036228339810160408190526200003491620004db565b6000805460ff199081169091556002805490911660ff871617905562000066836200018a602090811b62001ef917901c565b600260016101000a81548160ff021916908360ff1602179055506200009682620001e760201b62001f501760201c565b6002806101000a8154816001600160801b0302191690836001600160801b03160217905550620000d1816200023e60201b62001fa51760201c565b6002805464ffffffffff92909216600160901b0264ffffffffff60901b199092169190911790556200010e60006200010862000297565b620002da565b60005b84518110156200017e57620001697fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc4868381518110620001555762000155620005e4565b6020026020010151620002ea60201b60201c565b806200017581620005fa565b91505062000111565b50505050505062000624565b60006101008210620001e35760405162461bcd60e51b815260206004820152601c60248201527f76616c756520646f6573206e6f742066697420696e203820626974730000000060448201526064015b60405180910390fd5b5090565b6000600160801b8210620001e35760405162461bcd60e51b815260206004820152601e60248201527f76616c756520646f6573206e6f742066697420696e20313238206269747300006044820152606401620001da565b6000650100000000008210620001e35760405162461bcd60e51b815260206004820152601d60248201527f76616c756520646f6573206e6f742066697420696e20343020626974730000006044820152606401620001da565b60003360143610801590620002c457506001600160a01b03811660009081526005602052604090205460ff165b15620002d5575060131936013560601c5b919050565b620002e6828262000377565b5050565b60008281526001602052604090206002015462000311906200030b62000297565b620003f2565b620002da5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60448201526e0818591b5a5b881d1bc819dc985b9d608a1b6064820152608401620001da565b60008281526001602090815260409091206200039e91839062001ffc62000421821b17901c565b15620002e657620003ae62000297565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526001602090815260408220620004189184906200201162000438821b17901c565b90505b92915050565b600062000418836001600160a01b0384166200045b565b6001600160a01b0381166000908152600183016020526040812054151562000418565b6000818152600183016020526040812054620004a4575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200041b565b5060006200041b565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b0381168114620002d557600080fd5b600080600080600060a08688031215620004f457600080fd5b855160ff811681146200050657600080fd5b602087810151919650906001600160401b03808211156200052657600080fd5b818901915089601f8301126200053b57600080fd5b815181811115620005505762000550620004ad565b8060051b604051601f19603f83011681018181108582111715620005785762000578620004ad565b60405291825284820192508381018501918c8311156200059757600080fd5b938501935b82851015620005c057620005b085620004c3565b845293850193928501926200059c565b60408c015160608d01516080909d01519b9e919d509b9a9950975050505050505050565b634e487b7160e01b600052603260045260246000fd5b60006000198214156200061d57634e487b7160e01b600052601160045260246000fd5b5060010190565b612fee80620006346000396000f3fe6080604052600436106102465760003560e01c806391c404ac11610139578063c5b37c22116100b6578063d15ef64e1161007a578063d15ef64e1461074f578063d547741f1461076f578063d7a9cd791461078f578063edc20c3c146107ae578063f8c39e44146107ce578063ffaac0eb146107fe57600080fd5b8063c5b37c2214610676578063c5ec8970146106b4578063ca15c873146106ef578063cb10f2151461070f578063cdb0f73a1461072f57600080fd5b80639debb3bd116100fd5780639debb3bd146105df578063a217fddf146105f4578063a9cf69fa14610609578063bd2a182014610636578063c0331b3e1461065657600080fd5b806391c404ac1461053157806391d1485414610551578063926d7d7f146105715780639d82dd63146105935780639dd694f4146105b357600080fd5b8063541d5548116101c7578063802aabe81161018b578063802aabe81461047957806380ae1c281461048e57806384db809f146104a35780638c0c2631146104f15780639010d07c1461051157600080fd5b8063541d5548146103d15780635a1ad87c146104015780635c975abb146104215780635e1fab0f146104395780637febe63f1461045957600080fd5b806336568abe1161020e57806336568abe146103035780634603ae38146103235780634b0b919d146103435780634e056005146103915780634e0df3f6146103b157600080fd5b806305e2ca171461024b57806317f03ce514610260578063206a98fd14610280578063248a9ca3146102a05780632f2ff15d146102e3575b600080fd5b61025e6102593660046126c3565b610813565b005b34801561026c57600080fd5b5061025e61027b366004612733565b610a0e565b34801561028c57600080fd5b5061025e61029b36600461277f565b610ca1565b3480156102ac57600080fd5b506102d06102bb3660046127fb565b60009081526001602052604090206002015490565b6040519081526020015b60405180910390f35b3480156102ef57600080fd5b5061025e6102fe366004612829565b610f29565b34801561030f57600080fd5b5061025e61031e366004612829565b610fb9565b34801561032f57600080fd5b5061025e61033e36600461289d565b611043565b34801561034f57600080fd5b5061037961035e3660046128fc565b6003602052600090815260409020546001600160401b031681565b6040516001600160401b0390911681526020016102da565b34801561039d57600080fd5b5061025e6103ac3660046127fb565b6110e7565b3480156103bd57600080fd5b506102d06103cc366004612829565b61114a565b3480156103dd57600080fd5b506103f16103ec366004612917565b611176565b60405190151581526020016102da565b34801561040d57600080fd5b5061025e61041c36600461294c565b611190565b34801561042d57600080fd5b5060005460ff166103f1565b34801561044557600080fd5b5061025e610454366004612917565b611246565b34801561046557600080fd5b506103f16104743660046129aa565b6112d2565b34801561048557600080fd5b506102d0611378565b34801561049a57600080fd5b5061025e611396565b3480156104af57600080fd5b506104d96104be3660046127fb565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016102da565b3480156104fd57600080fd5b5061025e61050c3660046129fa565b6113b0565b34801561051d57600080fd5b506104d961052c366004612a28565b61141c565b34801561053d57600080fd5b5061025e61054c3660046127fb565b61143b565b34801561055d57600080fd5b506103f161056c366004612829565b6114d5565b34801561057d57600080fd5b506102d0600080516020612f9983398151915281565b34801561059f57600080fd5b5061025e6105ae366004612917565b6114ed565b3480156105bf57600080fd5b506002546105cd9060ff1681565b60405160ff90911681526020016102da565b3480156105eb57600080fd5b506102d060c881565b34801561060057600080fd5b506102d0600081565b34801561061557600080fd5b50610629610624366004612733565b6115a2565b6040516102da9190612a82565b34801561064257600080fd5b5061025e610651366004612b38565b611670565b34801561066257600080fd5b5061025e610671366004612bca565b6116a6565b34801561068257600080fd5b5060025461069c906201000090046001600160801b031681565b6040516001600160801b0390911681526020016102da565b3480156106c057600080fd5b506002546106d990600160901b900464ffffffffff1681565b60405164ffffffffff90911681526020016102da565b3480156106fb57600080fd5b506102d061070a3660046127fb565b611bc1565b34801561071b57600080fd5b5061025e61072a366004612c38565b611bd8565b34801561073b57600080fd5b5061025e61074a366004612917565b611c6c565b34801561075b57600080fd5b5061025e61076a366004612c58565b611d72565b34801561077b57600080fd5b5061025e61078a366004612829565b611da5565b34801561079b57600080fd5b506002546105cd90610100900460ff1681565b3480156107ba57600080fd5b5061025e6107c9366004612c8d565b611e28565b3480156107da57600080fd5b506103f16107e9366004612917565b60056020526000908152604090205460ff1681565b34801561080a57600080fd5b5061025e611ee1565b61081b612033565b6002546201000090046001600160801b031634146108795760405162461bcd60e51b8152602060048201526016602482015275125b98dbdc9c9958dd08199959481cdd5c1c1b1a595960521b60448201526064015b60405180910390fd5b6000838152600460205260409020546001600160a01b0316806108de5760405162461bcd60e51b815260206004820181905260248201527f7265736f757263654944206e6f74206d617070656420746f2068616e646c65726044820152606401610870565b60ff8516600090815260036020526040812080548290610906906001600160401b0316612ccd565b91906101000a8154816001600160401b0302191690836001600160401b03160217905590506000610935612079565b60405163b07e54bb60e01b815290915083906000906001600160a01b0383169063b07e54bb9061096f908b9087908c908c90600401612d1d565b6000604051808303816000875af115801561098e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109b69190810190612d82565b9050826001600160a01b03167f17bc3181e17a9620a479c24e6c606e474ba84fc036877b768926872e8cd0e11f8a8a878b8b876040516109fb96959493929190612e1b565b60405180910390a2505050505050505050565b610a166120ba565b60ff838116600884901b68ffffffffffffffff0016176000818152600660209081526040808320868452909152808220815160808101909252805493949293919290918391166004811115610a6d57610a6d612a4a565b6004811115610a7e57610a7e612a4a565b8152905461010081046001600160c81b03166020830152600160d01b810460ff166040830152600160d81b900464ffffffffff1660609091015280519091506001816004811115610ad157610ad1612a4a565b1480610aee57506002816004811115610aec57610aec612a4a565b145b610b3a5760405162461bcd60e51b815260206004820152601c60248201527f50726f706f73616c2063616e6e6f742062652063616e63656c6c6564000000006044820152606401610870565b600254606083015164ffffffffff600160901b909204821691610b5f9143911661213e565b64ffffffffff1611610bb35760405162461bcd60e51b815260206004820181905260248201527f50726f706f73616c206e6f7420617420657870697279207468726573686f6c646044820152606401610870565b600480835268ffffffffffffffffff841660009081526006602090815260408083208884529091529020835181548593839160ff1916906001908490811115610bfe57610bfe612a4a565b02179055506020820151815460408085015160609095015164ffffffffff16600160d81b026001600160d81b0360ff909616600160d01b0260ff60d01b196001600160c81b039095166101000294909416610100600160d81b031990931692909217929092179390931692909217905551600080516020612f7983398151915290610c9190889088906004908990612e6c565b60405180910390a1505050505050565b610ca9612180565b610cb1612033565b60008281526004602090815260408083205490516001600160a01b039091169268ffffffffffffffff0060088a901b1660ff8b1617929091610cf99185918a918a9101612ea1565b60408051601f19818403018152918152815160209283012068ffffffffffffffffff851660009081526006845282812082825290935291209091506002815460ff166004811115610d4c57610d4c612a4a565b14610d995760405162461bcd60e51b815260206004820181905260248201527f50726f706f73616c206d757374206861766520506173736564207374617475736044820152606401610870565b805460ff19166003178155838515610e125760405163712467f960e11b81526001600160a01b0382169063e248cff290610ddb908a908d908d90600401612ecd565b600060405180830381600087803b158015610df557600080fd5b505af1158015610e09573d6000803e3d6000fd5b50505050610eef565b60405163712467f960e11b81526001600160a01b0382169063e248cff290610e42908a908d908d90600401612ecd565b600060405180830381600087803b158015610e5c57600080fd5b505af1925050508015610e6d575060015b610eef573d808015610e9b576040519150601f19603f3d011682016040523d82523d6000602084013e610ea0565b606091505b50825460ff191660021783556040517fbd37c1f0d53bb2f33fe4c2104de272fcdeb4d2fef3acdbf1e4ddc3d6833ca37690610edc908390612ee7565b60405180910390a1505050505050610f21565b600080516020612f798339815191528b8b600386604051610f139493929190612e6c565b60405180910390a150505050505b505050505050565b600082815260016020526040902060020154610f479061056c612079565b610fab5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60448201526e0818591b5a5b881d1bc819dc985b9d608a1b6064820152608401610870565b610fb582826121e6565b5050565b610fc1612079565b6001600160a01b0316816001600160a01b0316146110395760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610870565b610fb5828261224f565b61104b6122b8565b60005b838110156110e05784848281811061106857611068612efa565b905060200201602081019061107d9190612917565b6001600160a01b03166108fc84848481811061109b5761109b612efa565b905060200201359081150290604051600060405180830381858888f193505050501580156110cd573d6000803e3d6000fd5b50806110d881612f10565b91505061104e565b5050505050565b6110ef6122b8565b6110f881611ef9565b6002805460ff929092166101000261ff00199092169190911790556040518181527fa20d6b84cd798a24038be305eff8a45ca82ef54a2aa2082005d8e14c0a4746c8906020015b60405180910390a150565b60008281526001602081815260408084206001600160a01b038616855290920190529020545b92915050565b6000611170600080516020612f99833981519152836114d5565b6111986122b8565b60008581526004602081905260409182902080546001600160a01b0319166001600160a01b038a8116918217909255925163de319d9960e01b8152918201889052861660248201526001600160e01b03198086166044830152606482018590528316608482015287919063de319d999060a401600060405180830381600087803b15801561122557600080fd5b505af1158015611239573d6000803e3d6000fd5b5050505050505050505050565b61124e6122b8565b6000611258612079565b9050816001600160a01b0316816001600160a01b031614156112bc5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f742072656e6f756e6365206f6e6573656c660000000000000000006044820152606401610870565b6112c7600083610f29565b610fb5600082610fb9565b68ffffffffffffffffff831660009081526006602090815260408083208584529091528082208151608081019092528054611370929190829060ff16600481111561131f5761131f612a4a565b600481111561133057611330612a4a565b8152905461010081046001600160c81b03166020830152600160d01b810460ff166040830152600160d81b900464ffffffffff1660609091015283612311565b949350505050565b6000611391600080516020612f99833981519152611bc1565b905090565b61139e6122b8565b6113ae6113a9612079565b612334565b565b6113b86122b8565b6040516307b7ed9960e01b81526001600160a01b0382811660048301528391908216906307b7ed99906024015b600060405180830381600087803b1580156113ff57600080fd5b505af1158015611413573d6000803e3d6000fd5b50505050505050565b60008281526001602052604081206114349083612382565b9392505050565b6114436122b8565b6002546201000090046001600160801b03168114156114a45760405162461bcd60e51b815260206004820152601f60248201527f43757272656e742066656520697320657175616c20746f206e657720666565006044820152606401610870565b6114ad81611f50565b6002806101000a8154816001600160801b0302191690836001600160801b0316021790555050565b60008281526001602052604081206114349083612011565b611505600080516020612f99833981519152826114d5565b6115515760405162461bcd60e51b815260206004820152601f60248201527f6164647220646f65736e277420686176652072656c6179657220726f6c6521006044820152606401610870565b611569600080516020612f9983398151915282611da5565b6040516001600160a01b03821681527f10e1f7ce9fd7d1b90a66d13a2ab3cb8dd7f29f3f8d520b143b063ccfbab6906b9060200161113f565b60408051608081018252600080825260208201819052918101829052606081019190915260ff848116600885901b68ffffffffffffffff0016176000818152600660209081526040808320878452909152908190208151608081019092528054929391929091839116600481111561161c5761161c612a4a565b600481111561162d5761162d612a4a565b8152905461010081046001600160c81b03166020830152600160d01b810460ff166040830152600160d81b900464ffffffffff1660609091015295945050505050565b6116786122b8565b60405163025a3c9960e21b815282906001600160a01b03821690630968f264906113e5908590600401612ee7565b6116ae612180565b6116b6612033565b60008381526004602090815260408083205490516001600160a01b039091169268ffffffffffffffff00600889901b1660ff8a16179290916116fe9185918891889101612ea1565b60408051601f19818403018152828252805160209182012068ffffffffffffffffff861660009081526006835283812082825290925282822060808501909352825490945090929190829060ff16600481111561175d5761175d612a4a565b600481111561176e5761176e612a4a565b8152905461010081046001600160c81b0316602080840191909152600160d01b820460ff16604080850191909152600160d81b90920464ffffffffff1660609093019290925260008a815260049092529020549091506001600160a01b03166118195760405162461bcd60e51b815260206004820152601960248201527f6e6f2068616e646c657220666f72207265736f757263654944000000000000006044820152606401610870565b60028151600481111561182e5761182e612a4a565b141561184c57611843898988888b6001610ca1565b505050506110e0565b6000611856612079565b905060018260000151600481111561187057611870612a4a565b11156118ca5760405162461bcd60e51b815260206004820152602360248201527f70726f706f73616c20616c72656164792065786563757465642f63616e63656c6044820152621b195960ea1b6064820152608401610870565b6118d48282612311565b156119195760405162461bcd60e51b81526020600482015260156024820152741c995b185e595c88185b1c9958591e481d9bdd1959605a1b6044820152606401610870565b60008251600481111561192e5761192e612a4a565b141561198e576040805160808101825260018082526000602083018190528284015264ffffffffff431660608301529151909350600080516020612f7983398151915291611981918d918d918890612e6c565b60405180910390a16119f0565b600254606083015164ffffffffff600160901b9092048216916119b39143911661213e565b64ffffffffff1611156119f0576004808352604051600080516020612f79833981519152916119e7918d918d918890612e6c565b60405180910390a15b600482516004811115611a0557611a05612a4a565b14611ad557611a2a611a168261238e565b83602001516001600160c81b0316176123bc565b6001600160c81b0316602083015260408201805190611a4882612f2b565b60ff1690525081516040517f25f8daaa4635a7729927ba3f5b3d59cc3320aca7c32c9db4e7ca7b957434364091611a84918d918d918890612e6c565b60405180910390a1600254604083015160ff6101009092048216911610611ad5576002808352604051600080516020612f7983398151915291611acc918d918d918890612e6c565b60405180910390a15b68ffffffffffffffffff8416600090815260066020908152604080832086845290915290208251815484929190829060ff19166001836004811115611b1c57611b1c612a4a565b021790555060208201518154604084015160609094015164ffffffffff16600160d81b026001600160d81b0360ff909516600160d01b0260ff60d01b196001600160c81b039094166101000293909316610100600160d81b0319909216919091179190911792909216919091179055600282516004811115611ba057611ba0612a4a565b1415611bb557611bb58a8a89898c6000610ca1565b50505050505050505050565b600081815260016020526040812061117090612411565b611be06122b8565b60008281526004602081905260409182902080546001600160a01b0319166001600160a01b038781169182179092559251635c7d1b9b60e11b81529182018590528316602482015284919063b8fa373690604401600060405180830381600087803b158015611c4e57600080fd5b505af1158015611c62573d6000803e3d6000fd5b5050505050505050565b611c84600080516020612f99833981519152826114d5565b15611cd15760405162461bcd60e51b815260206004820152601e60248201527f6164647220616c7265616479206861732072656c6179657220726f6c652100006044820152606401610870565b60c8611cdb611378565b10611d215760405162461bcd60e51b81526020600482015260166024820152751c995b185e595c9cc81b1a5b5a5d081c995858da195960521b6044820152606401610870565b611d39600080516020612f9983398151915282610f29565b6040516001600160a01b03821681527f03580ee9f53a62b7cb409a2cb56f9be87747dd15017afc5cef6eef321e4fb2c59060200161113f565b611d7a6122b8565b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b600082815260016020526040902060020154611dc39061056c612079565b6110395760405162461bcd60e51b815260206004820152603060248201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60448201526f2061646d696e20746f207265766f6b6560801b6064820152608401610870565b611e306122b8565b60ff82166000908152600360205260409020546001600160401b0390811690821611611ead5760405162461bcd60e51b815260206004820152602660248201527f446f6573206e6f7420616c6c6f772064656372656d656e7473206f6620746865604482015265206e6f6e636560d01b6064820152608401610870565b60ff919091166000908152600360205260409020805467ffffffffffffffff19166001600160401b03909216919091179055565b611ee96122b8565b6113ae611ef4612079565b61241b565b60006101008210611f4c5760405162461bcd60e51b815260206004820152601c60248201527f76616c756520646f6573206e6f742066697420696e20382062697473000000006044820152606401610870565b5090565b6000600160801b8210611f4c5760405162461bcd60e51b815260206004820152601e60248201527f76616c756520646f6573206e6f742066697420696e20313238206269747300006044820152606401610870565b6000650100000000008210611f4c5760405162461bcd60e51b815260206004820152601d60248201527f76616c756520646f6573206e6f742066697420696e20343020626974730000006044820152606401610870565b6000611434836001600160a01b038416612466565b6001600160a01b03811660009081526001830160205260408120541515611434565b60005460ff16156113ae5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610870565b600033601436108015906120a557506001600160a01b03811660009081526005602052604090205460ff165b156120b5575060131936013560601c5b919050565b60006120c4612079565b90506120d16000826114d5565b806120ef57506120ef600080516020612f99833981519152826114d5565b61213b5760405162461bcd60e51b815260206004820152601e60248201527f73656e646572206973206e6f742072656c61796572206f722061646d696e00006044820152606401610870565b50565b600061143483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506124b5565b61219a600080516020612f9983398151915261056c612079565b6113ae5760405162461bcd60e51b815260206004820181905260248201527f73656e64657220646f65736e277420686176652072656c6179657220726f6c656044820152606401610870565b60008281526001602052604090206121fe9082611ffc565b15610fb55761220b612079565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260016020526040902061226790826124ef565b15610fb557612274612079565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6122c5600061056c612079565b6113ae5760405162461bcd60e51b815260206004820152601e60248201527f73656e64657220646f65736e277420686176652061646d696e20726f6c6500006044820152606401610870565b60008083602001516001600160c81b031661232b8461238e565b16119392505050565b61233c612033565b6000805460ff191660011790556040516001600160a01b03821681527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200161113f565b60006114348383612504565b60006123b26123ab600080516020612f998339815191528461114a565b600161213e565b6001901b92915050565b6000600160c81b8210611f4c5760405162461bcd60e51b815260206004820152601e60248201527f76616c756520646f6573206e6f742066697420696e20323030206269747300006044820152606401610870565b6000611170825490565b61242361252e565b6000805460ff191690556040516001600160a01b03821681527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9060200161113f565b60008181526001830160205260408120546124ad57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611170565b506000611170565b600081848411156124d95760405162461bcd60e51b81526004016108709190612ee7565b5060006124e68486612f4b565b95945050505050565b6000611434836001600160a01b038416612577565b600082600001828154811061251b5761251b612efa565b9060005260206000200154905092915050565b60005460ff166113ae5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610870565b6000818152600183016020526040812054801561266057600061259b600183612f4b565b85549091506000906125af90600190612f4b565b90508181146126145760008660000182815481106125cf576125cf612efa565b90600052602060002001549050808760000184815481106125f2576125f2612efa565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061262557612625612f62565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611170565b6000915050611170565b803560ff811681146120b557600080fd5b60008083601f84011261268d57600080fd5b5081356001600160401b038111156126a457600080fd5b6020830191508360208285010111156126bc57600080fd5b9250929050565b600080600080606085870312156126d957600080fd5b6126e28561266a565b93506020850135925060408501356001600160401b0381111561270457600080fd5b6127108782880161267b565b95989497509550505050565b80356001600160401b03811681146120b557600080fd5b60008060006060848603121561274857600080fd5b6127518461266a565b925061275f6020850161271c565b9150604084013590509250925092565b803580151581146120b557600080fd5b60008060008060008060a0878903121561279857600080fd5b6127a18761266a565b95506127af6020880161271c565b945060408701356001600160401b038111156127ca57600080fd5b6127d689828a0161267b565b909550935050606087013591506127ef6080880161276f565b90509295509295509295565b60006020828403121561280d57600080fd5b5035919050565b6001600160a01b038116811461213b57600080fd5b6000806040838503121561283c57600080fd5b82359150602083013561284e81612814565b809150509250929050565b60008083601f84011261286b57600080fd5b5081356001600160401b0381111561288257600080fd5b6020830191508360208260051b85010111156126bc57600080fd5b600080600080604085870312156128b357600080fd5b84356001600160401b03808211156128ca57600080fd5b6128d688838901612859565b909650945060208701359150808211156128ef57600080fd5b5061271087828801612859565b60006020828403121561290e57600080fd5b6114348261266a565b60006020828403121561292957600080fd5b813561143481612814565b80356001600160e01b0319811681146120b557600080fd5b60008060008060008060c0878903121561296557600080fd5b863561297081612814565b955060208701359450604087013561298781612814565b935061299560608801612934565b9250608087013591506127ef60a08801612934565b6000806000606084860312156129bf57600080fd5b833568ffffffffffffffffff811681146129d857600080fd5b92506020840135915060408401356129ef81612814565b809150509250925092565b60008060408385031215612a0d57600080fd5b8235612a1881612814565b9150602083013561284e81612814565b60008060408385031215612a3b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60058110612a7e57634e487b7160e01b600052602160045260246000fd5b9052565b6000608082019050612a95828451612a60565b60018060c81b03602084015116602083015260ff604084015116604083015264ffffffffff606084015116606083015292915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612b0957612b09612acb565b604052919050565b60006001600160401b03821115612b2a57612b2a612acb565b50601f01601f191660200190565b60008060408385031215612b4b57600080fd5b8235612b5681612814565b915060208301356001600160401b03811115612b7157600080fd5b8301601f81018513612b8257600080fd5b8035612b95612b9082612b11565b612ae1565b818152866020838501011115612baa57600080fd5b816020840160208301376000602083830101528093505050509250929050565b600080600080600060808688031215612be257600080fd5b612beb8661266a565b9450612bf96020870161271c565b93506040860135925060608601356001600160401b03811115612c1b57600080fd5b612c278882890161267b565b969995985093965092949392505050565b600080600060608486031215612c4d57600080fd5b83356129d881612814565b60008060408385031215612c6b57600080fd5b8235612c7681612814565b9150612c846020840161276f565b90509250929050565b60008060408385031215612ca057600080fd5b612ca98361266a565b9150612c846020840161271c565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b0380831681811415612cea57612cea612cb7565b6001019392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8481526001600160a01b0384166020820152606060408201819052600090612d489083018486612cf4565b9695505050505050565b60005b83811015612d6d578181015183820152602001612d55565b83811115612d7c576000848401525b50505050565b600060208284031215612d9457600080fd5b81516001600160401b03811115612daa57600080fd5b8201601f81018413612dbb57600080fd5b8051612dc9612b9082612b11565b818152856020838501011115612dde57600080fd5b6124e6826020830160208601612d52565b60008151808452612e07816020860160208601612d52565b601f01601f19169290920160200192915050565b60ff871681528560208201526001600160401b038516604082015260a060608201526000612e4d60a083018587612cf4565b8281036080840152612e5f8185612def565b9998505050505050505050565b60ff851681526001600160401b038416602082015260808101612e926040830185612a60565b82606083015295945050505050565b6bffffffffffffffffffffffff198460601b168152818360148301376000910160140190815292915050565b8381526040602082015260006124e6604083018486612cf4565b6020815260006114346020830184612def565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612f2457612f24612cb7565b5060010190565b600060ff821660ff811415612f4257612f42612cb7565b60010192915050565b600082821015612f5d57612f5d612cb7565b500390565b634e487b7160e01b600052603160045260246000fdfe968626a768e76ba1363efe44e322a6c4900c5f084e0b45f35e294dfddaa9e0d5e2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc4a2646970667358221220b709f2194f4c148f513f57a45e4ba5a064bdbf9c8e2385faecd3a9e498f2bc3164736f6c634300080b0033" type ContractTestSuite struct { suite.Suite - gomockController *gomock.Controller - mockContractCallerDispatcherClient *mock_calls.MockContractCallerDispatcher - mockTransactor *mock_transactor.MockTransactor - contract Contract + gomockController *gomock.Controller + mockClient *mock.MockClient + mockTransactor *mock.MockTransactor + contract Contract } func TestRunContractTestSuite(t *testing.T) { @@ -34,13 +33,12 @@ func (s *ContractTestSuite) SetupSuite() {} func (s *ContractTestSuite) TearDownSuite() {} func (s *ContractTestSuite) SetupTest() { s.gomockController = gomock.NewController(s.T()) - s.mockContractCallerDispatcherClient = mock_calls.NewMockContractCallerDispatcher(s.gomockController) - s.mockTransactor = mock_transactor.NewMockTransactor(s.gomockController) - // Use ERC721 contract ABI inside the contract test + s.mockTransactor = mock.NewMockTransactor(s.gomockController) + s.mockClient = mock.NewMockClient(s.gomockController) a, _ := abi.JSON(strings.NewReader(testABI)) b := common.FromHex(testBin) s.contract = NewContract( - common.Address{}, a, b, s.mockContractCallerDispatcherClient, s.mockTransactor, + common.Address{}, a, b, s.mockClient, s.mockTransactor, ) } func (s *ContractTestSuite) TearDownTest() {} @@ -105,12 +103,12 @@ func (s *ContractTestSuite) TestContract_ExecuteTransaction_InvalidRequest_Fail( } func (s *ContractTestSuite) TestContract_CallContract_CallContractError_Fail() { - s.mockContractCallerDispatcherClient.EXPECT().CallContract( + s.mockClient.EXPECT().CallContract( gomock.Any(), gomock.Any(), nil, ).Return(nil, errors.New("error")) - s.mockContractCallerDispatcherClient.EXPECT().From().Times(1).Return(common.Address{}) + s.mockClient.EXPECT().From().Times(1).Return(common.Address{}) res, err := s.contract.CallContract("ownerOf", big.NewInt(0)) if err != nil { @@ -130,12 +128,12 @@ func (s *ContractTestSuite) TestContract_CallContract_InvalidRequest_Fail() { } func (s *ContractTestSuite) TestContract_CallContract_MissingContract_Fail() { - s.mockContractCallerDispatcherClient.EXPECT().CallContract( + s.mockClient.EXPECT().CallContract( gomock.Any(), gomock.Any(), nil, ).Return(nil, errors.New("error")) - s.mockContractCallerDispatcherClient.EXPECT().From().Times(1).Return(common.Address{}) + s.mockClient.EXPECT().From().Times(1).Return(common.Address{}) res, err := s.contract.CallContract("ownerOf", big.NewInt(0)) if err != nil { return @@ -143,31 +141,3 @@ func (s *ContractTestSuite) TestContract_CallContract_MissingContract_Fail() { s.Nil(res) s.Error(err, "error") } - -func (s *ContractTestSuite) TestContract_DeployContract_InvalidRequest_Fail() { - res, err := s.contract.DeployContract("invalid_param") - s.Equal(common.Address{}, res) - s.Error(err, "error") -} - -func (s *ContractTestSuite) TestContract_DeployContract_TransactionError_Fail() { - s.mockTransactor.EXPECT().Transact( - nil, gomock.Any(), gomock.Any(), - ).Times(1).Return(&common.Hash{}, errors.New("error")) - res, err := s.contract.DeployContract("TestERC721", "TST721", "") - s.Equal(common.Address{}, res) - s.Error(err, "error") -} - -func (s *ContractTestSuite) TestContract_DeployContract_GetTxByHashError_Fail() { - s.mockTransactor.EXPECT().Transact( - nil, gomock.Any(), gomock.Any(), - ).Times(1).Return(&common.Hash{}, nil) - s.mockContractCallerDispatcherClient.EXPECT().GetTransactionByHash( - common.Hash{}, - ).Return(nil, false, errors.New("error")) - - res, err := s.contract.DeployContract("TestERC721", "TST721", "") - s.Equal(common.Address{}, res) - s.Error(err, "error") -} diff --git a/chains/evm/transactor/gas/gas-pricer.go b/chains/evm/transactor/gas/gas-pricer.go index 48e5eab7..e7de49ca 100644 --- a/chains/evm/transactor/gas/gas-pricer.go +++ b/chains/evm/transactor/gas/gas-pricer.go @@ -1,4 +1,4 @@ -package gaspricer +package gas import ( "context" diff --git a/chains/evm/transactor/gas/london.go b/chains/evm/transactor/gas/london.go index 9a507284..08edb54e 100644 --- a/chains/evm/transactor/gas/london.go +++ b/chains/evm/transactor/gas/london.go @@ -1,4 +1,4 @@ -package gaspricer +package gas import ( "context" diff --git a/chains/evm/transactor/gas/london_test.go b/chains/evm/transactor/gas/london_test.go index 954b412a..182eb28c 100644 --- a/chains/evm/transactor/gas/london_test.go +++ b/chains/evm/transactor/gas/london_test.go @@ -1,18 +1,18 @@ -package gaspricer +package gas import ( "math/big" "testing" - mock_gaspricer "github.com/ChainSafe/sygma-core/chains/evm/gaspricer/mock" - - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "go.uber.org/mock/gomock" + + "github.com/ChainSafe/sygma-core/mock" ) type LondonGasPriceTestSuite struct { suite.Suite - gasPricerMock *mock_gaspricer.MockLondonGasClient + gasPricerMock *mock.MockLondonGasClient } func TestRuLondonTestSuite(t *testing.T) { @@ -23,7 +23,7 @@ func (s *LondonGasPriceTestSuite) SetupSuite() {} func (s *LondonGasPriceTestSuite) TearDownSuite() {} func (s *LondonGasPriceTestSuite) SetupTest() { gomockController := gomock.NewController(s.T()) - s.gasPricerMock = mock_gaspricer.NewMockLondonGasClient(gomockController) + s.gasPricerMock = mock.NewMockLondonGasClient(gomockController) } func (s *LondonGasPriceTestSuite) TearDownTest() {} diff --git a/chains/evm/transactor/gas/static.go b/chains/evm/transactor/gas/static.go index 9fe4e26e..0e60510c 100644 --- a/chains/evm/transactor/gas/static.go +++ b/chains/evm/transactor/gas/static.go @@ -1,4 +1,4 @@ -package gaspricer +package gas import ( "context" diff --git a/chains/evm/transactor/gas/static_test.go b/chains/evm/transactor/gas/static_test.go index 9d1fa1ba..da15e869 100644 --- a/chains/evm/transactor/gas/static_test.go +++ b/chains/evm/transactor/gas/static_test.go @@ -1,38 +1,35 @@ -package gaspricer +package gas import ( "errors" "math/big" "testing" - mock_gaspricer "github.com/ChainSafe/sygma-core/chains/evm/gaspricer/mock" - - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "github.com/stretchr/testify/suite" + + "github.com/ChainSafe/sygma-core/mock" ) type StaticGasPriceTestSuite struct { suite.Suite - gasPricerMock *mock_gaspricer.MockGasPriceClient + gasPricerMock *mock.MockGasPriceClient } func TestRunTestSuite(t *testing.T) { suite.Run(t, new(StaticGasPriceTestSuite)) } -func (s *StaticGasPriceTestSuite) SetupSuite() {} -func (s *StaticGasPriceTestSuite) TearDownSuite() {} -func (s *StaticGasPriceTestSuite) SetupTest() { +func (s *StaticGasPriceTestSuite) SetupSuite() { gomockController := gomock.NewController(s.T()) - s.gasPricerMock = mock_gaspricer.NewMockGasPriceClient(gomockController) + s.gasPricerMock = mock.NewMockGasPriceClient(gomockController) } -func (s *StaticGasPriceTestSuite) TearDownTest() {} func (s *StaticGasPriceTestSuite) TestStaticGasPricerNoOpts() { twentyGwei := big.NewInt(20000000000) - gpd := NewStaticGasPriceDeterminant(s.gasPricerMock, nil) s.gasPricerMock.EXPECT().SuggestGasPrice(gomock.Any()).Return(twentyGwei, nil) + gpd := NewStaticGasPriceDeterminant(s.gasPricerMock, nil) res, err := gpd.GasPrice(nil) s.Nil(err) s.Equal(len(res), 1) diff --git a/chains/evm/transactor/monitored/monitored_test.go b/chains/evm/transactor/monitored/monitored_test.go index 5603d4bc..215c2da2 100644 --- a/chains/evm/transactor/monitored/monitored_test.go +++ b/chains/evm/transactor/monitored/monitored_test.go @@ -7,23 +7,22 @@ import ( "testing" "time" - mock_calls "github.com/ChainSafe/sygma-core/chains/evm/mock" "github.com/ChainSafe/sygma-core/chains/evm/transactor" - mock_transactor "github.com/ChainSafe/sygma-core/chains/evm/transactor/mock" "github.com/ChainSafe/sygma-core/chains/evm/transactor/monitored" "github.com/ChainSafe/sygma-core/chains/evm/transactor/transaction" + "github.com/ChainSafe/sygma-core/mock" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "go.uber.org/mock/gomock" ) type TransactorTestSuite struct { suite.Suite - gomockController *gomock.Controller - mockContractCallerDispatcherClient *mock_calls.MockContractCallerDispatcher - mockTransactor *mock_transactor.MockTransactor - mockGasPricer *mock_calls.MockGasPricer + gomockController *gomock.Controller + mockClient *mock.MockClient + mockTransactor *mock.MockTransactor + mockGasPricer *mock.MockGasPricer } func TestMonitoredTransactorTestSuite(t *testing.T) { @@ -32,25 +31,25 @@ func TestMonitoredTransactorTestSuite(t *testing.T) { func (s *TransactorTestSuite) SetupTest() { s.gomockController = gomock.NewController(s.T()) - s.mockContractCallerDispatcherClient = mock_calls.NewMockContractCallerDispatcher(s.gomockController) - s.mockTransactor = mock_transactor.NewMockTransactor(s.gomockController) - s.mockGasPricer = mock_calls.NewMockGasPricer(s.gomockController) + s.mockClient = mock.NewMockClient(s.gomockController) + s.mockTransactor = mock.NewMockTransactor(s.gomockController) + s.mockGasPricer = mock.NewMockGasPricer(s.gomockController) } func (s *TransactorTestSuite) TestTransactor_SignAndSend_Success() { var byteData = []byte{47, 47, 241, 93, 159, 45, 240, 254, 210, 199, 118, 72, 222, 88, 96, 164, 204, 80, 140, 208, 129, 140, 133, 184, 184, 161, 171, 76, 238, 239, 141, 152, 28, 137, 86, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 48, 181, 109, 237, 4, 127, 230, 34, 95, 112, 4, 234, 75, 225, 174, 112, 201, 2, 106} - s.mockContractCallerDispatcherClient.EXPECT().LockNonce() - s.mockContractCallerDispatcherClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) + s.mockClient.EXPECT().LockNonce() + s.mockClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) s.mockGasPricer.EXPECT().GasPrice(gomock.Any()).Return([]*big.Int{big.NewInt(1)}, nil) - s.mockContractCallerDispatcherClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) - s.mockContractCallerDispatcherClient.EXPECT().UnsafeIncreaseNonce().Return(nil) - s.mockContractCallerDispatcherClient.EXPECT().UnlockNonce() + s.mockClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) + s.mockClient.EXPECT().UnsafeIncreaseNonce().Return(nil) + s.mockClient.EXPECT().UnlockNonce() t := monitored.NewMonitoredTransactor( transaction.NewTransaction, s.mockGasPricer, - s.mockContractCallerDispatcherClient, + s.mockClient, big.NewInt(1000), big.NewInt(15)) txHash, err := t.Transact( @@ -66,16 +65,16 @@ func (s *TransactorTestSuite) TestTransactor_SignAndSend_Success() { func (s *TransactorTestSuite) TestTransactor_SignAndSend_Fail() { var byteData = []byte{47, 47, 241, 93, 159, 45, 240, 254, 210, 199, 118, 72, 222, 88, 96, 164, 204, 80, 140, 208, 129, 140, 133, 184, 184, 161, 171, 76, 238, 239, 141, 152, 28, 137, 86, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 48, 181, 109, 237, 4, 127, 230, 34, 95, 112, 4, 234, 75, 225, 174, 112, 201, 2, 106} - s.mockContractCallerDispatcherClient.EXPECT().LockNonce() - s.mockContractCallerDispatcherClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) + s.mockClient.EXPECT().LockNonce() + s.mockClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) s.mockGasPricer.EXPECT().GasPrice(gomock.Any()).Return([]*big.Int{big.NewInt(1)}, nil) - s.mockContractCallerDispatcherClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{}, fmt.Errorf("error")) - s.mockContractCallerDispatcherClient.EXPECT().UnlockNonce() + s.mockClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{}, fmt.Errorf("error")) + s.mockClient.EXPECT().UnlockNonce() t := monitored.NewMonitoredTransactor( transaction.NewTransaction, s.mockGasPricer, - s.mockContractCallerDispatcherClient, + s.mockClient, big.NewInt(1000), big.NewInt(15)) _, err := t.Transact( @@ -91,18 +90,18 @@ func (s *TransactorTestSuite) TestTransactor_MonitoredTransaction_SuccessfulExec var byteData = []byte{47, 47, 241, 93, 159, 45, 240, 254, 210, 199, 118, 72, 222, 88, 96, 164, 204, 80, 140, 208, 129, 140, 133, 184, 184, 161, 171, 76, 238, 239, 141, 152, 28, 137, 86, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 48, 181, 109, 237, 4, 127, 230, 34, 95, 112, 4, 234, 75, 225, 174, 112, 201, 2, 106} // Sending transaction - s.mockContractCallerDispatcherClient.EXPECT().LockNonce() - s.mockContractCallerDispatcherClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) + s.mockClient.EXPECT().LockNonce() + s.mockClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) s.mockGasPricer.EXPECT().GasPrice(gomock.Any()).Return([]*big.Int{big.NewInt(1)}, nil) - s.mockContractCallerDispatcherClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) - s.mockContractCallerDispatcherClient.EXPECT().UnsafeIncreaseNonce().Return(nil) - s.mockContractCallerDispatcherClient.EXPECT().UnlockNonce() + s.mockClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) + s.mockClient.EXPECT().UnsafeIncreaseNonce().Return(nil) + s.mockClient.EXPECT().UnlockNonce() ctx, cancel := context.WithCancel(context.Background()) t := monitored.NewMonitoredTransactor( transaction.NewTransaction, s.mockGasPricer, - s.mockContractCallerDispatcherClient, + s.mockClient, big.NewInt(1000), big.NewInt(15)) @@ -113,7 +112,7 @@ func (s *TransactorTestSuite) TestTransactor_MonitoredTransaction_SuccessfulExec transactor.TransactOptions{}, ) // Transaction executed - s.mockContractCallerDispatcherClient.EXPECT().TransactionReceipt(gomock.Any(), *hash).Return(&types.Receipt{ + s.mockClient.EXPECT().TransactionReceipt(gomock.Any(), *hash).Return(&types.Receipt{ Status: types.ReceiptStatusSuccessful, }, nil) s.Nil(err) @@ -126,18 +125,18 @@ func (s *TransactorTestSuite) TestTransactor_MonitoredTransaction_TxTimeout() { var byteData = []byte{47, 47, 241, 93, 159, 45, 240, 254, 210, 199, 118, 72, 222, 88, 96, 164, 204, 80, 140, 208, 129, 140, 133, 184, 184, 161, 171, 76, 238, 239, 141, 152, 28, 137, 86, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 48, 181, 109, 237, 4, 127, 230, 34, 95, 112, 4, 234, 75, 225, 174, 112, 201, 2, 106} // Sending transaction - s.mockContractCallerDispatcherClient.EXPECT().LockNonce() - s.mockContractCallerDispatcherClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) + s.mockClient.EXPECT().LockNonce() + s.mockClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) s.mockGasPricer.EXPECT().GasPrice(gomock.Any()).Return([]*big.Int{big.NewInt(1)}, nil) - s.mockContractCallerDispatcherClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) - s.mockContractCallerDispatcherClient.EXPECT().UnsafeIncreaseNonce().Return(nil) - s.mockContractCallerDispatcherClient.EXPECT().UnlockNonce() + s.mockClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) + s.mockClient.EXPECT().UnsafeIncreaseNonce().Return(nil) + s.mockClient.EXPECT().UnlockNonce() ctx, cancel := context.WithCancel(context.Background()) t := monitored.NewMonitoredTransactor( transaction.NewTransaction, s.mockGasPricer, - s.mockContractCallerDispatcherClient, + s.mockClient, big.NewInt(1000), big.NewInt(15)) @@ -147,7 +146,7 @@ func (s *TransactorTestSuite) TestTransactor_MonitoredTransaction_TxTimeout() { byteData, transactor.TransactOptions{}, ) - s.mockContractCallerDispatcherClient.EXPECT().TransactionReceipt(gomock.Any(), *hash).Return(nil, fmt.Errorf("not found")) + s.mockClient.EXPECT().TransactionReceipt(gomock.Any(), *hash).Return(nil, fmt.Errorf("not found")) s.Nil(err) time.Sleep(time.Millisecond * 150) @@ -158,21 +157,21 @@ func (s *TransactorTestSuite) TestTransactor_MonitoredTransaction_TransactionRes var byteData = []byte{47, 47, 241, 93, 159, 45, 240, 254, 210, 199, 118, 72, 222, 88, 96, 164, 204, 80, 140, 208, 129, 140, 133, 184, 184, 161, 171, 76, 238, 239, 141, 152, 28, 137, 86, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 48, 181, 109, 237, 4, 127, 230, 34, 95, 112, 4, 234, 75, 225, 174, 112, 201, 2, 106} // Sending transaction - s.mockContractCallerDispatcherClient.EXPECT().LockNonce() - s.mockContractCallerDispatcherClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) + s.mockClient.EXPECT().LockNonce() + s.mockClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) s.mockGasPricer.EXPECT().GasPrice(gomock.Any()).Return([]*big.Int{big.NewInt(10)}, nil) - s.mockContractCallerDispatcherClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) - s.mockContractCallerDispatcherClient.EXPECT().UnsafeIncreaseNonce().Return(nil) - s.mockContractCallerDispatcherClient.EXPECT().UnlockNonce() + s.mockClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) + s.mockClient.EXPECT().UnsafeIncreaseNonce().Return(nil) + s.mockClient.EXPECT().UnlockNonce() // Resending transaction - s.mockContractCallerDispatcherClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) + s.mockClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) ctx, cancel := context.WithCancel(context.Background()) t := monitored.NewMonitoredTransactor( transaction.NewTransaction, s.mockGasPricer, - s.mockContractCallerDispatcherClient, + s.mockClient, big.NewInt(1000), big.NewInt(15)) @@ -184,8 +183,8 @@ func (s *TransactorTestSuite) TestTransactor_MonitoredTransaction_TransactionRes ) s.Nil(err) - s.mockContractCallerDispatcherClient.EXPECT().TransactionReceipt(gomock.Any(), *hash).Return(nil, fmt.Errorf("not found")) - s.mockContractCallerDispatcherClient.EXPECT().TransactionReceipt(gomock.Any(), common.Hash{1, 2, 3, 4, 5}).Return(&types.Receipt{ + s.mockClient.EXPECT().TransactionReceipt(gomock.Any(), *hash).Return(nil, fmt.Errorf("not found")) + s.mockClient.EXPECT().TransactionReceipt(gomock.Any(), common.Hash{1, 2, 3, 4, 5}).Return(&types.Receipt{ Status: types.ReceiptStatusFailed, }, nil) @@ -197,21 +196,21 @@ func (s *TransactorTestSuite) TestTransactor_MonitoredTransaction_MaxGasPriceRea var byteData = []byte{47, 47, 241, 93, 159, 45, 240, 254, 210, 199, 118, 72, 222, 88, 96, 164, 204, 80, 140, 208, 129, 140, 133, 184, 184, 161, 171, 76, 238, 239, 141, 152, 28, 137, 86, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 48, 181, 109, 237, 4, 127, 230, 34, 95, 112, 4, 234, 75, 225, 174, 112, 201, 2, 106} // Sending transaction - s.mockContractCallerDispatcherClient.EXPECT().LockNonce() - s.mockContractCallerDispatcherClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) + s.mockClient.EXPECT().LockNonce() + s.mockClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) s.mockGasPricer.EXPECT().GasPrice(gomock.Any()).Return([]*big.Int{big.NewInt(11)}, nil) - s.mockContractCallerDispatcherClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) - s.mockContractCallerDispatcherClient.EXPECT().UnsafeIncreaseNonce().Return(nil) - s.mockContractCallerDispatcherClient.EXPECT().UnlockNonce() + s.mockClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) + s.mockClient.EXPECT().UnsafeIncreaseNonce().Return(nil) + s.mockClient.EXPECT().UnlockNonce() // Resending transaction - s.mockContractCallerDispatcherClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) + s.mockClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) ctx, cancel := context.WithCancel(context.Background()) t := monitored.NewMonitoredTransactor( transaction.NewTransaction, s.mockGasPricer, - s.mockContractCallerDispatcherClient, + s.mockClient, big.NewInt(10), big.NewInt(15)) @@ -223,8 +222,8 @@ func (s *TransactorTestSuite) TestTransactor_MonitoredTransaction_MaxGasPriceRea ) s.Nil(err) - s.mockContractCallerDispatcherClient.EXPECT().TransactionReceipt(gomock.Any(), *hash).Return(nil, fmt.Errorf("not found")) - s.mockContractCallerDispatcherClient.EXPECT().TransactionReceipt(gomock.Any(), common.Hash{1, 2, 3, 4, 5}).Return(&types.Receipt{ + s.mockClient.EXPECT().TransactionReceipt(gomock.Any(), *hash).Return(nil, fmt.Errorf("not found")) + s.mockClient.EXPECT().TransactionReceipt(gomock.Any(), common.Hash{1, 2, 3, 4, 5}).Return(&types.Receipt{ Status: types.ReceiptStatusFailed, }, nil) @@ -236,7 +235,7 @@ func (s *TransactorTestSuite) TestTransactor_IncreaseGas_15PercentIncrease() { t := monitored.NewMonitoredTransactor( transaction.NewTransaction, s.mockGasPricer, - s.mockContractCallerDispatcherClient, + s.mockClient, big.NewInt(150), big.NewInt(15)) @@ -249,7 +248,7 @@ func (s *TransactorTestSuite) TestTransactor_IncreaseGas_MaxGasReached() { t := monitored.NewMonitoredTransactor( transaction.NewTransaction, s.mockGasPricer, - s.mockContractCallerDispatcherClient, + s.mockClient, big.NewInt(15), big.NewInt(15)) diff --git a/chains/evm/transactor/signAndSend/signAndSend_test.go b/chains/evm/transactor/signAndSend/signAndSend_test.go index 739e6dc1..09782ca0 100644 --- a/chains/evm/transactor/signAndSend/signAndSend_test.go +++ b/chains/evm/transactor/signAndSend/signAndSend_test.go @@ -4,23 +4,22 @@ import ( "math/big" "testing" - mock_calls "github.com/ChainSafe/sygma-core/chains/evm/mock" "github.com/ChainSafe/sygma-core/chains/evm/transactor" - mock_transactor "github.com/ChainSafe/sygma-core/chains/evm/transactor/mock" "github.com/ChainSafe/sygma-core/chains/evm/transactor/signAndSend" "github.com/ChainSafe/sygma-core/chains/evm/transactor/transaction" + "github.com/ChainSafe/sygma-core/mock" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "go.uber.org/mock/gomock" ) type TransactorTestSuite struct { suite.Suite - gomockController *gomock.Controller - mockContractCallerDispatcherClient *mock_calls.MockContractCallerDispatcher - mockTransactor *mock_transactor.MockTransactor - mockGasPricer *mock_calls.MockGasPricer + gomockController *gomock.Controller + mockClient *mock.MockClient + mockTransactor *mock.MockTransactor + mockGasPricer *mock.MockGasPricer } func TestSignAndSendTestSuite(t *testing.T) { @@ -31,27 +30,27 @@ func (s *TransactorTestSuite) SetupSuite() {} func (s *TransactorTestSuite) TearDownSuite() {} func (s *TransactorTestSuite) SetupTest() { s.gomockController = gomock.NewController(s.T()) - s.mockContractCallerDispatcherClient = mock_calls.NewMockContractCallerDispatcher(s.gomockController) - s.mockTransactor = mock_transactor.NewMockTransactor(s.gomockController) - s.mockGasPricer = mock_calls.NewMockGasPricer(s.gomockController) + s.mockClient = mock.NewMockClient(s.gomockController) + s.mockTransactor = mock.NewMockTransactor(s.gomockController) + s.mockGasPricer = mock.NewMockGasPricer(s.gomockController) } func (s *TransactorTestSuite) TestTransactor_SignAndSend_Success() { var byteData = []byte{47, 47, 241, 93, 159, 45, 240, 254, 210, 199, 118, 72, 222, 88, 96, 164, 204, 80, 140, 208, 129, 140, 133, 184, 184, 161, 171, 76, 238, 239, 141, 152, 28, 137, 86, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 48, 181, 109, 237, 4, 127, 230, 34, 95, 112, 4, 234, 75, 225, 174, 112, 201, 2, 106} - s.mockContractCallerDispatcherClient.EXPECT().LockNonce() - s.mockContractCallerDispatcherClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) + s.mockClient.EXPECT().LockNonce() + s.mockClient.EXPECT().UnsafeNonce().Return(big.NewInt(1), nil) s.mockGasPricer.EXPECT().GasPrice(gomock.Any()).Return([]*big.Int{big.NewInt(1)}, nil) - s.mockContractCallerDispatcherClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) - s.mockContractCallerDispatcherClient.EXPECT().TxReceipt(gomock.Any()).Return(&types.Receipt{}, nil) - s.mockContractCallerDispatcherClient.EXPECT().UnsafeIncreaseNonce().Return(nil) - s.mockContractCallerDispatcherClient.EXPECT().UnlockNonce() + s.mockClient.EXPECT().SignAndSendTransaction(gomock.Any(), gomock.Any()).Return(common.Hash{1, 2, 3, 4, 5}, nil) + s.mockClient.EXPECT().WaitAndReturnTxReceipt(gomock.Any()).Return(&types.Receipt{}, nil) + s.mockClient.EXPECT().UnsafeIncreaseNonce().Return(nil) + s.mockClient.EXPECT().UnlockNonce() txFabric := transaction.NewTransaction var trans = signAndSend.NewSignAndSendTransactor( txFabric, s.mockGasPricer, - s.mockContractCallerDispatcherClient, + s.mockClient, ) txHash, err := trans.Transact( &common.Address{}, diff --git a/chains/evm/transactor/transaction/transaction_test.go b/chains/evm/transactor/transaction/transaction_test.go index 323f43b8..f038021b 100644 --- a/chains/evm/transactor/transaction/transaction_test.go +++ b/chains/evm/transactor/transaction/transaction_test.go @@ -4,25 +4,24 @@ import ( "math/big" "testing" - gaspricer "github.com/ChainSafe/sygma-core/chains/evm/gaspricer" - mock_gaspricer "github.com/ChainSafe/sygma-core/chains/evm/gaspricer/mock" - "github.com/ChainSafe/sygma-core/chains/evm/transaction" + "github.com/ChainSafe/sygma-core/chains/evm/transactor/gas" + "github.com/ChainSafe/sygma-core/chains/evm/transactor/transaction" + "github.com/ChainSafe/sygma-core/crypto/keystore" + "github.com/ChainSafe/sygma-core/mock" "github.com/ethereum/go-ethereum/core/types" - "github.com/ChainSafe/sygma-core/keystore" - "github.com/ethereum/go-ethereum/common" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "go.uber.org/mock/gomock" ) var aliceKp = keystore.TestKeyRing.EthereumKeys[keystore.AliceKey] type EVMTxTestSuite struct { suite.Suite - client *mock_gaspricer.MockLondonGasClient + client *mock.MockLondonGasClient } func TestRunTestSuite(t *testing.T) { @@ -33,14 +32,14 @@ func (s *EVMTxTestSuite) SetupSuite() {} func (s *EVMTxTestSuite) TearDownSuite() {} func (s *EVMTxTestSuite) SetupTest() { gomockController := gomock.NewController(s.T()) - s.client = mock_gaspricer.NewMockLondonGasClient(gomockController) + s.client = mock.NewMockLondonGasClient(gomockController) } func (s *EVMTxTestSuite) TearDownTest() {} func (s *EVMTxTestSuite) TestNewTransactionWithStaticGasPricer() { s.client.EXPECT().SuggestGasPrice(gomock.Any()).Return(big.NewInt(1000), nil) txFabric := transaction.NewTransaction - gasPriceClient := gaspricer.NewStaticGasPriceDeterminant(s.client, nil) + gasPriceClient := gas.NewStaticGasPriceDeterminant(s.client, nil) gp, err := gasPriceClient.GasPrice(nil) s.Nil(err) tx, err := txFabric(1, &common.Address{}, big.NewInt(0), 10000, gp, []byte{}) @@ -57,7 +56,7 @@ func (s *EVMTxTestSuite) TestNewTransactionWithLondonGasPricer() { s.client.EXPECT().BaseFee().Return(big.NewInt(1000), nil) s.client.EXPECT().SuggestGasTipCap(gomock.Any()).Return(big.NewInt(1000), nil) txFabric := transaction.NewTransaction - gasPriceClient := gaspricer.NewLondonGasPriceClient(s.client, nil) + gasPriceClient := gas.NewLondonGasPriceClient(s.client, nil) gp, err := gasPriceClient.GasPrice(nil) s.Nil(err) tx, err := txFabric(1, &common.Address{}, big.NewInt(0), 10000, gp, []byte{}) diff --git a/crypto/keyring/keyring.go b/crypto/keystore/keyring.go similarity index 100% rename from crypto/keyring/keyring.go rename to crypto/keystore/keyring.go diff --git a/crypto/keyring/keyring_test.go b/crypto/keystore/keyring_test.go similarity index 100% rename from crypto/keyring/keyring_test.go rename to crypto/keystore/keyring_test.go diff --git a/go.mod b/go.mod index 4519c062..bbe681c1 100644 --- a/go.mod +++ b/go.mod @@ -4,21 +4,17 @@ go 1.19 require ( github.com/centrifuge/go-substrate-rpc-client v2.0.0+incompatible - github.com/creasty/defaults v1.6.0 github.com/ethereum/go-ethereum v1.10.12 - github.com/golang/mock v1.6.0 github.com/imdario/mergo v0.3.12 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.25.0 - github.com/spf13/cobra v1.2.1 - github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.9.0 github.com/stretchr/testify v1.8.3 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 go.opentelemetry.io/otel v1.16.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0 go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/sdk/metric v0.39.0 + go.uber.org/mock v0.3.0 ) require ( @@ -34,14 +30,10 @@ require ( require ( github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect - github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/btcsuite/btcd v0.20.1-beta // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea // indirect - github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect - github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/go-ole/go-ole v1.2.1 // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -49,31 +41,15 @@ require ( github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.0 // indirect github.com/huin/goupnp v1.0.2 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 // indirect - github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559 // indirect - github.com/magiconair/properties v1.8.5 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/mitchellh/mapstructure v1.4.2 - github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/pelletier/go-toml v1.9.4 // indirect - github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect + github.com/mitchellh/mapstructure v1.4.2 // indirect github.com/pierrec/xxHash v0.1.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/tsdb v0.7.1 // indirect github.com/rjeczalik/notify v0.9.1 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/spf13/afero v1.6.0 // indirect - github.com/spf13/cast v1.4.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/subosito/gotenv v1.2.0 // indirect github.com/tklauser/go-sysconf v0.3.5 // indirect github.com/tklauser/numcpus v0.2.2 // indirect - github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef // indirect go.opentelemetry.io/otel/sdk v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect @@ -84,8 +60,6 @@ require ( google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect - gopkg.in/ini.v1 v1.63.2 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 165ecb45..e7999232 100644 --- a/go.sum +++ b/go.sum @@ -15,16 +15,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -34,8 +24,6 @@ cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM7 cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.6.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -74,16 +62,11 @@ github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBA github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= @@ -96,8 +79,6 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxq github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= @@ -122,7 +103,6 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.0.1-0.20190104013014-3767db7a7e18/go.mod h1:HD5P3vAIAh+Y2GAxg0PrPN1P8WkepXGpjbUPDHJqqKM= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -130,7 +110,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -139,13 +118,9 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creasty/defaults v1.6.0 h1:ltuE9cfphUtlrBeomuu8PEyISTXnxqkBIoQfXgv7BSc= -github.com/creasty/defaults v1.6.0/go.mod h1:iGzKe6pbEHnpMPtfDXZEr0NVxWnPTjb1bbDy08fPzYM= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -173,9 +148,7 @@ github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVV github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -184,7 +157,6 @@ github.com/ethereum/go-ethereum v1.10.12 h1:el/KddB3gLEsnNgGQ3SQuZuiZjwnFTYHe5Tw github.com/ethereum/go-ethereum v1.10.12/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= @@ -204,10 +176,8 @@ github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -227,7 +197,6 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -243,9 +212,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -262,7 +228,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -282,18 +247,13 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -301,13 +261,6 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -315,7 +268,6 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -326,40 +278,13 @@ github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= @@ -370,10 +295,8 @@ github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= @@ -396,7 +319,6 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= @@ -406,10 +328,8 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559 h1:0VWDXPNE0brOek1Q8bLfzKkvOzwbQE/snjGojlCr8CY= github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= @@ -417,11 +337,8 @@ github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM52 github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -433,28 +350,21 @@ github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4F github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -464,25 +374,12 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -507,14 +404,9 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -524,12 +416,9 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -556,9 +445,6 @@ github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.25.0 h1:Rj7XygbUHKUlDPcVdoLyR91fJBsduXj5fRxyqIQj/II= github.com/rs/zerolog v1.25.0/go.mod h1:7KHcEGe0QZPOm2IE4Kpb5rTh6n1h2hIgS5OOnu1rUaI= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= @@ -570,23 +456,9 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.9.0 h1:yR6EXjTp0y0cLN8OZg1CRZmOBdI88UcGkhgyJhu6nZk= -github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/status-im/keycard-go v0.0.0-20211004132608-c32310e39b86 h1:6OJQqOTH8b/bIa3Z5vwzX/HgdZLV3TJqivpmiUgw6DI= github.com/status-im/keycard-go v0.0.0-20211004132608-c32310e39b86/go.mod h1:EyC0vqnPRbDQGq3j4Ej9lSP/nKE8DwwjTwfQ0Yan6SQ= @@ -599,12 +471,9 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= @@ -628,16 +497,11 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= @@ -658,20 +522,16 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= +go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -679,7 +539,6 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -708,8 +567,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -718,15 +575,11 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -738,7 +591,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -756,15 +608,10 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= @@ -773,17 +620,6 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -794,14 +630,11 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -815,11 +648,8 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -828,7 +658,6 @@ golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -843,32 +672,18 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -906,10 +721,8 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -933,21 +746,10 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -976,25 +778,12 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1027,28 +816,6 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= @@ -1064,23 +831,12 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1099,14 +855,10 @@ google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.63.2 h1:tGK/CyBg7SMzb60vP1M03vNZ3VDu3wGQJwn7Sxi9r3c= -gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= @@ -1124,7 +876,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= diff --git a/mock/client.go b/mock/client.go new file mode 100644 index 00000000..81eb1efb --- /dev/null +++ b/mock/client.go @@ -0,0 +1,509 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: ./chains/evm/client/client.go +// +// Generated by this command: +// +// mockgen -destination=./mock/client.go -source=./chains/evm/client/client.go -package mock +// +// Package mock is a generated GoMock package. +package mock + +import ( + context "context" + big "math/big" + reflect "reflect" + + client "github.com/ChainSafe/sygma-core/chains/evm/client" + common "github.com/ethereum/go-ethereum/common" + types "github.com/ethereum/go-ethereum/core/types" + gomock "go.uber.org/mock/gomock" +) + +// MockContractCaller is a mock of ContractCaller interface. +type MockContractCaller struct { + ctrl *gomock.Controller + recorder *MockContractCallerMockRecorder +} + +// MockContractCallerMockRecorder is the mock recorder for MockContractCaller. +type MockContractCallerMockRecorder struct { + mock *MockContractCaller +} + +// NewMockContractCaller creates a new mock instance. +func NewMockContractCaller(ctrl *gomock.Controller) *MockContractCaller { + mock := &MockContractCaller{ctrl: ctrl} + mock.recorder = &MockContractCallerMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockContractCaller) EXPECT() *MockContractCallerMockRecorder { + return m.recorder +} + +// CallContract mocks base method. +func (m *MockContractCaller) CallContract(ctx context.Context, callArgs map[string]any, blockNumber *big.Int) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CallContract", ctx, callArgs, blockNumber) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CallContract indicates an expected call of CallContract. +func (mr *MockContractCallerMockRecorder) CallContract(ctx, callArgs, blockNumber any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CallContract", reflect.TypeOf((*MockContractCaller)(nil).CallContract), ctx, callArgs, blockNumber) +} + +// CodeAt mocks base method. +func (m *MockContractCaller) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CodeAt", ctx, contract, blockNumber) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CodeAt indicates an expected call of CodeAt. +func (mr *MockContractCallerMockRecorder) CodeAt(ctx, contract, blockNumber any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CodeAt", reflect.TypeOf((*MockContractCaller)(nil).CodeAt), ctx, contract, blockNumber) +} + +// MockTransactionDispatcher is a mock of TransactionDispatcher interface. +type MockTransactionDispatcher struct { + ctrl *gomock.Controller + recorder *MockTransactionDispatcherMockRecorder +} + +// MockTransactionDispatcherMockRecorder is the mock recorder for MockTransactionDispatcher. +type MockTransactionDispatcherMockRecorder struct { + mock *MockTransactionDispatcher +} + +// NewMockTransactionDispatcher creates a new mock instance. +func NewMockTransactionDispatcher(ctrl *gomock.Controller) *MockTransactionDispatcher { + mock := &MockTransactionDispatcher{ctrl: ctrl} + mock.recorder = &MockTransactionDispatcherMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTransactionDispatcher) EXPECT() *MockTransactionDispatcherMockRecorder { + return m.recorder +} + +// From mocks base method. +func (m *MockTransactionDispatcher) From() common.Address { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "From") + ret0, _ := ret[0].(common.Address) + return ret0 +} + +// From indicates an expected call of From. +func (mr *MockTransactionDispatcherMockRecorder) From() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "From", reflect.TypeOf((*MockTransactionDispatcher)(nil).From)) +} + +// GetTransactionByHash mocks base method. +func (m *MockTransactionDispatcher) GetTransactionByHash(h common.Hash) (*types.Transaction, bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetTransactionByHash", h) + ret0, _ := ret[0].(*types.Transaction) + ret1, _ := ret[1].(bool) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// GetTransactionByHash indicates an expected call of GetTransactionByHash. +func (mr *MockTransactionDispatcherMockRecorder) GetTransactionByHash(h any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionByHash", reflect.TypeOf((*MockTransactionDispatcher)(nil).GetTransactionByHash), h) +} + +// LockNonce mocks base method. +func (m *MockTransactionDispatcher) LockNonce() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "LockNonce") +} + +// LockNonce indicates an expected call of LockNonce. +func (mr *MockTransactionDispatcherMockRecorder) LockNonce() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LockNonce", reflect.TypeOf((*MockTransactionDispatcher)(nil).LockNonce)) +} + +// SignAndSendTransaction mocks base method. +func (m *MockTransactionDispatcher) SignAndSendTransaction(ctx context.Context, tx client.CommonTransaction) (common.Hash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SignAndSendTransaction", ctx, tx) + ret0, _ := ret[0].(common.Hash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SignAndSendTransaction indicates an expected call of SignAndSendTransaction. +func (mr *MockTransactionDispatcherMockRecorder) SignAndSendTransaction(ctx, tx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SignAndSendTransaction", reflect.TypeOf((*MockTransactionDispatcher)(nil).SignAndSendTransaction), ctx, tx) +} + +// TransactionReceipt mocks base method. +func (m *MockTransactionDispatcher) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TransactionReceipt", ctx, txHash) + ret0, _ := ret[0].(*types.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// TransactionReceipt indicates an expected call of TransactionReceipt. +func (mr *MockTransactionDispatcherMockRecorder) TransactionReceipt(ctx, txHash any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionReceipt", reflect.TypeOf((*MockTransactionDispatcher)(nil).TransactionReceipt), ctx, txHash) +} + +// UnlockNonce mocks base method. +func (m *MockTransactionDispatcher) UnlockNonce() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "UnlockNonce") +} + +// UnlockNonce indicates an expected call of UnlockNonce. +func (mr *MockTransactionDispatcherMockRecorder) UnlockNonce() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnlockNonce", reflect.TypeOf((*MockTransactionDispatcher)(nil).UnlockNonce)) +} + +// UnsafeIncreaseNonce mocks base method. +func (m *MockTransactionDispatcher) UnsafeIncreaseNonce() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UnsafeIncreaseNonce") + ret0, _ := ret[0].(error) + return ret0 +} + +// UnsafeIncreaseNonce indicates an expected call of UnsafeIncreaseNonce. +func (mr *MockTransactionDispatcherMockRecorder) UnsafeIncreaseNonce() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsafeIncreaseNonce", reflect.TypeOf((*MockTransactionDispatcher)(nil).UnsafeIncreaseNonce)) +} + +// UnsafeNonce mocks base method. +func (m *MockTransactionDispatcher) UnsafeNonce() (*big.Int, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UnsafeNonce") + ret0, _ := ret[0].(*big.Int) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UnsafeNonce indicates an expected call of UnsafeNonce. +func (mr *MockTransactionDispatcherMockRecorder) UnsafeNonce() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsafeNonce", reflect.TypeOf((*MockTransactionDispatcher)(nil).UnsafeNonce)) +} + +// WaitAndReturnTxReceipt mocks base method. +func (m *MockTransactionDispatcher) WaitAndReturnTxReceipt(h common.Hash) (*types.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "WaitAndReturnTxReceipt", h) + ret0, _ := ret[0].(*types.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// WaitAndReturnTxReceipt indicates an expected call of WaitAndReturnTxReceipt. +func (mr *MockTransactionDispatcherMockRecorder) WaitAndReturnTxReceipt(h any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitAndReturnTxReceipt", reflect.TypeOf((*MockTransactionDispatcher)(nil).WaitAndReturnTxReceipt), h) +} + +// MockClient is a mock of Client interface. +type MockClient struct { + ctrl *gomock.Controller + recorder *MockClientMockRecorder +} + +// MockClientMockRecorder is the mock recorder for MockClient. +type MockClientMockRecorder struct { + mock *MockClient +} + +// NewMockClient creates a new mock instance. +func NewMockClient(ctrl *gomock.Controller) *MockClient { + mock := &MockClient{ctrl: ctrl} + mock.recorder = &MockClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockClient) EXPECT() *MockClientMockRecorder { + return m.recorder +} + +// CallContract mocks base method. +func (m *MockClient) CallContract(ctx context.Context, callArgs map[string]any, blockNumber *big.Int) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CallContract", ctx, callArgs, blockNumber) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CallContract indicates an expected call of CallContract. +func (mr *MockClientMockRecorder) CallContract(ctx, callArgs, blockNumber any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CallContract", reflect.TypeOf((*MockClient)(nil).CallContract), ctx, callArgs, blockNumber) +} + +// CodeAt mocks base method. +func (m *MockClient) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CodeAt", ctx, contract, blockNumber) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CodeAt indicates an expected call of CodeAt. +func (mr *MockClientMockRecorder) CodeAt(ctx, contract, blockNumber any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CodeAt", reflect.TypeOf((*MockClient)(nil).CodeAt), ctx, contract, blockNumber) +} + +// From mocks base method. +func (m *MockClient) From() common.Address { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "From") + ret0, _ := ret[0].(common.Address) + return ret0 +} + +// From indicates an expected call of From. +func (mr *MockClientMockRecorder) From() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "From", reflect.TypeOf((*MockClient)(nil).From)) +} + +// GetTransactionByHash mocks base method. +func (m *MockClient) GetTransactionByHash(h common.Hash) (*types.Transaction, bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetTransactionByHash", h) + ret0, _ := ret[0].(*types.Transaction) + ret1, _ := ret[1].(bool) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// GetTransactionByHash indicates an expected call of GetTransactionByHash. +func (mr *MockClientMockRecorder) GetTransactionByHash(h any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionByHash", reflect.TypeOf((*MockClient)(nil).GetTransactionByHash), h) +} + +// LockNonce mocks base method. +func (m *MockClient) LockNonce() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "LockNonce") +} + +// LockNonce indicates an expected call of LockNonce. +func (mr *MockClientMockRecorder) LockNonce() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LockNonce", reflect.TypeOf((*MockClient)(nil).LockNonce)) +} + +// SignAndSendTransaction mocks base method. +func (m *MockClient) SignAndSendTransaction(ctx context.Context, tx client.CommonTransaction) (common.Hash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SignAndSendTransaction", ctx, tx) + ret0, _ := ret[0].(common.Hash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SignAndSendTransaction indicates an expected call of SignAndSendTransaction. +func (mr *MockClientMockRecorder) SignAndSendTransaction(ctx, tx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SignAndSendTransaction", reflect.TypeOf((*MockClient)(nil).SignAndSendTransaction), ctx, tx) +} + +// TransactionReceipt mocks base method. +func (m *MockClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TransactionReceipt", ctx, txHash) + ret0, _ := ret[0].(*types.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// TransactionReceipt indicates an expected call of TransactionReceipt. +func (mr *MockClientMockRecorder) TransactionReceipt(ctx, txHash any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionReceipt", reflect.TypeOf((*MockClient)(nil).TransactionReceipt), ctx, txHash) +} + +// UnlockNonce mocks base method. +func (m *MockClient) UnlockNonce() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "UnlockNonce") +} + +// UnlockNonce indicates an expected call of UnlockNonce. +func (mr *MockClientMockRecorder) UnlockNonce() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnlockNonce", reflect.TypeOf((*MockClient)(nil).UnlockNonce)) +} + +// UnsafeIncreaseNonce mocks base method. +func (m *MockClient) UnsafeIncreaseNonce() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UnsafeIncreaseNonce") + ret0, _ := ret[0].(error) + return ret0 +} + +// UnsafeIncreaseNonce indicates an expected call of UnsafeIncreaseNonce. +func (mr *MockClientMockRecorder) UnsafeIncreaseNonce() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsafeIncreaseNonce", reflect.TypeOf((*MockClient)(nil).UnsafeIncreaseNonce)) +} + +// UnsafeNonce mocks base method. +func (m *MockClient) UnsafeNonce() (*big.Int, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UnsafeNonce") + ret0, _ := ret[0].(*big.Int) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UnsafeNonce indicates an expected call of UnsafeNonce. +func (mr *MockClientMockRecorder) UnsafeNonce() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsafeNonce", reflect.TypeOf((*MockClient)(nil).UnsafeNonce)) +} + +// WaitAndReturnTxReceipt mocks base method. +func (m *MockClient) WaitAndReturnTxReceipt(h common.Hash) (*types.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "WaitAndReturnTxReceipt", h) + ret0, _ := ret[0].(*types.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// WaitAndReturnTxReceipt indicates an expected call of WaitAndReturnTxReceipt. +func (mr *MockClientMockRecorder) WaitAndReturnTxReceipt(h any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitAndReturnTxReceipt", reflect.TypeOf((*MockClient)(nil).WaitAndReturnTxReceipt), h) +} + +// MockSigner is a mock of Signer interface. +type MockSigner struct { + ctrl *gomock.Controller + recorder *MockSignerMockRecorder +} + +// MockSignerMockRecorder is the mock recorder for MockSigner. +type MockSignerMockRecorder struct { + mock *MockSigner +} + +// NewMockSigner creates a new mock instance. +func NewMockSigner(ctrl *gomock.Controller) *MockSigner { + mock := &MockSigner{ctrl: ctrl} + mock.recorder = &MockSignerMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockSigner) EXPECT() *MockSignerMockRecorder { + return m.recorder +} + +// CommonAddress mocks base method. +func (m *MockSigner) CommonAddress() common.Address { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CommonAddress") + ret0, _ := ret[0].(common.Address) + return ret0 +} + +// CommonAddress indicates an expected call of CommonAddress. +func (mr *MockSignerMockRecorder) CommonAddress() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommonAddress", reflect.TypeOf((*MockSigner)(nil).CommonAddress)) +} + +// Sign mocks base method. +func (m *MockSigner) Sign(digestHash []byte) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Sign", digestHash) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Sign indicates an expected call of Sign. +func (mr *MockSignerMockRecorder) Sign(digestHash any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sign", reflect.TypeOf((*MockSigner)(nil).Sign), digestHash) +} + +// MockCommonTransaction is a mock of CommonTransaction interface. +type MockCommonTransaction struct { + ctrl *gomock.Controller + recorder *MockCommonTransactionMockRecorder +} + +// MockCommonTransactionMockRecorder is the mock recorder for MockCommonTransaction. +type MockCommonTransactionMockRecorder struct { + mock *MockCommonTransaction +} + +// NewMockCommonTransaction creates a new mock instance. +func NewMockCommonTransaction(ctrl *gomock.Controller) *MockCommonTransaction { + mock := &MockCommonTransaction{ctrl: ctrl} + mock.recorder = &MockCommonTransactionMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockCommonTransaction) EXPECT() *MockCommonTransactionMockRecorder { + return m.recorder +} + +// Hash mocks base method. +func (m *MockCommonTransaction) Hash() common.Hash { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Hash") + ret0, _ := ret[0].(common.Hash) + return ret0 +} + +// Hash indicates an expected call of Hash. +func (mr *MockCommonTransactionMockRecorder) Hash() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hash", reflect.TypeOf((*MockCommonTransaction)(nil).Hash)) +} + +// RawWithSignature mocks base method. +func (m *MockCommonTransaction) RawWithSignature(signer client.Signer, domainID *big.Int) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RawWithSignature", signer, domainID) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// RawWithSignature indicates an expected call of RawWithSignature. +func (mr *MockCommonTransactionMockRecorder) RawWithSignature(signer, domainID any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawWithSignature", reflect.TypeOf((*MockCommonTransaction)(nil).RawWithSignature), signer, domainID) +} diff --git a/mock/gas.go b/mock/gas.go new file mode 100644 index 00000000..e585d9ed --- /dev/null +++ b/mock/gas.go @@ -0,0 +1,123 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: ./chains/evm/transactor/gas/gas-pricer.go +// +// Generated by this command: +// +// mockgen -destination=./mock/gas.go -source=./chains/evm/transactor/gas/gas-pricer.go -package mock +// +// Package mock is a generated GoMock package. +package mock + +import ( + context "context" + big "math/big" + reflect "reflect" + + gomock "go.uber.org/mock/gomock" +) + +// MockLondonGasClient is a mock of LondonGasClient interface. +type MockLondonGasClient struct { + ctrl *gomock.Controller + recorder *MockLondonGasClientMockRecorder +} + +// MockLondonGasClientMockRecorder is the mock recorder for MockLondonGasClient. +type MockLondonGasClientMockRecorder struct { + mock *MockLondonGasClient +} + +// NewMockLondonGasClient creates a new mock instance. +func NewMockLondonGasClient(ctrl *gomock.Controller) *MockLondonGasClient { + mock := &MockLondonGasClient{ctrl: ctrl} + mock.recorder = &MockLondonGasClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockLondonGasClient) EXPECT() *MockLondonGasClientMockRecorder { + return m.recorder +} + +// BaseFee mocks base method. +func (m *MockLondonGasClient) BaseFee() (*big.Int, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BaseFee") + ret0, _ := ret[0].(*big.Int) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// BaseFee indicates an expected call of BaseFee. +func (mr *MockLondonGasClientMockRecorder) BaseFee() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BaseFee", reflect.TypeOf((*MockLondonGasClient)(nil).BaseFee)) +} + +// SuggestGasPrice mocks base method. +func (m *MockLondonGasClient) SuggestGasPrice(ctx context.Context) (*big.Int, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SuggestGasPrice", ctx) + ret0, _ := ret[0].(*big.Int) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SuggestGasPrice indicates an expected call of SuggestGasPrice. +func (mr *MockLondonGasClientMockRecorder) SuggestGasPrice(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuggestGasPrice", reflect.TypeOf((*MockLondonGasClient)(nil).SuggestGasPrice), ctx) +} + +// SuggestGasTipCap mocks base method. +func (m *MockLondonGasClient) SuggestGasTipCap(ctx context.Context) (*big.Int, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SuggestGasTipCap", ctx) + ret0, _ := ret[0].(*big.Int) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SuggestGasTipCap indicates an expected call of SuggestGasTipCap. +func (mr *MockLondonGasClientMockRecorder) SuggestGasTipCap(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuggestGasTipCap", reflect.TypeOf((*MockLondonGasClient)(nil).SuggestGasTipCap), ctx) +} + +// MockGasPriceClient is a mock of GasPriceClient interface. +type MockGasPriceClient struct { + ctrl *gomock.Controller + recorder *MockGasPriceClientMockRecorder +} + +// MockGasPriceClientMockRecorder is the mock recorder for MockGasPriceClient. +type MockGasPriceClientMockRecorder struct { + mock *MockGasPriceClient +} + +// NewMockGasPriceClient creates a new mock instance. +func NewMockGasPriceClient(ctrl *gomock.Controller) *MockGasPriceClient { + mock := &MockGasPriceClient{ctrl: ctrl} + mock.recorder = &MockGasPriceClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockGasPriceClient) EXPECT() *MockGasPriceClientMockRecorder { + return m.recorder +} + +// SuggestGasPrice mocks base method. +func (m *MockGasPriceClient) SuggestGasPrice(ctx context.Context) (*big.Int, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SuggestGasPrice", ctx) + ret0, _ := ret[0].(*big.Int) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SuggestGasPrice indicates an expected call of SuggestGasPrice. +func (mr *MockGasPriceClientMockRecorder) SuggestGasPrice(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuggestGasPrice", reflect.TypeOf((*MockGasPriceClient)(nil).SuggestGasPrice), ctx) +} diff --git a/mock/relayer.go b/mock/relayer.go new file mode 100644 index 00000000..8689694e --- /dev/null +++ b/mock/relayer.go @@ -0,0 +1,139 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: ./relayer/relayer.go +// +// Generated by this command: +// +// mockgen -destination=./mock/relayer.go -source=./relayer/relayer.go -package mock +// +// Package mock is a generated GoMock package. +package mock + +import ( + context "context" + reflect "reflect" + + types "github.com/ChainSafe/sygma-core/types" + gomock "go.uber.org/mock/gomock" +) + +// MockDepositMeter is a mock of DepositMeter interface. +type MockDepositMeter struct { + ctrl *gomock.Controller + recorder *MockDepositMeterMockRecorder +} + +// MockDepositMeterMockRecorder is the mock recorder for MockDepositMeter. +type MockDepositMeterMockRecorder struct { + mock *MockDepositMeter +} + +// NewMockDepositMeter creates a new mock instance. +func NewMockDepositMeter(ctrl *gomock.Controller) *MockDepositMeter { + mock := &MockDepositMeter{ctrl: ctrl} + mock.recorder = &MockDepositMeterMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockDepositMeter) EXPECT() *MockDepositMeterMockRecorder { + return m.recorder +} + +// TrackDepositMessage mocks base method. +func (m_2 *MockDepositMeter) TrackDepositMessage(m *types.Message) { + m_2.ctrl.T.Helper() + m_2.ctrl.Call(m_2, "TrackDepositMessage", m) +} + +// TrackDepositMessage indicates an expected call of TrackDepositMessage. +func (mr *MockDepositMeterMockRecorder) TrackDepositMessage(m any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TrackDepositMessage", reflect.TypeOf((*MockDepositMeter)(nil).TrackDepositMessage), m) +} + +// TrackExecutionError mocks base method. +func (m_2 *MockDepositMeter) TrackExecutionError(m *types.Message) { + m_2.ctrl.T.Helper() + m_2.ctrl.Call(m_2, "TrackExecutionError", m) +} + +// TrackExecutionError indicates an expected call of TrackExecutionError. +func (mr *MockDepositMeterMockRecorder) TrackExecutionError(m any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TrackExecutionError", reflect.TypeOf((*MockDepositMeter)(nil).TrackExecutionError), m) +} + +// TrackSuccessfulExecutionLatency mocks base method. +func (m_2 *MockDepositMeter) TrackSuccessfulExecutionLatency(m *types.Message) { + m_2.ctrl.T.Helper() + m_2.ctrl.Call(m_2, "TrackSuccessfulExecutionLatency", m) +} + +// TrackSuccessfulExecutionLatency indicates an expected call of TrackSuccessfulExecutionLatency. +func (mr *MockDepositMeterMockRecorder) TrackSuccessfulExecutionLatency(m any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TrackSuccessfulExecutionLatency", reflect.TypeOf((*MockDepositMeter)(nil).TrackSuccessfulExecutionLatency), m) +} + +// MockRelayedChain is a mock of RelayedChain interface. +type MockRelayedChain struct { + ctrl *gomock.Controller + recorder *MockRelayedChainMockRecorder +} + +// MockRelayedChainMockRecorder is the mock recorder for MockRelayedChain. +type MockRelayedChainMockRecorder struct { + mock *MockRelayedChain +} + +// NewMockRelayedChain creates a new mock instance. +func NewMockRelayedChain(ctrl *gomock.Controller) *MockRelayedChain { + mock := &MockRelayedChain{ctrl: ctrl} + mock.recorder = &MockRelayedChainMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockRelayedChain) EXPECT() *MockRelayedChainMockRecorder { + return m.recorder +} + +// DomainID mocks base method. +func (m *MockRelayedChain) DomainID() uint8 { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DomainID") + ret0, _ := ret[0].(uint8) + return ret0 +} + +// DomainID indicates an expected call of DomainID. +func (mr *MockRelayedChainMockRecorder) DomainID() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DomainID", reflect.TypeOf((*MockRelayedChain)(nil).DomainID)) +} + +// PollEvents mocks base method. +func (m *MockRelayedChain) PollEvents(ctx context.Context, sysErr chan<- error) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "PollEvents", ctx, sysErr) +} + +// PollEvents indicates an expected call of PollEvents. +func (mr *MockRelayedChainMockRecorder) PollEvents(ctx, sysErr any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollEvents", reflect.TypeOf((*MockRelayedChain)(nil).PollEvents), ctx, sysErr) +} + +// Write mocks base method. +func (m *MockRelayedChain) Write(messages []*types.Message) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Write", messages) + ret0, _ := ret[0].(error) + return ret0 +} + +// Write indicates an expected call of Write. +func (mr *MockRelayedChainMockRecorder) Write(messages any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockRelayedChain)(nil).Write), messages) +} diff --git a/mock/signAndSend.go b/mock/signAndSend.go new file mode 100644 index 00000000..a91de2db --- /dev/null +++ b/mock/signAndSend.go @@ -0,0 +1,54 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: chains/evm/transactor/signAndSend/signAndSend.go +// +// Generated by this command: +// +// mockgen -source=chains/evm/transactor/signAndSend/signAndSend.go -destination=./mock/signAndSend.go -package mock +// +// Package mock is a generated GoMock package. +package mock + +import ( + big "math/big" + reflect "reflect" + + gomock "go.uber.org/mock/gomock" +) + +// MockGasPricer is a mock of GasPricer interface. +type MockGasPricer struct { + ctrl *gomock.Controller + recorder *MockGasPricerMockRecorder +} + +// MockGasPricerMockRecorder is the mock recorder for MockGasPricer. +type MockGasPricerMockRecorder struct { + mock *MockGasPricer +} + +// NewMockGasPricer creates a new mock instance. +func NewMockGasPricer(ctrl *gomock.Controller) *MockGasPricer { + mock := &MockGasPricer{ctrl: ctrl} + mock.recorder = &MockGasPricerMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockGasPricer) EXPECT() *MockGasPricerMockRecorder { + return m.recorder +} + +// GasPrice mocks base method. +func (m *MockGasPricer) GasPrice(priority *uint8) ([]*big.Int, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GasPrice", priority) + ret0, _ := ret[0].([]*big.Int) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GasPrice indicates an expected call of GasPrice. +func (mr *MockGasPricerMockRecorder) GasPrice(priority any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GasPrice", reflect.TypeOf((*MockGasPricer)(nil).GasPrice), priority) +} diff --git a/mock/store.go b/mock/store.go new file mode 100644 index 00000000..982ea21c --- /dev/null +++ b/mock/store.go @@ -0,0 +1,142 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: ./store/store.go +// +// Generated by this command: +// +// mockgen -source=./store/store.go -destination=./mock/store.go -package mock +// +// Package mock is a generated GoMock package. +package mock + +import ( + reflect "reflect" + + gomock "go.uber.org/mock/gomock" +) + +// MockKeyValueReaderWriter is a mock of KeyValueReaderWriter interface. +type MockKeyValueReaderWriter struct { + ctrl *gomock.Controller + recorder *MockKeyValueReaderWriterMockRecorder +} + +// MockKeyValueReaderWriterMockRecorder is the mock recorder for MockKeyValueReaderWriter. +type MockKeyValueReaderWriterMockRecorder struct { + mock *MockKeyValueReaderWriter +} + +// NewMockKeyValueReaderWriter creates a new mock instance. +func NewMockKeyValueReaderWriter(ctrl *gomock.Controller) *MockKeyValueReaderWriter { + mock := &MockKeyValueReaderWriter{ctrl: ctrl} + mock.recorder = &MockKeyValueReaderWriterMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockKeyValueReaderWriter) EXPECT() *MockKeyValueReaderWriterMockRecorder { + return m.recorder +} + +// GetByKey mocks base method. +func (m *MockKeyValueReaderWriter) GetByKey(key []byte) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetByKey", key) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByKey indicates an expected call of GetByKey. +func (mr *MockKeyValueReaderWriterMockRecorder) GetByKey(key any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByKey", reflect.TypeOf((*MockKeyValueReaderWriter)(nil).GetByKey), key) +} + +// SetByKey mocks base method. +func (m *MockKeyValueReaderWriter) SetByKey(key, value []byte) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SetByKey", key, value) + ret0, _ := ret[0].(error) + return ret0 +} + +// SetByKey indicates an expected call of SetByKey. +func (mr *MockKeyValueReaderWriterMockRecorder) SetByKey(key, value any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetByKey", reflect.TypeOf((*MockKeyValueReaderWriter)(nil).SetByKey), key, value) +} + +// MockKeyValueReader is a mock of KeyValueReader interface. +type MockKeyValueReader struct { + ctrl *gomock.Controller + recorder *MockKeyValueReaderMockRecorder +} + +// MockKeyValueReaderMockRecorder is the mock recorder for MockKeyValueReader. +type MockKeyValueReaderMockRecorder struct { + mock *MockKeyValueReader +} + +// NewMockKeyValueReader creates a new mock instance. +func NewMockKeyValueReader(ctrl *gomock.Controller) *MockKeyValueReader { + mock := &MockKeyValueReader{ctrl: ctrl} + mock.recorder = &MockKeyValueReaderMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockKeyValueReader) EXPECT() *MockKeyValueReaderMockRecorder { + return m.recorder +} + +// GetByKey mocks base method. +func (m *MockKeyValueReader) GetByKey(key []byte) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetByKey", key) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByKey indicates an expected call of GetByKey. +func (mr *MockKeyValueReaderMockRecorder) GetByKey(key any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByKey", reflect.TypeOf((*MockKeyValueReader)(nil).GetByKey), key) +} + +// MockKeyValueWriter is a mock of KeyValueWriter interface. +type MockKeyValueWriter struct { + ctrl *gomock.Controller + recorder *MockKeyValueWriterMockRecorder +} + +// MockKeyValueWriterMockRecorder is the mock recorder for MockKeyValueWriter. +type MockKeyValueWriterMockRecorder struct { + mock *MockKeyValueWriter +} + +// NewMockKeyValueWriter creates a new mock instance. +func NewMockKeyValueWriter(ctrl *gomock.Controller) *MockKeyValueWriter { + mock := &MockKeyValueWriter{ctrl: ctrl} + mock.recorder = &MockKeyValueWriterMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockKeyValueWriter) EXPECT() *MockKeyValueWriterMockRecorder { + return m.recorder +} + +// SetByKey mocks base method. +func (m *MockKeyValueWriter) SetByKey(key, value []byte) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SetByKey", key, value) + ret0, _ := ret[0].(error) + return ret0 +} + +// SetByKey indicates an expected call of SetByKey. +func (mr *MockKeyValueWriterMockRecorder) SetByKey(key, value any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetByKey", reflect.TypeOf((*MockKeyValueWriter)(nil).SetByKey), key, value) +} diff --git a/mock/transact.go b/mock/transact.go new file mode 100644 index 00000000..5a41eb0a --- /dev/null +++ b/mock/transact.go @@ -0,0 +1,55 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: chains/evm/transactor/transact.go +// +// Generated by this command: +// +// mockgen -source=chains/evm/transactor/transact.go -destination=./mock/transact.go -package mock +// +// Package mock is a generated GoMock package. +package mock + +import ( + reflect "reflect" + + transactor "github.com/ChainSafe/sygma-core/chains/evm/transactor" + common "github.com/ethereum/go-ethereum/common" + gomock "go.uber.org/mock/gomock" +) + +// MockTransactor is a mock of Transactor interface. +type MockTransactor struct { + ctrl *gomock.Controller + recorder *MockTransactorMockRecorder +} + +// MockTransactorMockRecorder is the mock recorder for MockTransactor. +type MockTransactorMockRecorder struct { + mock *MockTransactor +} + +// NewMockTransactor creates a new mock instance. +func NewMockTransactor(ctrl *gomock.Controller) *MockTransactor { + mock := &MockTransactor{ctrl: ctrl} + mock.recorder = &MockTransactorMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTransactor) EXPECT() *MockTransactorMockRecorder { + return m.recorder +} + +// Transact mocks base method. +func (m *MockTransactor) Transact(to *common.Address, data []byte, opts transactor.TransactOptions) (*common.Hash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Transact", to, data, opts) + ret0, _ := ret[0].(*common.Hash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Transact indicates an expected call of Transact. +func (mr *MockTransactorMockRecorder) Transact(to, data, opts any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Transact", reflect.TypeOf((*MockTransactor)(nil).Transact), to, data, opts) +} diff --git a/relayer/relayer_test.go b/relayer/relayer_test.go index e3ed5365..f18bf4b0 100644 --- a/relayer/relayer_test.go +++ b/relayer/relayer_test.go @@ -4,16 +4,16 @@ import ( "fmt" "testing" - mock_relayer "github.com/ChainSafe/sygma-core/relayer/mock" + "github.com/ChainSafe/sygma-core/mock" "github.com/ChainSafe/sygma-core/types" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "go.uber.org/mock/gomock" ) type RouteTestSuite struct { suite.Suite - mockRelayedChain *mock_relayer.MockRelayedChain - mockMetrics *mock_relayer.MockDepositMeter + mockRelayedChain *mock.MockRelayedChain + mockMetrics *mock.MockDepositMeter } func TestRunRouteTestSuite(t *testing.T) { @@ -24,8 +24,8 @@ func (s *RouteTestSuite) SetupSuite() {} func (s *RouteTestSuite) TearDownSuite() {} func (s *RouteTestSuite) SetupTest() { gomockController := gomock.NewController(s.T()) - s.mockRelayedChain = mock_relayer.NewMockRelayedChain(gomockController) - s.mockMetrics = mock_relayer.NewMockDepositMeter(gomockController) + s.mockRelayedChain = mock.NewMockRelayedChain(gomockController) + s.mockMetrics = mock.NewMockDepositMeter(gomockController) } func (s *RouteTestSuite) TearDownTest() {} @@ -39,22 +39,7 @@ func (s *RouteTestSuite) TestLogsErrorIfDestinationDoesNotExist() { }) } -func (s *RouteTestSuite) TestLogsErrorIfMessageProcessorReturnsError() { - s.mockMetrics.EXPECT().TrackDepositMessage(gomock.Any()) - s.mockRelayedChain.EXPECT().DomainID().Return(uint8(1)) - relayer := NewRelayer( - []RelayedChain{}, - s.mockMetrics, - ) - relayer.addRelayedChain(s.mockRelayedChain) - - relayer.route([]*types.Message{ - {Destination: 1}, - }) -} - func (s *RouteTestSuite) TestWriteFail() { - s.mockMetrics.EXPECT().TrackDepositMessage(gomock.Any()) s.mockMetrics.EXPECT().TrackExecutionError(gomock.Any()) s.mockRelayedChain.EXPECT().DomainID().Return(uint8(1)).Times(3) s.mockRelayedChain.EXPECT().Write(gomock.Any()).Return(fmt.Errorf("error")) @@ -70,7 +55,6 @@ func (s *RouteTestSuite) TestWriteFail() { } func (s *RouteTestSuite) TestWritesToDestChainIfMessageValid() { - s.mockMetrics.EXPECT().TrackDepositMessage(gomock.Any()) s.mockMetrics.EXPECT().TrackSuccessfulExecutionLatency(gomock.Any()) s.mockRelayedChain.EXPECT().DomainID().Return(uint8(1)).Times(2) s.mockRelayedChain.EXPECT().Write(gomock.Any()) diff --git a/store/blockstore_test.go b/store/blockstore_test.go index a3a9cb96..0f8928cd 100644 --- a/store/blockstore_test.go +++ b/store/blockstore_test.go @@ -5,17 +5,17 @@ import ( "math/big" "testing" + "github.com/ChainSafe/sygma-core/mock" "github.com/ChainSafe/sygma-core/store" - mock_store "github.com/ChainSafe/sygma-core/store/mock" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" "github.com/syndtr/goleveldb/leveldb" + "go.uber.org/mock/gomock" ) type BlockStoreTestSuite struct { suite.Suite blockStore *store.BlockStore - keyValueReaderWriter *mock_store.MockKeyValueReaderWriter + keyValueReaderWriter *mock.NewMockKeyValueReaderWriter } func TestRunBlockStoreTestSuite(t *testing.T) { @@ -26,7 +26,7 @@ func (s *BlockStoreTestSuite) SetupSuite() {} func (s *BlockStoreTestSuite) TearDownSuite() {} func (s *BlockStoreTestSuite) SetupTest() { gomockController := gomock.NewController(s.T()) - s.keyValueReaderWriter = mock_store.NewMockKeyValueReaderWriter(gomockController) + s.keyValueReaderWriter = mock.NewMockKeyValueReaderWriter(gomockController) s.blockStore = store.NewBlockStore(s.keyValueReaderWriter) } func (s *BlockStoreTestSuite) TearDownTest() {} diff --git a/store/noncestore_test.go b/store/noncestore_test.go index 951caecc..3d375bf8 100644 --- a/store/noncestore_test.go +++ b/store/noncestore_test.go @@ -5,17 +5,17 @@ import ( "math/big" "testing" + "github.com/ChainSafe/sygma-core/mock" "github.com/ChainSafe/sygma-core/store" - mock_store "github.com/ChainSafe/sygma-core/store/mock" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" "github.com/syndtr/goleveldb/leveldb" + "go.uber.org/mock/gomock" ) type NonceStoreTestSuite struct { suite.Suite nonceStore *store.NonceStore - keyValueReaderWriter *mock_store.MockKeyValueReaderWriter + keyValueReaderWriter *mock.MockKeyValueReaderWriter } func TestRunNonceStoreTestSuite(t *testing.T) { @@ -26,7 +26,7 @@ func (s *NonceStoreTestSuite) SetupSuite() {} func (s *NonceStoreTestSuite) TearDownSuite() {} func (s *NonceStoreTestSuite) SetupTest() { gomockController := gomock.NewController(s.T()) - s.keyValueReaderWriter = mock_store.NewMockKeyValueReaderWriter(gomockController) + s.keyValueReaderWriter = mock.NewMockKeyValueReaderWriter(gomockController) s.nonceStore = store.NewNonceStore(s.keyValueReaderWriter) } func (s *NonceStoreTestSuite) TearDownTest() {}