From c77f1e04b114dc659b3ea5dbbfae0f8b37eaa021 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 19 Jul 2023 18:40:59 -0700 Subject: [PATCH] new ethers changed artifacts --- payment-contracts/src/contracts/ierc20.rs | 352 ++++++++- .../src/contracts/payment_factory.rs | 740 +++++++++++++++++- .../src/contracts/payment_proxy.rs | 49 +- .../src/contracts/payment_sweeper.rs | 114 ++- 4 files changed, 1235 insertions(+), 20 deletions(-) diff --git a/payment-contracts/src/contracts/ierc20.rs b/payment-contracts/src/contracts/ierc20.rs index 2fcb627c..85653d13 100644 --- a/payment-contracts/src/contracts/ierc20.rs +++ b/payment-contracts/src/contracts/ierc20.rs @@ -10,11 +10,353 @@ pub use ierc20::*; non_camel_case_types, )] pub mod ierc20 { - #[rustfmt::skip] - const __ABI: &str = "[\n {\n \"name\": \"Transfer\",\n \"inputs\": [\n {\n \"name\": \"_from\",\n \"type\": \"address\",\n \"indexed\": true\n },\n {\n \"name\": \"_to\",\n \"type\": \"address\",\n \"indexed\": true\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\",\n \"indexed\": false\n }\n ],\n \"anonymous\": false,\n \"type\": \"event\"\n },\n {\n \"name\": \"Approval\",\n \"inputs\": [\n {\n \"name\": \"_owner\",\n \"type\": \"address\",\n \"indexed\": true\n },\n {\n \"name\": \"_spender\",\n \"type\": \"address\",\n \"indexed\": true\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\",\n \"indexed\": false\n }\n ],\n \"anonymous\": false,\n \"type\": \"event\"\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\",\n \"inputs\": [\n {\n \"name\": \"_name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"_symbol\",\n \"type\": \"string\"\n },\n {\n \"name\": \"_decimals\",\n \"type\": \"uint256\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"transfer\",\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"gas\": 79588\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"transferFrom\",\n \"inputs\": [\n {\n \"name\": \"_from\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"gas\": 119640\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"approve\",\n \"inputs\": [\n {\n \"name\": \"_spender\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"gas\": 37791\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"_mint_for_testing\",\n \"inputs\": [\n {\n \"name\": \"_target\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"gas\": 77251\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"name\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"gas\": 12810\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"symbol\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"gas\": 10563\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"decimals\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"gas\": 2568\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"balanceOf\",\n \"inputs\": [\n {\n \"name\": \"arg0\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"gas\": 2813\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"allowance\",\n \"inputs\": [\n {\n \"name\": \"arg0\",\n \"type\": \"address\"\n },\n {\n \"name\": \"arg1\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"gas\": 3058\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"totalSupply\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"gas\": 2658\n }\n]"; + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { + constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_name"), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_symbol"), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_decimals"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize), + internal_type: ::core::option::Option::None, + }, + ], + }), + functions: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("_mint_for_testing"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("_mint_for_testing"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_target"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_value"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("allowance"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("allowance"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("arg0"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("arg1"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("approve"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("approve"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_value"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("balanceOf"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("balanceOf"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("arg0"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("decimals"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("decimals"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("name"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("name"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("symbol"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("symbol"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::String, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("totalSupply"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("totalSupply"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("transfer"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("transfer"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_to"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_value"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("transferFrom"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("transferFrom"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_from"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_to"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_value"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ]), + events: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("Approval"), + ::std::vec![ + ::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("Approval"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("_owner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("_spender"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("_value"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + indexed: false, + }, + ], + anonymous: false, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("Transfer"), + ::std::vec![ + ::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("Transfer"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("_from"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("_to"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: true, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("_value"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + indexed: false, + }, + ], + anonymous: false, + }, + ], + ), + ]), + errors: ::std::collections::BTreeMap::new(), + receive: false, + fallback: false, + } + } ///The parsed JSON ABI of the contract. - pub static IERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new(|| - ::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")); + pub static IERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( + __abi, + ); pub struct IERC20(::ethers::contract::Contract); impl ::core::clone::Clone for IERC20 { fn clone(&self) -> Self { @@ -34,7 +376,7 @@ pub mod ierc20 { } impl ::core::fmt::Debug for IERC20 { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(stringify!(IERC20)).field(&self.address()).finish() + f.debug_tuple(::core::stringify!(IERC20)).field(&self.address()).finish() } } impl IERC20 { diff --git a/payment-contracts/src/contracts/payment_factory.rs b/payment-contracts/src/contracts/payment_factory.rs index 7e4927c5..db58a765 100644 --- a/payment-contracts/src/contracts/payment_factory.rs +++ b/payment-contracts/src/contracts/payment_factory.rs @@ -10,11 +10,739 @@ pub use payment_factory::*; non_camel_case_types, )] pub mod payment_factory { - #[rustfmt::skip] - const __ABI: &str = "[\n {\n \"name\": \"NewPaymentAddress\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"payment_address\",\n \"type\": \"address\",\n \"indexed\": false\n }\n ],\n \"anonymous\": false,\n \"type\": \"event\"\n },\n {\n \"name\": \"PaymentReceived\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false\n }\n ],\n \"anonymous\": false,\n \"type\": \"event\"\n },\n {\n \"name\": \"NewOwnerCommitted\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"new_owner\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"finalize_time\",\n \"type\": \"uint256\",\n \"indexed\": false\n }\n ],\n \"anonymous\": false,\n \"type\": \"event\"\n },\n {\n \"name\": \"NewOwnerAccepted\",\n \"inputs\": [\n {\n \"name\": \"old_owner\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"indexed\": false\n }\n ],\n \"anonymous\": false,\n \"type\": \"event\"\n },\n {\n \"name\": \"NewSweeperCommitted\",\n \"inputs\": [\n {\n \"name\": \"sweeper\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"new_sweeper\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"finalize_time\",\n \"type\": \"uint256\",\n \"indexed\": false\n }\n ],\n \"anonymous\": false,\n \"type\": \"event\"\n },\n {\n \"name\": \"NewSweeperSet\",\n \"inputs\": [\n {\n \"name\": \"old_sweeper\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"sweeper\",\n \"type\": \"address\",\n \"indexed\": false\n }\n ],\n \"anonymous\": false,\n \"type\": \"event\"\n },\n {\n \"name\": \"NewReceiverCommitted\",\n \"inputs\": [\n {\n \"name\": \"receiver\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"new_receiver\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"finalize_time\",\n \"type\": \"uint256\",\n \"indexed\": false\n }\n ],\n \"anonymous\": false,\n \"type\": \"event\"\n },\n {\n \"name\": \"NewReceiverSet\",\n \"inputs\": [\n {\n \"name\": \"old_receiver\",\n \"type\": \"address\",\n \"indexed\": false\n },\n {\n \"name\": \"receiver\",\n \"type\": \"address\",\n \"indexed\": false\n }\n ],\n \"anonymous\": false,\n \"type\": \"event\"\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\",\n \"inputs\": [\n {\n \"name\": \"_owner\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_receiver\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_sweeper\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"get_approved_tokens\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ]\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"payment_received\",\n \"inputs\": [\n {\n \"name\": \"_token\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"create_payment_address\",\n \"inputs\": [],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"create_payment_address\",\n \"inputs\": [\n {\n \"name\": \"_account\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"set_token_approvals\",\n \"inputs\": [\n {\n \"name\": \"_tokens\",\n \"type\": \"address[]\"\n },\n {\n \"name\": \"_approved\",\n \"type\": \"bool\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"commit_new_sweeper_implementation\",\n \"inputs\": [\n {\n \"name\": \"_sweeper\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"finalize_new_sweeper_implementation\",\n \"inputs\": [],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"commit_new_receiver\",\n \"inputs\": [\n {\n \"name\": \"_receiver\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"finalize_new_receiver\",\n \"inputs\": [],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"commit_transfer_ownership\",\n \"inputs\": [\n {\n \"name\": \"_new_owner\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"accept_transfer_ownership\",\n \"inputs\": [],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"PROXY_IMPLEMENTATION\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"sweeper_implementation\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"future_sweeper_implementation\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"owner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"future_owner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"receiver\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"future_receiver\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"transfer_ownership_timestamp\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"new_sweeper_timestamp\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"new_receiver_timestamp\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"is_approved_token\",\n \"inputs\": [\n {\n \"name\": \"arg0\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"account_to_payment_address\",\n \"inputs\": [\n {\n \"name\": \"arg0\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ]\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"payment_address_to_account\",\n \"inputs\": [\n {\n \"name\": \"arg0\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ]\n }\n]"; + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { + constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_owner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_receiver"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_sweeper"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_proxy"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + }), + functions: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("PROXY_IMPLEMENTATION"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "PROXY_IMPLEMENTATION", + ), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("accept_transfer_ownership"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "accept_transfer_ownership", + ), + inputs: ::std::vec![], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("account_to_payment_address"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "account_to_payment_address", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("arg0"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("commit_new_receiver"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "commit_new_receiver", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_receiver"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned( + "commit_new_sweeper_implementation", + ), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "commit_new_sweeper_implementation", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_sweeper"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("commit_transfer_ownership"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "commit_transfer_ownership", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_new_owner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("create_payment_address"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "create_payment_address", + ), + inputs: ::std::vec![], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "create_payment_address", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_account"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("finalize_new_receiver"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "finalize_new_receiver", + ), + inputs: ::std::vec![], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned( + "finalize_new_sweeper_implementation", + ), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "finalize_new_sweeper_implementation", + ), + inputs: ::std::vec![], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("future_owner"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("future_owner"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("future_receiver"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("future_receiver"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("future_sweeper_implementation"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "future_sweeper_implementation", + ), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("get_approved_tokens"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "get_approved_tokens", + ), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Address, + ), + ), + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("is_approved_token"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("is_approved_token"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("arg0"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("new_receiver_timestamp"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "new_receiver_timestamp", + ), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("new_sweeper_timestamp"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "new_sweeper_timestamp", + ), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("owner"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("owner"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("payment_address_to_account"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "payment_address_to_account", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("arg0"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("payment_received"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("payment_received"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_token"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_amount"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("receiver"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("receiver"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("set_token_approvals"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "set_token_approvals", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_tokens"), + kind: ::ethers::core::abi::ethabi::ParamType::Array( + ::std::boxed::Box::new( + ::ethers::core::abi::ethabi::ParamType::Address, + ), + ), + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_approved"), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("sweeper_implementation"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "sweeper_implementation", + ), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("transfer_ownership_timestamp"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "transfer_ownership_timestamp", + ), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ]), + events: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("NewOwnerAccepted"), + ::std::vec![ + ::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("NewOwnerAccepted"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("old_owner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("owner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ], + anonymous: false, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("NewOwnerCommitted"), + ::std::vec![ + ::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("NewOwnerCommitted"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("owner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("new_owner"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("finalize_time"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + indexed: false, + }, + ], + anonymous: false, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("NewPaymentAddress"), + ::std::vec![ + ::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("NewPaymentAddress"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("account"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("payment_address"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ], + anonymous: false, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("NewReceiverCommitted"), + ::std::vec![ + ::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned( + "NewReceiverCommitted", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("receiver"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("new_receiver"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("finalize_time"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + indexed: false, + }, + ], + anonymous: false, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("NewReceiverSet"), + ::std::vec![ + ::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("NewReceiverSet"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("old_receiver"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("receiver"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ], + anonymous: false, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("NewSweeperCommitted"), + ::std::vec![ + ::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned( + "NewSweeperCommitted", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("sweeper"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("new_sweeper"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("finalize_time"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + indexed: false, + }, + ], + anonymous: false, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("NewSweeperSet"), + ::std::vec![ + ::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("NewSweeperSet"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("old_sweeper"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("sweeper"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ], + anonymous: false, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("PaymentReceived"), + ::std::vec![ + ::ethers::core::abi::ethabi::Event { + name: ::std::borrow::ToOwned::to_owned("PaymentReceived"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("account"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("token"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + indexed: false, + }, + ::ethers::core::abi::ethabi::EventParam { + name: ::std::borrow::ToOwned::to_owned("amount"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + indexed: false, + }, + ], + anonymous: false, + }, + ], + ), + ]), + errors: ::std::collections::BTreeMap::new(), + receive: false, + fallback: false, + } + } ///The parsed JSON ABI of the contract. - pub static PAYMENTFACTORY_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new(|| - ::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")); + pub static PAYMENTFACTORY_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( + __abi, + ); pub struct PaymentFactory(::ethers::contract::Contract); impl ::core::clone::Clone for PaymentFactory { fn clone(&self) -> Self { @@ -34,7 +762,9 @@ pub mod payment_factory { } impl ::core::fmt::Debug for PaymentFactory { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(stringify!(PaymentFactory)).field(&self.address()).finish() + f.debug_tuple(::core::stringify!(PaymentFactory)) + .field(&self.address()) + .finish() } } impl PaymentFactory { diff --git a/payment-contracts/src/contracts/payment_proxy.rs b/payment-contracts/src/contracts/payment_proxy.rs index b14765af..cf36d4f8 100644 --- a/payment-contracts/src/contracts/payment_proxy.rs +++ b/payment-contracts/src/contracts/payment_proxy.rs @@ -10,11 +10,48 @@ pub use payment_proxy::*; non_camel_case_types, )] pub mod payment_proxy { - #[rustfmt::skip] - const __ABI: &str = "[\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\",\n \"inputs\": [\n {\n \"name\": \"_factory\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"fallback\"\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"implementation\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ]\n }\n]"; + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { + constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_factory"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + }), + functions: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("implementation"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("implementation"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ]), + events: ::std::collections::BTreeMap::new(), + errors: ::std::collections::BTreeMap::new(), + receive: false, + fallback: true, + } + } ///The parsed JSON ABI of the contract. - pub static PAYMENTPROXY_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new(|| - ::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")); + pub static PAYMENTPROXY_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( + __abi, + ); pub struct PaymentProxy(::ethers::contract::Contract); impl ::core::clone::Clone for PaymentProxy { fn clone(&self) -> Self { @@ -34,7 +71,9 @@ pub mod payment_proxy { } impl ::core::fmt::Debug for PaymentProxy { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(stringify!(PaymentProxy)).field(&self.address()).finish() + f.debug_tuple(::core::stringify!(PaymentProxy)) + .field(&self.address()) + .finish() } } impl PaymentProxy { diff --git a/payment-contracts/src/contracts/payment_sweeper.rs b/payment-contracts/src/contracts/payment_sweeper.rs index ee46653c..e51370b4 100644 --- a/payment-contracts/src/contracts/payment_sweeper.rs +++ b/payment-contracts/src/contracts/payment_sweeper.rs @@ -10,11 +10,113 @@ pub use payment_sweeper::*; non_camel_case_types, )] pub mod payment_sweeper { - #[rustfmt::skip] - const __ABI: &str = "[\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\",\n \"inputs\": [\n {\n \"name\": \"_factory\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"send_token\",\n \"inputs\": [\n {\n \"name\": \"_token\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"sweep_token_balance\",\n \"inputs\": [\n {\n \"name\": \"_token\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"recover_token_balance\",\n \"inputs\": [\n {\n \"name\": \"_token\",\n \"type\": \"address\"\n }\n ],\n \"outputs\": []\n },\n {\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"FACTORY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ]\n }\n]"; + #[allow(deprecated)] + fn __abi() -> ::ethers::core::abi::Abi { + ::ethers::core::abi::ethabi::Contract { + constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor { + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_factory"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + }), + functions: ::core::convert::From::from([ + ( + ::std::borrow::ToOwned::to_owned("FACTORY"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("FACTORY"), + inputs: ::std::vec![], + outputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("recover_token_balance"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "recover_token_balance", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_token"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("send_token"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("send_token"), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_token"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_amount"), + kind: ::ethers::core::abi::ethabi::ParamType::Uint( + 256usize, + ), + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ( + ::std::borrow::ToOwned::to_owned("sweep_token_balance"), + ::std::vec![ + ::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned( + "sweep_token_balance", + ), + inputs: ::std::vec![ + ::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("_token"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::None, + }, + ], + outputs: ::std::vec![], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, + }, + ], + ), + ]), + events: ::std::collections::BTreeMap::new(), + errors: ::std::collections::BTreeMap::new(), + receive: false, + fallback: false, + } + } ///The parsed JSON ABI of the contract. - pub static PAYMENTSWEEPER_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new(|| - ::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")); + pub static PAYMENTSWEEPER_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( + __abi, + ); pub struct PaymentSweeper(::ethers::contract::Contract); impl ::core::clone::Clone for PaymentSweeper { fn clone(&self) -> Self { @@ -34,7 +136,9 @@ pub mod payment_sweeper { } impl ::core::fmt::Debug for PaymentSweeper { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(stringify!(PaymentSweeper)).field(&self.address()).finish() + f.debug_tuple(::core::stringify!(PaymentSweeper)) + .field(&self.address()) + .finish() } } impl PaymentSweeper {