diff --git a/primitives/core/src/assertion/mod.rs b/primitives/core/src/assertion/mod.rs index ca76165fb9..4a6b142b61 100644 --- a/primitives/core/src/assertion/mod.rs +++ b/primitives/core/src/assertion/mod.rs @@ -51,7 +51,7 @@ use web3_nft::Web3NftType; pub mod web3_token; use web3_token::Web3TokenType; -use crate::{AccountId, ParameterString}; +use crate::{AccountId, DynamicParams, ParameterString}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; @@ -138,7 +138,7 @@ pub enum Assertion { NftHolder(Web3NftType), #[codec(index = 27)] - Dynamic(H160) // smart contract code identifier + Dynamic(H160, DynamicParams) // smart contract code identifier, abi encoded smart contract params } impl Assertion { @@ -186,7 +186,7 @@ impl Assertion { Self::TokenHoldingAmount(t_type) => t_type.get_supported_networks(), Self::PlatformUser(p_type) => p_type.get_supported_networks(), Self::NftHolder(t_type) => t_type.get_supported_networks(), - Self::Dynamic(_) => all_web3networks(), + Self::Dynamic(..) => all_web3networks(), } } @@ -195,7 +195,7 @@ impl Assertion { #[allow(clippy::match_like_matches_macro)] pub fn skip_identity_filtering(&self) -> bool { match self { - Self::A1 | Self::Dynamic(_) => true, + Self::A1 | Self::Dynamic(..) => true, _ => false, } } diff --git a/primitives/core/src/lib.rs b/primitives/core/src/lib.rs index 2fe01567de..7136ce10c0 100644 --- a/primitives/core/src/lib.rs +++ b/primitives/core/src/lib.rs @@ -38,6 +38,8 @@ pub use types::*; pub type ParameterString = BoundedVec>; +pub type DynamicParams = BoundedVec>; + /// Common types of parachains. mod types { use sp_runtime::{ diff --git a/tee-worker/cli/src/trusted_base_cli/commands/litentry/request_vc.rs b/tee-worker/cli/src/trusted_base_cli/commands/litentry/request_vc.rs index 0bcd5e1442..172cfeaeb6 100644 --- a/tee-worker/cli/src/trusted_base_cli/commands/litentry/request_vc.rs +++ b/tee-worker/cli/src/trusted_base_cli/commands/litentry/request_vc.rs @@ -30,10 +30,10 @@ use litentry_primitives::{ aes_decrypt, AchainableAmount, AchainableAmountHolding, AchainableAmountToken, AchainableAmounts, AchainableBasic, AchainableBetweenPercents, AchainableClassOfYear, AchainableDate, AchainableDateInterval, AchainableDatePercent, AchainableParams, - AchainableToken, Assertion, BnbDigitDomainType, BoundedWeb3Network, ContestType, EVMTokenType, - GenericDiscordRoleType, Identity, OneBlockCourseType, ParameterString, PlatformUserType, - RequestAesKey, SoraQuizType, VIP3MembershipCardLevel, Web3Network, Web3NftType, Web3TokenType, - REQUEST_AES_KEY_LEN, + AchainableToken, Assertion, BnbDigitDomainType, BoundedWeb3Network, ContestType, DynamicParams, + EVMTokenType, GenericDiscordRoleType, Identity, OneBlockCourseType, ParameterString, + PlatformUserType, RequestAesKey, SoraQuizType, VIP3MembershipCardLevel, Web3Network, + Web3NftType, Web3TokenType, REQUEST_AES_KEY_LEN, }; use sp_core::{Pair, H160}; @@ -156,8 +156,11 @@ pub struct A2Arg { #[derive(Args, Debug)] pub struct DynamicArg { - //hex encoded smart contract id + // hex encoded smart contract id pub smart_contract_id: String, + // hex encoded smart contract params + // can use this online tool to encode params: https://abi.hashex.org/ + pub smart_contract_param: String, } #[derive(Args, Debug)] @@ -631,7 +634,17 @@ impl Command { Command::Dynamic(arg) => { let decoded_id = hex::decode(&arg.smart_contract_id.clone()).unwrap(); let id_bytes: [u8; 20] = decoded_id.try_into().unwrap(); - Assertion::Dynamic(H160::from(id_bytes)) + let params = hex::decode(&arg.smart_contract_param.clone()).unwrap(); + let params_len = params.len(); + let truncated_params = DynamicParams::truncate_from(params); + let truncated_params_len = truncated_params.len(); + if params_len > truncated_params_len { + println!( + "The dynamic params length {} is over the maximum value {}", + params_len, truncated_params_len + ); + } + Assertion::Dynamic(H160::from(id_bytes), truncated_params) }, } } diff --git a/tee-worker/client-api/parachain-api/prepare-build/interfaces/vc/definitions.ts b/tee-worker/client-api/parachain-api/prepare-build/interfaces/vc/definitions.ts index 826874d2f5..6e36ec8192 100644 --- a/tee-worker/client-api/parachain-api/prepare-build/interfaces/vc/definitions.ts +++ b/tee-worker/client-api/parachain-api/prepare-build/interfaces/vc/definitions.ts @@ -34,7 +34,7 @@ export default { TokenHoldingAmount: "Web3TokenType", PlatformUser: "PlatformUserType", NftHolder: "Web3NftType", - Dynamic: "([u8;20])", + Dynamic: "([u8;20],Bytes)", }, }, AssertionSupportedNetwork: { diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A1.sol b/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A1.sol index 24b90c32da..1d4d33fa63 100644 --- a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A1.sol +++ b/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A1.sol @@ -25,7 +25,8 @@ import "./DynamicAssertion.sol"; contract A1 is DynamicAssertion { function execute( Identity[] memory identities, - string[] memory /*secrets*/ + string[] memory /*secrets*/, + bytes memory /*params*/ ) public override diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A20.sol b/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A20.sol index 806824961b..6408adde2f 100644 --- a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A20.sol +++ b/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A20.sol @@ -27,7 +27,8 @@ import "./DynamicAssertion.sol"; contract A20 is DynamicAssertion { function execute( Identity[] memory identities, - string[] memory /*secrets*/ + string[] memory /*secrets*/, + bytes memory /*params*/ ) public override diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A6.sol b/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A6.sol index 5896f2821d..f67691ee17 100644 --- a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A6.sol +++ b/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A6.sol @@ -25,7 +25,11 @@ import "./libraries/Identities.sol"; import "./DynamicAssertion.sol"; contract A6 is DynamicAssertion { - function execute(Identity[] memory identities, string[] memory secrets) + function execute( + Identity[] memory identities, + string[] memory secrets, + bytes memory /*params*/ + ) public override returns ( @@ -135,6 +139,6 @@ contract A6 is DynamicAssertion { pure returns (string memory) { - return concatenateStrings("Bearer ", apiKey); + return string(abi.encodePacked("Bearer ", apiKey)); } } diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/DynamicAssertion.sol b/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/DynamicAssertion.sol index 2783cf5ee5..c6419088a7 100644 --- a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/DynamicAssertion.sol +++ b/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/DynamicAssertion.sol @@ -23,7 +23,11 @@ import "./libraries/Identities.sol"; abstract contract DynamicAssertion { string schema_url; - function execute(Identity[] memory identities, string[] memory secrets) + function execute( + Identity[] memory identities, + string[] memory secrets, + bytes memory params + ) public virtual returns ( diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenHoldingAmount.sol b/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenHoldingAmount.sol index 630c7f4a83..ade3b6def0 100644 --- a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenHoldingAmount.sol +++ b/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenHoldingAmount.sol @@ -24,7 +24,11 @@ import "../libraries/Identities.sol"; import "../DynamicAssertion.sol"; abstract contract TokenHoldingAmount is DynamicAssertion { - function execute(Identity[] memory identities, string[] memory secrets) + function execute( + Identity[] memory identities, + string[] memory secrets, + bytes memory /*params*/ + ) public override returns ( diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/mod.rs b/tee-worker/litentry/core/assertion-build/src/dynamic/mod.rs index a9465d43e7..cec5202e25 100644 --- a/tee-worker/litentry/core/assertion-build/src/dynamic/mod.rs +++ b/tee-worker/litentry/core/assertion-build/src/dynamic/mod.rs @@ -30,15 +30,18 @@ pub fn build< >( req: &AssertionBuildRequest, smart_contract_id: SC::Id, + smart_contract_params: DynamicParams, repository: Arc, ) -> Result { let executor = EvmAssertionExecutor { assertion_repository: repository }; - let result = executor.execute(smart_contract_id, &req.identities).map_err(|e| { - Error::RequestVCFailed( - Assertion::Dynamic(smart_contract_id), - ErrorDetail::StfError(ErrorString::truncate_from(e.into())), - ) - })?; + let result = executor + .execute(smart_contract_id, smart_contract_params.clone().into(), &req.identities) + .map_err(|e| { + Error::RequestVCFailed( + Assertion::Dynamic(smart_contract_id, smart_contract_params.clone()), + ErrorDetail::StfError(ErrorString::truncate_from(e.into())), + ) + })?; let runtime_version = IssuerRuntimeVersion { parachain: req.parachain_runtime_version, @@ -51,7 +54,7 @@ pub fn build< for assertion in result.assertions { let logic: AssertionLogic = serde_json::from_str(&assertion).map_err(|e| { Error::RequestVCFailed( - Assertion::Dynamic(smart_contract_id), + Assertion::Dynamic(smart_contract_id, smart_contract_params.clone()), ErrorDetail::StfError(ErrorString::truncate_from(format!("{}", e).into())), ) })?; @@ -70,7 +73,7 @@ pub fn build< Err(e) => { error!("Generate unsigned credential failed {:?}", e); Err(Error::RequestVCFailed( - Assertion::Dynamic(smart_contract_id), + Assertion::Dynamic(smart_contract_id, smart_contract_params), e.into_error_detail(), )) }, @@ -84,7 +87,7 @@ pub mod assertion_test { use lc_mock_server::run; use lc_stf_task_sender::AssertionBuildRequest; use litentry_hex_utils::decode_hex; - use litentry_primitives::{Identity, IdentityString, Web3Network}; + use litentry_primitives::{DynamicParams, Identity, IdentityString, Web3Network}; use sp_core::{crypto::AccountId32, H160}; #[test] @@ -106,7 +109,7 @@ pub mod assertion_test { shard: Default::default(), signer: AccountId32::new([0; 32]), who: Identity::Twitter(IdentityString::new(vec![])), - assertion: Assertion::Dynamic(hash(1)), + assertion: Assertion::Dynamic(hash(1), DynamicParams::truncate_from(vec![])), identities: vec![(twitter_identity, vec![]), (substrate_identity, vec![])], top_hash: Default::default(), parachain_block_number: Default::default(), @@ -121,7 +124,9 @@ pub mod assertion_test { let repository = InMemorySmartContractRepo::new(); // when - let credential = build(&request, hash(1), repository.into()).unwrap(); + let credential = + build(&request, hash(1), DynamicParams::truncate_from(vec![]), repository.into()) + .unwrap(); println!("Credential is: {:?}", credential); @@ -140,7 +145,7 @@ pub mod assertion_test { shard: Default::default(), signer: AccountId32::new([0; 32]), who: Identity::Twitter(IdentityString::new(vec![])), - assertion: Assertion::Dynamic(hash(0)), + assertion: Assertion::Dynamic(hash(0), DynamicParams::truncate_from(vec![])), identities: vec![(twitter_identity, vec![]), (substrate_identity, vec![])], top_hash: Default::default(), parachain_block_number: Default::default(), @@ -155,7 +160,9 @@ pub mod assertion_test { let repository = InMemorySmartContractRepo::new(); // when - let credential = build(&request, hash(0), repository.into()).unwrap(); + let credential = + build(&request, hash(0), DynamicParams::truncate_from(vec![]), repository.into()) + .unwrap(); println!("Credential is: {:?}", credential); @@ -176,7 +183,7 @@ pub mod assertion_test { shard: Default::default(), signer: AccountId32::new([0; 32]), who: Identity::Twitter(IdentityString::new(vec![])), - assertion: Assertion::Dynamic(hash(2)), + assertion: Assertion::Dynamic(hash(2), DynamicParams::truncate_from(vec![])), identities: vec![(twitter_identity, vec![]), (substrate_identity, vec![])], top_hash: Default::default(), parachain_block_number: Default::default(), @@ -191,7 +198,9 @@ pub mod assertion_test { let repository = InMemorySmartContractRepo::new(); // when - let credential = build(&request, hash(2), repository.into()).unwrap(); + let credential = + build(&request, hash(2), DynamicParams::truncate_from(vec![]), repository.into()) + .unwrap(); println!("Credential is: {:?}", credential); @@ -209,7 +218,7 @@ pub mod assertion_test { shard: Default::default(), signer: AccountId32::new([0; 32]), who: Identity::Twitter(IdentityString::new(vec![])), - assertion: Assertion::Dynamic(hash(0)), + assertion: Assertion::Dynamic(hash(0), DynamicParams::truncate_from(vec![])), identities: vec![(twitter_identity, vec![])], top_hash: Default::default(), parachain_block_number: Default::default(), @@ -224,7 +233,9 @@ pub mod assertion_test { let repository = InMemorySmartContractRepo::new(); // when - let credential = build(&request, hash(0), repository.into()).unwrap(); + let credential = + build(&request, hash(0), DynamicParams::truncate_from(vec![]), repository.into()) + .unwrap(); // then assert!(!credential.credential_subject.values[0]); @@ -249,12 +260,14 @@ pub mod assertion_test { let network = Web3Network::BitcoinP2tr; let identities = vec![(Identity::Bitcoin(address), vec![network])]; let smart_contract_id = hash(3); + let smart_contract_params = + DynamicParams::truncate_from(ethabi::encode(&[ethabi::Token::String("ordi".into())])); let request = AssertionBuildRequest { shard: Default::default(), signer: AccountId32::new([0; 32]), who: Identity::Substrate(AccountId32::new([0; 32]).into()), - assertion: Assertion::Dynamic(smart_contract_id), + assertion: Assertion::Dynamic(smart_contract_id, smart_contract_params.clone()), identities, top_hash: Default::default(), parachain_block_number: Default::default(), @@ -269,7 +282,9 @@ pub mod assertion_test { let repository = InMemorySmartContractRepo::new(); // when - let credential = build(&request, smart_contract_id, repository.into()).unwrap(); + let credential = + build(&request, smart_contract_id, smart_contract_params.clone(), repository.into()) + .unwrap(); println!("Credential is: {:?}", credential); diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/repository.rs b/tee-worker/litentry/core/assertion-build/src/dynamic/repository.rs index c953c386d4..409da3f195 100644 --- a/tee-worker/litentry/core/assertion-build/src/dynamic/repository.rs +++ b/tee-worker/litentry/core/assertion-build/src/dynamic/repository.rs @@ -49,7 +49,7 @@ impl InMemorySmartContractRepo { map.insert( hash(0), ( - hex::decode("608060405234801561001057600080fd5b50611931806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e256184614610030575b600080fd5b61004a600480360381019061004591906110c9565b610064565b60405161005b9594939291906112f0565b60405180910390f35b60608060608060008060405180608001604052806045815260200161184460459139905060006040518060400160405280601b81526020017f4261736963204964656e7469747920566572696669636174696f6e000000000081525090506040518060a001604052806073815260200161188960739139600090805190602001906100f0929190610a70565b50600080600090506000805b8c51811015610177576101288d828151811061011b5761011a61135f565b5b6020026020010151610410565b156101365760019150610164565b6101598d828151811061014c5761014b61135f565b5b6020026020010151610442565b1561016357600192505b5b808061016f906113c7565b9150506100fc565b508080156101825750815b925060006040518060400160405280600267ffffffffffffffff8111156101ac576101ab610b8c565b5b6040519080825280602002602001820160405280156101e557816020015b6101d2610af6565b8152602001906001900390816101ca5790505b50815260200160011515815250905061026d8160006040518060400160405280601181526020017f246861735f776562325f6163636f756e7400000000000000000000000000000081525060046040518060400160405280600481526020017f7472756500000000000000000000000000000000000000000000000000000000815250610474565b506102e78160016040518060400160405280601181526020017f246861735f776562335f6163636f756e7400000000000000000000000000000081525060046040518060400160405280600481526020017f7472756500000000000000000000000000000000000000000000000000000000815250610474565b506000600167ffffffffffffffff81111561030557610304610b8c565b5b60405190808252806020026020018201604052801561033857816020015b60608152602001906001900390816103235790505b509050610344826104a6565b816000815181106103585761035761135f565b5b60200260200101819052508686826000888180546103759061143f565b80601f01602080910402602001604051908101604052809291908181526020018280546103a19061143f565b80156103ee5780601f106103c3576101008083540402835291602001916103ee565b820191906000526020600020905b8154815290600101906020018083116103d157829003601f168201915b505050505091509b509b509b509b509b50505050505050509295509295909350565b600061041b82610676565b8061042b575061042a8261068a565b5b8061043b575061043a8261069e565b5b9050919050565b600061044d826106b2565b8061045d575061045c826106c6565b5b8061046d575061046c826106da565b5b9050919050565b61047c610b29565b61048986868686866106ee565b600186602001901515908115158152505085905095945050505050565b606060006040518060400160405280600181526020017f7b0000000000000000000000000000000000000000000000000000000000000081525090506000836000015151111561064b57808360200151610535576040518060400160405280600681526020017f226f72223a5b000000000000000000000000000000000000000000000000000081525061056c565b6040518060400160405280600781526020017f22616e64223a5b000000000000000000000000000000000000000000000000008152505b60405160200161057d9291906114ad565b604051602081830303815290604052905060005b8360000151518110156106275760008111156105ca57816040516020016105b8919061151d565b60405160208183030381529060405291505b816105f2856000015183815181106105e5576105e461135f565b5b6020026020010151610744565b6040516020016106039291906114ad565b6040516020818303038152906040529150808061061f906113c7565b915050610591565b5080604051602001610639919061158b565b60405160208183030381529060405290505b8060405160200161065c91906115f9565b604051602081830303815290604052905080915050919050565b6000610683826000610785565b9050919050565b6000610697826001610785565b9050919050565b60006106ab826002610785565b9050919050565b60006106bf826003610785565b9050919050565b60006106d3826004610785565b9050919050565b60006106e7826005610785565b9050919050565b60405180606001604052808481526020018360058111156107125761071161161b565b5b815260200182815250856000015185815181106107325761073161135f565b5b60200260200101819052505050505050565b6060816000015161075883602001516107b3565b836040015160405160200161076f9392919061177a565b6040516020818303038152906040529050919050565b60008163ffffffff16836000015163ffffffff1614156107a857600190506107ad565b600090505b92915050565b6060600460058111156107c9576107c861161b565b5b8260058111156107dc576107db61161b565b5b141561081f576040518060400160405280600281526020017f3d3d0000000000000000000000000000000000000000000000000000000000008152509050610a6b565b600060058111156108335761083261161b565b5b8260058111156108465761084561161b565b5b1415610889576040518060400160405280600181526020017f3e000000000000000000000000000000000000000000000000000000000000008152509050610a6b565b6001600581111561089d5761089c61161b565b5b8260058111156108b0576108af61161b565b5b14156108f3576040518060400160405280600181526020017f3c000000000000000000000000000000000000000000000000000000000000008152509050610a6b565b600260058111156109075761090661161b565b5b82600581111561091a5761091961161b565b5b141561095d576040518060400160405280600281526020017f3e3d0000000000000000000000000000000000000000000000000000000000008152509050610a6b565b600360058111156109715761097061161b565b5b8260058111156109845761098361161b565b5b14156109c7576040518060400160405280600281526020017f3c3d0000000000000000000000000000000000000000000000000000000000008152509050610a6b565b6005808111156109da576109d961161b565b5b8260058111156109ed576109ec61161b565b5b1415610a30576040518060400160405280600281526020017f213d0000000000000000000000000000000000000000000000000000000000008152509050610a6b565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6290611823565b60405180910390fd5b919050565b828054610a7c9061143f565b90600052602060002090601f016020900481019282610a9e5760008555610ae5565b82601f10610ab757805160ff1916838001178555610ae5565b82800160010185558215610ae5579182015b82811115610ae4578251825591602001919060010190610ac9565b5b509050610af29190610b45565b5090565b60405180606001604052806060815260200160006005811115610b1c57610b1b61161b565b5b8152602001606081525090565b6040518060400160405280606081526020016000151581525090565b5b80821115610b5e576000816000905550600101610b46565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610bc482610b7b565b810181811067ffffffffffffffff82111715610be357610be2610b8c565b5b80604052505050565b6000610bf6610b62565b9050610c028282610bbb565b919050565b600067ffffffffffffffff821115610c2257610c21610b8c565b5b602082029050602081019050919050565b600080fd5b600080fd5b600080fd5b600063ffffffff82169050919050565b610c5b81610c42565b8114610c6657600080fd5b50565b600081359050610c7881610c52565b92915050565b600080fd5b600067ffffffffffffffff821115610c9e57610c9d610b8c565b5b610ca782610b7b565b9050602081019050919050565b82818337600083830152505050565b6000610cd6610cd184610c83565b610bec565b905082815260208101848484011115610cf257610cf1610c7e565b5b610cfd848285610cb4565b509392505050565b600082601f830112610d1a57610d19610b76565b5b8135610d2a848260208601610cc3565b91505092915050565b600067ffffffffffffffff821115610d4e57610d4d610b8c565b5b602082029050602081019050919050565b6000610d72610d6d84610d33565b610bec565b90508083825260208201905060208402830185811115610d9557610d94610c33565b5b835b81811015610dbe5780610daa8882610c69565b845260208401935050602081019050610d97565b5050509392505050565b600082601f830112610ddd57610ddc610b76565b5b8135610ded848260208601610d5f565b91505092915050565b600060608284031215610e0c57610e0b610c38565b5b610e166060610bec565b90506000610e2684828501610c69565b600083015250602082013567ffffffffffffffff811115610e4a57610e49610c3d565b5b610e5684828501610d05565b602083015250604082013567ffffffffffffffff811115610e7a57610e79610c3d565b5b610e8684828501610dc8565b60408301525092915050565b6000610ea5610ea084610c07565b610bec565b90508083825260208201905060208402830185811115610ec857610ec7610c33565b5b835b81811015610f0f57803567ffffffffffffffff811115610eed57610eec610b76565b5b808601610efa8982610df6565b85526020850194505050602081019050610eca565b5050509392505050565b600082601f830112610f2e57610f2d610b76565b5b8135610f3e848260208601610e92565b91505092915050565b600067ffffffffffffffff821115610f6257610f61610b8c565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610f8e57610f8d610b8c565b5b610f9782610b7b565b9050602081019050919050565b6000610fb7610fb284610f73565b610bec565b905082815260208101848484011115610fd357610fd2610c7e565b5b610fde848285610cb4565b509392505050565b600082601f830112610ffb57610ffa610b76565b5b813561100b848260208601610fa4565b91505092915050565b600061102761102284610f47565b610bec565b9050808382526020820190506020840283018581111561104a57611049610c33565b5b835b8181101561109157803567ffffffffffffffff81111561106f5761106e610b76565b5b80860161107c8982610fe6565b8552602085019450505060208101905061104c565b5050509392505050565b600082601f8301126110b0576110af610b76565b5b81356110c0848260208601611014565b91505092915050565b600080604083850312156110e0576110df610b6c565b5b600083013567ffffffffffffffff8111156110fe576110fd610b71565b5b61110a85828601610f19565b925050602083013567ffffffffffffffff81111561112b5761112a610b71565b5b6111378582860161109b565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561117b578082015181840152602081019050611160565b8381111561118a576000848401525b50505050565b600061119b82611141565b6111a5818561114c565b93506111b581856020860161115d565b6111be81610b7b565b840191505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061121182611141565b61121b81856111f5565b935061122b81856020860161115d565b61123481610b7b565b840191505092915050565b600061124b8383611206565b905092915050565b6000602082019050919050565b600061126b826111c9565b61127581856111d4565b935083602082028501611287856111e5565b8060005b858110156112c357848403895281516112a4858261123f565b94506112af83611253565b925060208a0199505060018101905061128b565b50829750879550505050505092915050565b60008115159050919050565b6112ea816112d5565b82525050565b600060a082019050818103600083015261130a8188611190565b9050818103602083015261131e8187611190565b905081810360408301526113328186611260565b905081810360608301526113468185611190565b905061135560808301846112e1565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b60006113d2826113bd565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156114055761140461138e565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061145757607f821691505b6020821081141561146b5761146a611410565b5b50919050565b600081905092915050565b600061148782611141565b6114918185611471565b93506114a181856020860161115d565b80840191505092915050565b60006114b9828561147c565b91506114c5828461147c565b91508190509392505050565b7f2c00000000000000000000000000000000000000000000000000000000000000600082015250565b6000611507600183611471565b9150611512826114d1565b600182019050919050565b6000611529828461147c565b9150611534826114fa565b915081905092915050565b7f5d00000000000000000000000000000000000000000000000000000000000000600082015250565b6000611575600183611471565b91506115808261153f565b600182019050919050565b6000611597828461147c565b91506115a282611568565b915081905092915050565b7f7d00000000000000000000000000000000000000000000000000000000000000600082015250565b60006115e3600183611471565b91506115ee826115ad565b600182019050919050565b6000611605828461147c565b9150611610826115d6565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f7b22737263223a22000000000000000000000000000000000000000000000000600082015250565b6000611680600883611471565b915061168b8261164a565b600882019050919050565b7f222c226f70223a22000000000000000000000000000000000000000000000000600082015250565b60006116cc600883611471565b91506116d782611696565b600882019050919050565b7f222c22647374223a220000000000000000000000000000000000000000000000600082015250565b6000611718600983611471565b9150611723826116e2565b600982019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b6000611764600283611471565b915061176f8261172e565b600282019050919050565b600061178582611673565b9150611791828661147c565b915061179c826116bf565b91506117a8828561147c565b91506117b38261170b565b91506117bf828461147c565b91506117ca82611757565b9150819050949350505050565b7f556e737570706f72746564206f70657261746f72000000000000000000000000600082015250565b600061180d60148361114c565b9150611818826117d7565b602082019050919050565b6000602082019050818103600083015261183c81611800565b905091905056fe596f75277665206964656e746966696564206174206c65617374206f6e65206163636f756e742f6164647265737320696e20626f7468205765623220616e6420576562332e68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6c6974656e7472792f76632d6a736f6e736368656d612f6d61696e2f646973742f736368656d61732f312d62617369632d6964656e746974792d766572696669636174696f6e2f312d302d302e6a736f6ea264697066735822122053e670b8fe1b1c4e4cefd4033a80c7271cc1d59fea6ede4d1494600bcc23380e64736f6c634300080b0033").unwrap(), + hex::decode("608060405234801561001057600080fd5b50611961806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063b4e4c68514610030575b600080fd5b61004a600480360381019061004591906110ca565b610064565b60405161005b959493929190611320565b60405180910390f35b60608060608060008060405180608001604052806045815260200161187460459139905060006040518060400160405280601b81526020017f4261736963204964656e7469747920566572696669636174696f6e000000000081525090506040518060a00160405280607381526020016118b960739139600090805190602001906100f0929190610a71565b50600080600090506000805b8d51811015610177576101288e828151811061011b5761011a61138f565b5b6020026020010151610411565b156101365760019150610164565b6101598e828151811061014c5761014b61138f565b5b6020026020010151610443565b1561016357600192505b5b808061016f906113f7565b9150506100fc565b508080156101825750815b925060006040518060400160405280600267ffffffffffffffff8111156101ac576101ab610b8d565b5b6040519080825280602002602001820160405280156101e557816020015b6101d2610af7565b8152602001906001900390816101ca5790505b50815260200160011515815250905061026d8160006040518060400160405280601181526020017f246861735f776562325f6163636f756e7400000000000000000000000000000081525060046040518060400160405280600481526020017f7472756500000000000000000000000000000000000000000000000000000000815250610475565b506102e78160016040518060400160405280601181526020017f246861735f776562335f6163636f756e7400000000000000000000000000000081525060046040518060400160405280600481526020017f7472756500000000000000000000000000000000000000000000000000000000815250610475565b506000600167ffffffffffffffff81111561030557610304610b8d565b5b60405190808252806020026020018201604052801561033857816020015b60608152602001906001900390816103235790505b509050610344826104a7565b816000815181106103585761035761138f565b5b60200260200101819052508686826000888180546103759061146f565b80601f01602080910402602001604051908101604052809291908181526020018280546103a19061146f565b80156103ee5780601f106103c3576101008083540402835291602001916103ee565b820191906000526020600020905b8154815290600101906020018083116103d157829003601f168201915b505050505091509b509b509b509b509b5050505050505050939792965093509350565b600061041c82610677565b8061042c575061042b8261068b565b5b8061043c575061043b8261069f565b5b9050919050565b600061044e826106b3565b8061045e575061045d826106c7565b5b8061046e575061046d826106db565b5b9050919050565b61047d610b2a565b61048a86868686866106ef565b600186602001901515908115158152505085905095945050505050565b606060006040518060400160405280600181526020017f7b0000000000000000000000000000000000000000000000000000000000000081525090506000836000015151111561064c57808360200151610536576040518060400160405280600681526020017f226f72223a5b000000000000000000000000000000000000000000000000000081525061056d565b6040518060400160405280600781526020017f22616e64223a5b000000000000000000000000000000000000000000000000008152505b60405160200161057e9291906114dd565b604051602081830303815290604052905060005b8360000151518110156106285760008111156105cb57816040516020016105b9919061154d565b60405160208183030381529060405291505b816105f3856000015183815181106105e6576105e561138f565b5b6020026020010151610745565b6040516020016106049291906114dd565b60405160208183030381529060405291508080610620906113f7565b915050610592565b508060405160200161063a91906115bb565b60405160208183030381529060405290505b8060405160200161065d9190611629565b604051602081830303815290604052905080915050919050565b6000610684826000610786565b9050919050565b6000610698826001610786565b9050919050565b60006106ac826002610786565b9050919050565b60006106c0826003610786565b9050919050565b60006106d4826004610786565b9050919050565b60006106e8826005610786565b9050919050565b60405180606001604052808481526020018360058111156107135761071261164b565b5b815260200182815250856000015185815181106107335761073261138f565b5b60200260200101819052505050505050565b6060816000015161075983602001516107b4565b8360400151604051602001610770939291906117aa565b6040516020818303038152906040529050919050565b60008163ffffffff16836000015163ffffffff1614156107a957600190506107ae565b600090505b92915050565b6060600460058111156107ca576107c961164b565b5b8260058111156107dd576107dc61164b565b5b1415610820576040518060400160405280600281526020017f3d3d0000000000000000000000000000000000000000000000000000000000008152509050610a6c565b600060058111156108345761083361164b565b5b8260058111156108475761084661164b565b5b141561088a576040518060400160405280600181526020017f3e000000000000000000000000000000000000000000000000000000000000008152509050610a6c565b6001600581111561089e5761089d61164b565b5b8260058111156108b1576108b061164b565b5b14156108f4576040518060400160405280600181526020017f3c000000000000000000000000000000000000000000000000000000000000008152509050610a6c565b600260058111156109085761090761164b565b5b82600581111561091b5761091a61164b565b5b141561095e576040518060400160405280600281526020017f3e3d0000000000000000000000000000000000000000000000000000000000008152509050610a6c565b600360058111156109725761097161164b565b5b8260058111156109855761098461164b565b5b14156109c8576040518060400160405280600281526020017f3c3d0000000000000000000000000000000000000000000000000000000000008152509050610a6c565b6005808111156109db576109da61164b565b5b8260058111156109ee576109ed61164b565b5b1415610a31576040518060400160405280600281526020017f213d0000000000000000000000000000000000000000000000000000000000008152509050610a6c565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6390611853565b60405180910390fd5b919050565b828054610a7d9061146f565b90600052602060002090601f016020900481019282610a9f5760008555610ae6565b82601f10610ab857805160ff1916838001178555610ae6565b82800160010185558215610ae6579182015b82811115610ae5578251825591602001919060010190610aca565b5b509050610af39190610b46565b5090565b60405180606001604052806060815260200160006005811115610b1d57610b1c61164b565b5b8152602001606081525090565b6040518060400160405280606081526020016000151581525090565b5b80821115610b5f576000816000905550600101610b47565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610bc582610b7c565b810181811067ffffffffffffffff82111715610be457610be3610b8d565b5b80604052505050565b6000610bf7610b63565b9050610c038282610bbc565b919050565b600067ffffffffffffffff821115610c2357610c22610b8d565b5b602082029050602081019050919050565b600080fd5b600080fd5b600080fd5b600063ffffffff82169050919050565b610c5c81610c43565b8114610c6757600080fd5b50565b600081359050610c7981610c53565b92915050565b600080fd5b600067ffffffffffffffff821115610c9f57610c9e610b8d565b5b610ca882610b7c565b9050602081019050919050565b82818337600083830152505050565b6000610cd7610cd284610c84565b610bed565b905082815260208101848484011115610cf357610cf2610c7f565b5b610cfe848285610cb5565b509392505050565b600082601f830112610d1b57610d1a610b77565b5b8135610d2b848260208601610cc4565b91505092915050565b600067ffffffffffffffff821115610d4f57610d4e610b8d565b5b602082029050602081019050919050565b6000610d73610d6e84610d34565b610bed565b90508083825260208201905060208402830185811115610d9657610d95610c34565b5b835b81811015610dbf5780610dab8882610c6a565b845260208401935050602081019050610d98565b5050509392505050565b600082601f830112610dde57610ddd610b77565b5b8135610dee848260208601610d60565b91505092915050565b600060608284031215610e0d57610e0c610c39565b5b610e176060610bed565b90506000610e2784828501610c6a565b600083015250602082013567ffffffffffffffff811115610e4b57610e4a610c3e565b5b610e5784828501610d06565b602083015250604082013567ffffffffffffffff811115610e7b57610e7a610c3e565b5b610e8784828501610dc9565b60408301525092915050565b6000610ea6610ea184610c08565b610bed565b90508083825260208201905060208402830185811115610ec957610ec8610c34565b5b835b81811015610f1057803567ffffffffffffffff811115610eee57610eed610b77565b5b808601610efb8982610df7565b85526020850194505050602081019050610ecb565b5050509392505050565b600082601f830112610f2f57610f2e610b77565b5b8135610f3f848260208601610e93565b91505092915050565b600067ffffffffffffffff821115610f6357610f62610b8d565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610f8f57610f8e610b8d565b5b610f9882610b7c565b9050602081019050919050565b6000610fb8610fb384610f74565b610bed565b905082815260208101848484011115610fd457610fd3610c7f565b5b610fdf848285610cb5565b509392505050565b600082601f830112610ffc57610ffb610b77565b5b813561100c848260208601610fa5565b91505092915050565b600061102861102384610f48565b610bed565b9050808382526020820190506020840283018581111561104b5761104a610c34565b5b835b8181101561109257803567ffffffffffffffff8111156110705761106f610b77565b5b80860161107d8982610fe7565b8552602085019450505060208101905061104d565b5050509392505050565b600082601f8301126110b1576110b0610b77565b5b81356110c1848260208601611015565b91505092915050565b6000806000606084860312156110e3576110e2610b6d565b5b600084013567ffffffffffffffff81111561110157611100610b72565b5b61110d86828701610f1a565b935050602084013567ffffffffffffffff81111561112e5761112d610b72565b5b61113a8682870161109c565b925050604084013567ffffffffffffffff81111561115b5761115a610b72565b5b61116786828701610d06565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b60005b838110156111ab578082015181840152602081019050611190565b838111156111ba576000848401525b50505050565b60006111cb82611171565b6111d5818561117c565b93506111e581856020860161118d565b6111ee81610b7c565b840191505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061124182611171565b61124b8185611225565b935061125b81856020860161118d565b61126481610b7c565b840191505092915050565b600061127b8383611236565b905092915050565b6000602082019050919050565b600061129b826111f9565b6112a58185611204565b9350836020820285016112b785611215565b8060005b858110156112f357848403895281516112d4858261126f565b94506112df83611283565b925060208a019950506001810190506112bb565b50829750879550505050505092915050565b60008115159050919050565b61131a81611305565b82525050565b600060a082019050818103600083015261133a81886111c0565b9050818103602083015261134e81876111c0565b905081810360408301526113628186611290565b9050818103606083015261137681856111c0565b90506113856080830184611311565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b6000611402826113ed565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611435576114346113be565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061148757607f821691505b6020821081141561149b5761149a611440565b5b50919050565b600081905092915050565b60006114b782611171565b6114c181856114a1565b93506114d181856020860161118d565b80840191505092915050565b60006114e982856114ac565b91506114f582846114ac565b91508190509392505050565b7f2c00000000000000000000000000000000000000000000000000000000000000600082015250565b60006115376001836114a1565b915061154282611501565b600182019050919050565b600061155982846114ac565b91506115648261152a565b915081905092915050565b7f5d00000000000000000000000000000000000000000000000000000000000000600082015250565b60006115a56001836114a1565b91506115b08261156f565b600182019050919050565b60006115c782846114ac565b91506115d282611598565b915081905092915050565b7f7d00000000000000000000000000000000000000000000000000000000000000600082015250565b60006116136001836114a1565b915061161e826115dd565b600182019050919050565b600061163582846114ac565b915061164082611606565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f7b22737263223a22000000000000000000000000000000000000000000000000600082015250565b60006116b06008836114a1565b91506116bb8261167a565b600882019050919050565b7f222c226f70223a22000000000000000000000000000000000000000000000000600082015250565b60006116fc6008836114a1565b9150611707826116c6565b600882019050919050565b7f222c22647374223a220000000000000000000000000000000000000000000000600082015250565b60006117486009836114a1565b915061175382611712565b600982019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b60006117946002836114a1565b915061179f8261175e565b600282019050919050565b60006117b5826116a3565b91506117c182866114ac565b91506117cc826116ef565b91506117d882856114ac565b91506117e38261173b565b91506117ef82846114ac565b91506117fa82611787565b9150819050949350505050565b7f556e737570706f72746564206f70657261746f72000000000000000000000000600082015250565b600061183d60148361117c565b915061184882611807565b602082019050919050565b6000602082019050818103600083015261186c81611830565b905091905056fe596f75277665206964656e746966696564206174206c65617374206f6e65206163636f756e742f6164647265737320696e20626f7468205765623220616e6420576562332e68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6c6974656e7472792f76632d6a736f6e736368656d612f6d61696e2f646973742f736368656d61732f312d62617369632d6964656e746974792d766572696669636174696f6e2f312d302d302e6a736f6ea2646970667358221220ed2f7101d3d6ccb8ad172fd7837140ed0233eb1a52f5f00ac799f629af62634c64736f6c634300080b0033").unwrap(), vec![] ) ); @@ -57,7 +57,7 @@ impl InMemorySmartContractRepo { map.insert( hash(1), ( - hex::decode("608060405234801561001057600080fd5b5061187e806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e256184614610030575b600080fd5b61004a60048036038101906100459190610ebe565b610064565b60405161005b9594939291906110e5565b60405180910390f35b6060806060806000806040518060c00160405280608681526020016117c360869139905060006040518060400160405280601c81526020017f49444875622045564d2056657273696f6e204561726c7920426972640000000081525090506040518060a001604052806075815260200161174e60759139600090805190602001906100f092919061089a565b506000805b8a51811015610262576101218b828151811061011457610113611154565b5b6020026020010151610425565b1561024e576000806101508d848151811061013f5761013e611154565b5b602002602001015160200151610457565b91509150811561023e578161016657505061024f565b6000816040516020016101799190611257565b604051602081830303815290604052905060006040518060400160405280600a81526020017f2f6861734a6f696e656400000000000000000000000000000000000000000000815250905060008067ffffffffffffffff8111156101e0576101df610981565b5b60405190808252806020026020018201604052801561021957816020015b610206610920565b8152602001906001900390816101fe5790505b50905060008061022a8585856104bc565b915091508115610238578098505b50505050505b831561024b575050610262565b50505b5b808061025a906112b2565b9150506100f5565b50600060405180606001604052806040518060400160405280600b81526020017f246861735f6a6f696e65640000000000000000000000000000000000000000008152508152602001600460058111156102bf576102be6112fb565b5b81526020016040518060400160405280600481526020017f747275650000000000000000000000000000000000000000000000000000000081525081525090506000600167ffffffffffffffff81111561031c5761031b610981565b5b60405190808252806020026020018201604052801561034f57816020015b606081526020019060019003908161033a5790505b50905061035b82610532565b8160008151811061036f5761036e611154565b5b602002602001018190525084848260008681805461038c90611359565b80601f01602080910402602001604051908101604052809291908181526020018280546103b890611359565b80156104055780601f106103da57610100808354040283529160200191610405565b820191906000526020600020905b8154815290600101906020018083116103e857829003601f168201915b505050505091509950995099509950995050505050509295509295909350565b600061043082610573565b80610440575061043f82610587565b5b80610450575061044f8261059b565b5b9050919050565b6000606060008360405160200161046e91906113e0565b6040516020818303038152906040529050600081519050604051611000818360208601600061041b600019f16104a357600080fd5b8094506040810193506110008101604052505050915091565b60008060008060008787876040516020016104d993929190611508565b6040516020818303038152906040529050600081519050604051604081836020860160006103e9600019f161050d57600080fd5b8051945060208101519350604081016040525083839550955050505050935093915050565b6060816000015161054683602001516105af565b836040015160405160200161055d93929190611684565b6040516020818303038152906040529050919050565b600061058082600361086c565b9050919050565b600061059482600461086c565b9050919050565b60006105a882600561086c565b9050919050565b6060600460058111156105c5576105c46112fb565b5b8260058111156105d8576105d76112fb565b5b141561061b576040518060400160405280600281526020017f3d3d0000000000000000000000000000000000000000000000000000000000008152509050610867565b6000600581111561062f5761062e6112fb565b5b826005811115610642576106416112fb565b5b1415610685576040518060400160405280600181526020017f3e000000000000000000000000000000000000000000000000000000000000008152509050610867565b60016005811115610699576106986112fb565b5b8260058111156106ac576106ab6112fb565b5b14156106ef576040518060400160405280600181526020017f3c000000000000000000000000000000000000000000000000000000000000008152509050610867565b60026005811115610703576107026112fb565b5b826005811115610716576107156112fb565b5b1415610759576040518060400160405280600281526020017f3e3d0000000000000000000000000000000000000000000000000000000000008152509050610867565b6003600581111561076d5761076c6112fb565b5b8260058111156107805761077f6112fb565b5b14156107c3576040518060400160405280600281526020017f3c3d0000000000000000000000000000000000000000000000000000000000008152509050610867565b6005808111156107d6576107d56112fb565b5b8260058111156107e9576107e86112fb565b5b141561082c576040518060400160405280600281526020017f213d0000000000000000000000000000000000000000000000000000000000008152509050610867565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085e9061172d565b60405180910390fd5b919050565b60008163ffffffff16836000015163ffffffff16141561088f5760019050610894565b600090505b92915050565b8280546108a690611359565b90600052602060002090601f0160209004810192826108c8576000855561090f565b82601f106108e157805160ff191683800117855561090f565b8280016001018555821561090f579182015b8281111561090e5782518255916020019190600101906108f3565b5b50905061091c919061093a565b5090565b604051806040016040528060608152602001606081525090565b5b8082111561095357600081600090555060010161093b565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6109b982610970565b810181811067ffffffffffffffff821117156109d8576109d7610981565b5b80604052505050565b60006109eb610957565b90506109f782826109b0565b919050565b600067ffffffffffffffff821115610a1757610a16610981565b5b602082029050602081019050919050565b600080fd5b600080fd5b600080fd5b600063ffffffff82169050919050565b610a5081610a37565b8114610a5b57600080fd5b50565b600081359050610a6d81610a47565b92915050565b600080fd5b600067ffffffffffffffff821115610a9357610a92610981565b5b610a9c82610970565b9050602081019050919050565b82818337600083830152505050565b6000610acb610ac684610a78565b6109e1565b905082815260208101848484011115610ae757610ae6610a73565b5b610af2848285610aa9565b509392505050565b600082601f830112610b0f57610b0e61096b565b5b8135610b1f848260208601610ab8565b91505092915050565b600067ffffffffffffffff821115610b4357610b42610981565b5b602082029050602081019050919050565b6000610b67610b6284610b28565b6109e1565b90508083825260208201905060208402830185811115610b8a57610b89610a28565b5b835b81811015610bb35780610b9f8882610a5e565b845260208401935050602081019050610b8c565b5050509392505050565b600082601f830112610bd257610bd161096b565b5b8135610be2848260208601610b54565b91505092915050565b600060608284031215610c0157610c00610a2d565b5b610c0b60606109e1565b90506000610c1b84828501610a5e565b600083015250602082013567ffffffffffffffff811115610c3f57610c3e610a32565b5b610c4b84828501610afa565b602083015250604082013567ffffffffffffffff811115610c6f57610c6e610a32565b5b610c7b84828501610bbd565b60408301525092915050565b6000610c9a610c95846109fc565b6109e1565b90508083825260208201905060208402830185811115610cbd57610cbc610a28565b5b835b81811015610d0457803567ffffffffffffffff811115610ce257610ce161096b565b5b808601610cef8982610beb565b85526020850194505050602081019050610cbf565b5050509392505050565b600082601f830112610d2357610d2261096b565b5b8135610d33848260208601610c87565b91505092915050565b600067ffffffffffffffff821115610d5757610d56610981565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d8357610d82610981565b5b610d8c82610970565b9050602081019050919050565b6000610dac610da784610d68565b6109e1565b905082815260208101848484011115610dc857610dc7610a73565b5b610dd3848285610aa9565b509392505050565b600082601f830112610df057610def61096b565b5b8135610e00848260208601610d99565b91505092915050565b6000610e1c610e1784610d3c565b6109e1565b90508083825260208201905060208402830185811115610e3f57610e3e610a28565b5b835b81811015610e8657803567ffffffffffffffff811115610e6457610e6361096b565b5b808601610e718982610ddb565b85526020850194505050602081019050610e41565b5050509392505050565b600082601f830112610ea557610ea461096b565b5b8135610eb5848260208601610e09565b91505092915050565b60008060408385031215610ed557610ed4610961565b5b600083013567ffffffffffffffff811115610ef357610ef2610966565b5b610eff85828601610d0e565b925050602083013567ffffffffffffffff811115610f2057610f1f610966565b5b610f2c85828601610e90565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610f70578082015181840152602081019050610f55565b83811115610f7f576000848401525b50505050565b6000610f9082610f36565b610f9a8185610f41565b9350610faa818560208601610f52565b610fb381610970565b840191505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061100682610f36565b6110108185610fea565b9350611020818560208601610f52565b61102981610970565b840191505092915050565b60006110408383610ffb565b905092915050565b6000602082019050919050565b600061106082610fbe565b61106a8185610fc9565b93508360208202850161107c85610fda565b8060005b858110156110b857848403895281516110998582611034565b94506110a483611048565b925060208a01995050600181019050611080565b50829750879550505050505092915050565b60008115159050919050565b6110df816110ca565b82525050565b600060a08201905081810360008301526110ff8188610f85565b905081810360208301526111138187610f85565b905081810360408301526111278186611055565b9050818103606083015261113b8185610f85565b905061114a60808301846110d6565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081905092915050565b7f687474703a2f2f6c6f63616c686f73743a31393532372f6576656e74732f646f60008201527f65732d757365722d6a6f696e65642d65766d2d63616d706169676e3f6163636f60208201527f756e743d00000000000000000000000000000000000000000000000000000000604082015250565b6000611210604483611183565b915061121b8261118e565b604482019050919050565b600061123182610f36565b61123b8185611183565b935061124b818560208601610f52565b80840191505092915050565b600061126282611203565b915061126e8284611226565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b60006112bd826112a8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156112f0576112ef611279565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061137157607f821691505b602082108114156113855761138461132a565b5b50919050565b600081519050919050565b600082825260208201905092915050565b60006113b28261138b565b6113bc8185611396565b93506113cc818560208601610f52565b6113d581610970565b840191505092915050565b600060208201905081810360008301526113fa81846113a7565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000604083016000830151848203600086015261144b8282610ffb565b915050602083015184820360208601526114658282610ffb565b9150508091505092915050565b600061147e838361142e565b905092915050565b6000602082019050919050565b600061149e82611402565b6114a8818561140d565b9350836020820285016114ba8561141e565b8060005b858110156114f657848403895281516114d78582611472565b94506114e283611486565b925060208a019950506001810190506114be565b50829750879550505050505092915050565b600060608201905081810360008301526115228186610f85565b905081810360208301526115368185610f85565b9050818103604083015261154a8184611493565b9050949350505050565b7f7b22737263223a22000000000000000000000000000000000000000000000000600082015250565b600061158a600883611183565b915061159582611554565b600882019050919050565b7f222c226f70223a22000000000000000000000000000000000000000000000000600082015250565b60006115d6600883611183565b91506115e1826115a0565b600882019050919050565b7f222c22647374223a220000000000000000000000000000000000000000000000600082015250565b6000611622600983611183565b915061162d826115ec565b600982019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b600061166e600283611183565b915061167982611638565b600282019050919050565b600061168f8261157d565b915061169b8286611226565b91506116a6826115c9565b91506116b28285611226565b91506116bd82611615565b91506116c98284611226565b91506116d482611661565b9150819050949350505050565b7f556e737570706f72746564206f70657261746f72000000000000000000000000600082015250565b6000611717601483610f41565b9150611722826116e1565b602082019050919050565b600060208201905081810360008301526117468161170a565b905091905056fe68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6c6974656e7472792f76632d6a736f6e736368656d612f6d61696e2f646973742f736368656d61732f31322d69646875622d65766d2d76657273696f6e2d6561726c792d626972642f312d302d302e6a736f6e546865207573657220697320616e206561726c7920626972642075736572206f6620746865204964656e746974794875622045564d2076657273696f6e20616e64206861732067656e657261746564206174206c6561737420312063726564656e7469616c20647572696e672032303233204175672031347468207e2041756720323173742ea264697066735822122090cf23f152f2d9cfea04cb86965f7493d24f0fa9625060e087d9cd2566c4d51164736f6c634300080b0033").unwrap(), + hex::decode("608060405234801561001057600080fd5b506118af806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063b4e4c68514610030575b600080fd5b61004a60048036038101906100459190610ec0565b610064565b60405161005b959493929190611116565b60405180910390f35b6060806060806000806040518060c00160405280608681526020016117f460869139905060006040518060400160405280601c81526020017f49444875622045564d2056657273696f6e204561726c7920426972640000000081525090506040518060a001604052806075815260200161177f60759139600090805190602001906100f092919061089c565b506000805b8b51811015610262576101218c828151811061011457610113611185565b5b6020026020010151610426565b1561024e576000806101508e848151811061013f5761013e611185565b5b602002602001015160200151610458565b91509150811561023e578161016657505061024f565b6000816040516020016101799190611288565b604051602081830303815290604052905060006040518060400160405280600a81526020017f2f6861734a6f696e656400000000000000000000000000000000000000000000815250905060008067ffffffffffffffff8111156101e0576101df610983565b5b60405190808252806020026020018201604052801561021957816020015b610206610922565b8152602001906001900390816101fe5790505b50905060008061022a8585856104be565b915091508115610238578098505b50505050505b831561024b575050610262565b50505b5b808061025a906112e3565b9150506100f5565b50600060405180606001604052806040518060400160405280600b81526020017f246861735f6a6f696e65640000000000000000000000000000000000000000008152508152602001600460058111156102bf576102be61132c565b5b81526020016040518060400160405280600481526020017f747275650000000000000000000000000000000000000000000000000000000081525081525090506000600167ffffffffffffffff81111561031c5761031b610983565b5b60405190808252806020026020018201604052801561034f57816020015b606081526020019060019003908161033a5790505b50905061035b82610534565b8160008151811061036f5761036e611185565b5b602002602001018190525084848260008681805461038c9061138a565b80601f01602080910402602001604051908101604052809291908181526020018280546103b89061138a565b80156104055780601f106103da57610100808354040283529160200191610405565b820191906000526020600020905b8154815290600101906020018083116103e857829003601f168201915b50505050509150995099509950995099505050505050939792965093509350565b600061043182610575565b80610441575061044082610589565b5b8061045157506104508261059d565b5b9050919050565b6000606060008360405160200161046f9190611411565b6040516020818303038152906040529050600081519050604051611000818360208601600061041b600019f16104a457600080fd5b805194506040810193506110008101604052505050915091565b60008060008060008787876040516020016104db93929190611539565b6040516020818303038152906040529050600081519050604051604081836020860160006103e9600019f161050f57600080fd5b8051945060208101519350604081016040525083839550955050505050935093915050565b6060816000015161054883602001516105b1565b836040015160405160200161055f939291906116b5565b6040516020818303038152906040529050919050565b600061058282600361086e565b9050919050565b600061059682600461086e565b9050919050565b60006105aa82600561086e565b9050919050565b6060600460058111156105c7576105c661132c565b5b8260058111156105da576105d961132c565b5b141561061d576040518060400160405280600281526020017f3d3d0000000000000000000000000000000000000000000000000000000000008152509050610869565b600060058111156106315761063061132c565b5b8260058111156106445761064361132c565b5b1415610687576040518060400160405280600181526020017f3e000000000000000000000000000000000000000000000000000000000000008152509050610869565b6001600581111561069b5761069a61132c565b5b8260058111156106ae576106ad61132c565b5b14156106f1576040518060400160405280600181526020017f3c000000000000000000000000000000000000000000000000000000000000008152509050610869565b600260058111156107055761070461132c565b5b8260058111156107185761071761132c565b5b141561075b576040518060400160405280600281526020017f3e3d0000000000000000000000000000000000000000000000000000000000008152509050610869565b6003600581111561076f5761076e61132c565b5b8260058111156107825761078161132c565b5b14156107c5576040518060400160405280600281526020017f3c3d0000000000000000000000000000000000000000000000000000000000008152509050610869565b6005808111156107d8576107d761132c565b5b8260058111156107eb576107ea61132c565b5b141561082e576040518060400160405280600281526020017f213d0000000000000000000000000000000000000000000000000000000000008152509050610869565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108609061175e565b60405180910390fd5b919050565b60008163ffffffff16836000015163ffffffff1614156108915760019050610896565b600090505b92915050565b8280546108a89061138a565b90600052602060002090601f0160209004810192826108ca5760008555610911565b82601f106108e357805160ff1916838001178555610911565b82800160010185558215610911579182015b828111156109105782518255916020019190600101906108f5565b5b50905061091e919061093c565b5090565b604051806040016040528060608152602001606081525090565b5b8082111561095557600081600090555060010161093d565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6109bb82610972565b810181811067ffffffffffffffff821117156109da576109d9610983565b5b80604052505050565b60006109ed610959565b90506109f982826109b2565b919050565b600067ffffffffffffffff821115610a1957610a18610983565b5b602082029050602081019050919050565b600080fd5b600080fd5b600080fd5b600063ffffffff82169050919050565b610a5281610a39565b8114610a5d57600080fd5b50565b600081359050610a6f81610a49565b92915050565b600080fd5b600067ffffffffffffffff821115610a9557610a94610983565b5b610a9e82610972565b9050602081019050919050565b82818337600083830152505050565b6000610acd610ac884610a7a565b6109e3565b905082815260208101848484011115610ae957610ae8610a75565b5b610af4848285610aab565b509392505050565b600082601f830112610b1157610b1061096d565b5b8135610b21848260208601610aba565b91505092915050565b600067ffffffffffffffff821115610b4557610b44610983565b5b602082029050602081019050919050565b6000610b69610b6484610b2a565b6109e3565b90508083825260208201905060208402830185811115610b8c57610b8b610a2a565b5b835b81811015610bb55780610ba18882610a60565b845260208401935050602081019050610b8e565b5050509392505050565b600082601f830112610bd457610bd361096d565b5b8135610be4848260208601610b56565b91505092915050565b600060608284031215610c0357610c02610a2f565b5b610c0d60606109e3565b90506000610c1d84828501610a60565b600083015250602082013567ffffffffffffffff811115610c4157610c40610a34565b5b610c4d84828501610afc565b602083015250604082013567ffffffffffffffff811115610c7157610c70610a34565b5b610c7d84828501610bbf565b60408301525092915050565b6000610c9c610c97846109fe565b6109e3565b90508083825260208201905060208402830185811115610cbf57610cbe610a2a565b5b835b81811015610d0657803567ffffffffffffffff811115610ce457610ce361096d565b5b808601610cf18982610bed565b85526020850194505050602081019050610cc1565b5050509392505050565b600082601f830112610d2557610d2461096d565b5b8135610d35848260208601610c89565b91505092915050565b600067ffffffffffffffff821115610d5957610d58610983565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610d8557610d84610983565b5b610d8e82610972565b9050602081019050919050565b6000610dae610da984610d6a565b6109e3565b905082815260208101848484011115610dca57610dc9610a75565b5b610dd5848285610aab565b509392505050565b600082601f830112610df257610df161096d565b5b8135610e02848260208601610d9b565b91505092915050565b6000610e1e610e1984610d3e565b6109e3565b90508083825260208201905060208402830185811115610e4157610e40610a2a565b5b835b81811015610e8857803567ffffffffffffffff811115610e6657610e6561096d565b5b808601610e738982610ddd565b85526020850194505050602081019050610e43565b5050509392505050565b600082601f830112610ea757610ea661096d565b5b8135610eb7848260208601610e0b565b91505092915050565b600080600060608486031215610ed957610ed8610963565b5b600084013567ffffffffffffffff811115610ef757610ef6610968565b5b610f0386828701610d10565b935050602084013567ffffffffffffffff811115610f2457610f23610968565b5b610f3086828701610e92565b925050604084013567ffffffffffffffff811115610f5157610f50610968565b5b610f5d86828701610afc565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610fa1578082015181840152602081019050610f86565b83811115610fb0576000848401525b50505050565b6000610fc182610f67565b610fcb8185610f72565b9350610fdb818560208601610f83565b610fe481610972565b840191505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061103782610f67565b611041818561101b565b9350611051818560208601610f83565b61105a81610972565b840191505092915050565b6000611071838361102c565b905092915050565b6000602082019050919050565b600061109182610fef565b61109b8185610ffa565b9350836020820285016110ad8561100b565b8060005b858110156110e957848403895281516110ca8582611065565b94506110d583611079565b925060208a019950506001810190506110b1565b50829750879550505050505092915050565b60008115159050919050565b611110816110fb565b82525050565b600060a08201905081810360008301526111308188610fb6565b905081810360208301526111448187610fb6565b905081810360408301526111588186611086565b9050818103606083015261116c8185610fb6565b905061117b6080830184611107565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081905092915050565b7f687474703a2f2f6c6f63616c686f73743a31393532372f6576656e74732f646f60008201527f65732d757365722d6a6f696e65642d65766d2d63616d706169676e3f6163636f60208201527f756e743d00000000000000000000000000000000000000000000000000000000604082015250565b60006112416044836111b4565b915061124c826111bf565b604482019050919050565b600061126282610f67565b61126c81856111b4565b935061127c818560208601610f83565b80840191505092915050565b600061129382611234565b915061129f8284611257565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b60006112ee826112d9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611321576113206112aa565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806113a257607f821691505b602082108114156113b6576113b561135b565b5b50919050565b600081519050919050565b600082825260208201905092915050565b60006113e3826113bc565b6113ed81856113c7565b93506113fd818560208601610f83565b61140681610972565b840191505092915050565b6000602082019050818103600083015261142b81846113d8565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000604083016000830151848203600086015261147c828261102c565b91505060208301518482036020860152611496828261102c565b9150508091505092915050565b60006114af838361145f565b905092915050565b6000602082019050919050565b60006114cf82611433565b6114d9818561143e565b9350836020820285016114eb8561144f565b8060005b85811015611527578484038952815161150885826114a3565b9450611513836114b7565b925060208a019950506001810190506114ef565b50829750879550505050505092915050565b600060608201905081810360008301526115538186610fb6565b905081810360208301526115678185610fb6565b9050818103604083015261157b81846114c4565b9050949350505050565b7f7b22737263223a22000000000000000000000000000000000000000000000000600082015250565b60006115bb6008836111b4565b91506115c682611585565b600882019050919050565b7f222c226f70223a22000000000000000000000000000000000000000000000000600082015250565b60006116076008836111b4565b9150611612826115d1565b600882019050919050565b7f222c22647374223a220000000000000000000000000000000000000000000000600082015250565b60006116536009836111b4565b915061165e8261161d565b600982019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b600061169f6002836111b4565b91506116aa82611669565b600282019050919050565b60006116c0826115ae565b91506116cc8286611257565b91506116d7826115fa565b91506116e38285611257565b91506116ee82611646565b91506116fa8284611257565b915061170582611692565b9150819050949350505050565b7f556e737570706f72746564206f70657261746f72000000000000000000000000600082015250565b6000611748601483610f72565b915061175382611712565b602082019050919050565b600060208201905081810360008301526117778161173b565b905091905056fe68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6c6974656e7472792f76632d6a736f6e736368656d612f6d61696e2f646973742f736368656d61732f31322d69646875622d65766d2d76657273696f6e2d6561726c792d626972642f312d302d302e6a736f6e546865207573657220697320616e206561726c7920626972642075736572206f6620746865204964656e746974794875622045564d2076657273696f6e20616e64206861732067656e657261746564206174206c6561737420312063726564656e7469616c20647572696e672032303233204175672031347468207e2041756720323173742ea26469706673582212209af1099598e181e18b4e56f879457e0cda71a0987588796c8d3806a0f349621464736f6c634300080b0033").unwrap(), vec![] ) ); @@ -65,16 +65,15 @@ impl InMemorySmartContractRepo { map.insert( hash(2), ( - hex::decode("608060405234801561001057600080fd5b5061206f806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e256184614610030575b600080fd5b61004a60048036038101906100459190611509565b610064565b60405161005b959493929190611730565b60405180910390f35b6060806060806000806040518060600160405280602e815260200161200c602e9139905060006040518060400160405280601781526020017f5477697474657220466f6c6c6f77657220416d6f756e7400000000000000000081525090506040518060a00160405280606f8152602001611f79606f9139600090805190602001906100f0929190610e96565b506000806000905060005b8b518110156102a2576101278c828151811061011a5761011961179f565b5b60200260200101516105b3565b1561028f5760008c82815181106101415761014061179f565b5b60200260200101516020015160405160200161015d91906118c8565b60405160208183030381529060405290506000600167ffffffffffffffff81111561018b5761018a610fcc565b5b6040519080825280602002602001820160405280156101c457816020015b6101b1610f1c565b8152602001906001900390816101a95790505b50905060405180604001604052806040518060400160405280600d81526020017f617574686f72697a6174696f6e0000000000000000000000000000000000000081525081526020018e6000815181106102215761022061179f565b5b6020026020010151815250816000815181106102405761023f61179f565b5b602002602001018190525060008061027184604051806060016040528060248152602001611fe860249139856105c7565b91509150811561028a5780866102879190611931565b95505b505050505b808061029a906119b7565b9150506100fb565b5060008060008360070b121580156102be575060018360070b13155b156102d05760009150600190506103a5565b60018360070b1380156102e7575060648360070b13155b156102f95760019150606490506103a4565b60648360070b13801561031157506103e88360070b13155b1561032457606491506103e890506103a3565b6103e88360070b13801561033d57506127108360070b13155b15610351576103e8915061271090506103a2565b6127108360070b13801561036b5750620186a08360070b13155b15610380576127109150620186a090506103a1565b620186a08360070b13156103a057620186a09150677fffffffffffffff90505b5b5b5b5b5b6001935060006040518060400160405280601081526020017f24746f74616c5f666f6c6c6f7765727300000000000000000000000000000000815250905060006040518060400160405280600267ffffffffffffffff81111561040b5761040a610fcc565b5b60405190808252806020026020018201604052801561044457816020015b610431610f36565b8152602001906001900390816104295790505b50815260200160011515815250905061046d8160008460006104688960070b61063d565b6106cb565b506104888160018460036104838860070b61063d565b6106cb565b506000600167ffffffffffffffff8111156104a6576104a5610fcc565b5b6040519080825280602002602001820160405280156104d957816020015b60608152602001906001900390816104c45790505b5090506104e5826106fd565b816000815181106104f9576104f861179f565b5b602002602001018190525088888260008a81805461051690611a2f565b80601f016020809104026020016040519081016040528092919081815260200182805461054290611a2f565b801561058f5780601f106105645761010080835404028352916020019161058f565b820191906000526020600020905b81548152906001019060200180831161057257829003601f168201915b505050505091509d509d509d509d509d505050505050505050509295509295909350565b60006105c08260006108cd565b9050919050565b60008060008060008787876040516020016105e493929190611b67565b6040516020818303038152906040529050600081519050604051604081836020860160006103e8600019f161061857600080fd5b8051945060208101519350604081016040525083839550955050505050935093915050565b60606000821261065c5760405180602001604052806000815250610693565b6040518060400160405280600181526020017f2d000000000000000000000000000000000000000000000000000000000000008152505b6106a461069f846108fb565b610917565b6040516020016106b5929190611bb3565b6040516020818303038152906040529050919050565b6106d3610f69565b6106e086868686866109ef565b600186602001901515908115158152505085905095945050505050565b606060006040518060400160405280600181526020017f7b000000000000000000000000000000000000000000000000000000000000008152509050600083600001515111156108a25780836020015161078c576040518060400160405280600681526020017f226f72223a5b00000000000000000000000000000000000000000000000000008152506107c3565b6040518060400160405280600781526020017f22616e64223a5b000000000000000000000000000000000000000000000000008152505b6040516020016107d4929190611bb3565b604051602081830303815290604052905060005b83600001515181101561087e576000811115610821578160405160200161080f9190611c23565b60405160208183030381529060405291505b816108498560000151838151811061083c5761083b61179f565b5b6020026020010151610a45565b60405160200161085a929190611bb3565b60405160208183030381529060405291508080610876906119b7565b9150506107e8565b50806040516020016108909190611c91565b60405160208183030381529060405290505b806040516020016108b39190611cff565b604051602081830303815290604052905080915050919050565b60008163ffffffff16836000015163ffffffff1614156108f057600190506108f5565b600090505b92915050565b60008082121561090e5781600003610910565b815b9050919050565b60606000600161092684610a86565b01905060008167ffffffffffffffff81111561094557610944610fcc565b5b6040519080825280601f01601f1916602001820160405280156109775781602001600182028036833780820191505090505b509050600082602001820190505b6001156109e4578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816109ce576109cd611d21565b5b04945060008514156109df576109e4565b610985565b819350505050919050565b6040518060600160405280848152602001836005811115610a1357610a12611d50565b5b81526020018281525085600001518581518110610a3357610a3261179f565b5b60200260200101819052505050505050565b60608160000151610a598360200151610bd9565b8360400151604051602001610a7093929190611eaf565b6040516020818303038152906040529050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610ae4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381610ada57610ad9611d21565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610b21576d04ee2d6d415b85acef81000000008381610b1757610b16611d21565b5b0492506020810190505b662386f26fc100008310610b5057662386f26fc100008381610b4657610b45611d21565b5b0492506010810190505b6305f5e1008310610b79576305f5e1008381610b6f57610b6e611d21565b5b0492506008810190505b6127108310610b9e576127108381610b9457610b93611d21565b5b0492506004810190505b60648310610bc15760648381610bb757610bb6611d21565b5b0492506002810190505b600a8310610bd0576001810190505b80915050919050565b606060046005811115610bef57610bee611d50565b5b826005811115610c0257610c01611d50565b5b1415610c45576040518060400160405280600281526020017f3d3d0000000000000000000000000000000000000000000000000000000000008152509050610e91565b60006005811115610c5957610c58611d50565b5b826005811115610c6c57610c6b611d50565b5b1415610caf576040518060400160405280600181526020017f3e000000000000000000000000000000000000000000000000000000000000008152509050610e91565b60016005811115610cc357610cc2611d50565b5b826005811115610cd657610cd5611d50565b5b1415610d19576040518060400160405280600181526020017f3c000000000000000000000000000000000000000000000000000000000000008152509050610e91565b60026005811115610d2d57610d2c611d50565b5b826005811115610d4057610d3f611d50565b5b1415610d83576040518060400160405280600281526020017f3e3d0000000000000000000000000000000000000000000000000000000000008152509050610e91565b60036005811115610d9757610d96611d50565b5b826005811115610daa57610da9611d50565b5b1415610ded576040518060400160405280600281526020017f3c3d0000000000000000000000000000000000000000000000000000000000008152509050610e91565b600580811115610e0057610dff611d50565b5b826005811115610e1357610e12611d50565b5b1415610e56576040518060400160405280600281526020017f213d0000000000000000000000000000000000000000000000000000000000008152509050610e91565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8890611f58565b60405180910390fd5b919050565b828054610ea290611a2f565b90600052602060002090601f016020900481019282610ec45760008555610f0b565b82601f10610edd57805160ff1916838001178555610f0b565b82800160010185558215610f0b579182015b82811115610f0a578251825591602001919060010190610eef565b5b509050610f189190610f85565b5090565b604051806040016040528060608152602001606081525090565b60405180606001604052806060815260200160006005811115610f5c57610f5b611d50565b5b8152602001606081525090565b6040518060400160405280606081526020016000151581525090565b5b80821115610f9e576000816000905550600101610f86565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61100482610fbb565b810181811067ffffffffffffffff8211171561102357611022610fcc565b5b80604052505050565b6000611036610fa2565b90506110428282610ffb565b919050565b600067ffffffffffffffff82111561106257611061610fcc565b5b602082029050602081019050919050565b600080fd5b600080fd5b600080fd5b600063ffffffff82169050919050565b61109b81611082565b81146110a657600080fd5b50565b6000813590506110b881611092565b92915050565b600080fd5b600067ffffffffffffffff8211156110de576110dd610fcc565b5b6110e782610fbb565b9050602081019050919050565b82818337600083830152505050565b6000611116611111846110c3565b61102c565b905082815260208101848484011115611132576111316110be565b5b61113d8482856110f4565b509392505050565b600082601f83011261115a57611159610fb6565b5b813561116a848260208601611103565b91505092915050565b600067ffffffffffffffff82111561118e5761118d610fcc565b5b602082029050602081019050919050565b60006111b26111ad84611173565b61102c565b905080838252602082019050602084028301858111156111d5576111d4611073565b5b835b818110156111fe57806111ea88826110a9565b8452602084019350506020810190506111d7565b5050509392505050565b600082601f83011261121d5761121c610fb6565b5b813561122d84826020860161119f565b91505092915050565b60006060828403121561124c5761124b611078565b5b611256606061102c565b90506000611266848285016110a9565b600083015250602082013567ffffffffffffffff81111561128a5761128961107d565b5b61129684828501611145565b602083015250604082013567ffffffffffffffff8111156112ba576112b961107d565b5b6112c684828501611208565b60408301525092915050565b60006112e56112e084611047565b61102c565b9050808382526020820190506020840283018581111561130857611307611073565b5b835b8181101561134f57803567ffffffffffffffff81111561132d5761132c610fb6565b5b80860161133a8982611236565b8552602085019450505060208101905061130a565b5050509392505050565b600082601f83011261136e5761136d610fb6565b5b813561137e8482602086016112d2565b91505092915050565b600067ffffffffffffffff8211156113a2576113a1610fcc565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156113ce576113cd610fcc565b5b6113d782610fbb565b9050602081019050919050565b60006113f76113f2846113b3565b61102c565b905082815260208101848484011115611413576114126110be565b5b61141e8482856110f4565b509392505050565b600082601f83011261143b5761143a610fb6565b5b813561144b8482602086016113e4565b91505092915050565b600061146761146284611387565b61102c565b9050808382526020820190506020840283018581111561148a57611489611073565b5b835b818110156114d157803567ffffffffffffffff8111156114af576114ae610fb6565b5b8086016114bc8982611426565b8552602085019450505060208101905061148c565b5050509392505050565b600082601f8301126114f0576114ef610fb6565b5b8135611500848260208601611454565b91505092915050565b600080604083850312156115205761151f610fac565b5b600083013567ffffffffffffffff81111561153e5761153d610fb1565b5b61154a85828601611359565b925050602083013567ffffffffffffffff81111561156b5761156a610fb1565b5b611577858286016114db565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b838110156115bb5780820151818401526020810190506115a0565b838111156115ca576000848401525b50505050565b60006115db82611581565b6115e5818561158c565b93506115f581856020860161159d565b6115fe81610fbb565b840191505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061165182611581565b61165b8185611635565b935061166b81856020860161159d565b61167481610fbb565b840191505092915050565b600061168b8383611646565b905092915050565b6000602082019050919050565b60006116ab82611609565b6116b58185611614565b9350836020820285016116c785611625565b8060005b8581101561170357848403895281516116e4858261167f565b94506116ef83611693565b925060208a019950506001810190506116cb565b50829750879550505050505092915050565b60008115159050919050565b61172a81611715565b82525050565b600060a082019050818103600083015261174a81886115d0565b9050818103602083015261175e81876115d0565b9050818103604083015261177281866116a0565b9050818103606083015261178681856115d0565b90506117956080830184611721565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081905092915050565b7f687474703a2f2f6c6f63616c686f73743a31393532382f322f75736572732f6260008201527f792f757365726e616d652f000000000000000000000000000000000000000000602082015250565b6000611835602b836117ce565b9150611840826117d9565b602b82019050919050565b600061185682611581565b61186081856117ce565b935061187081856020860161159d565b80840191505092915050565b7f3f757365722e6669656c64733d7075626c69635f6d6574726963730000000000600082015250565b60006118b2601b836117ce565b91506118bd8261187c565b601b82019050919050565b60006118d382611828565b91506118df828461184b565b91506118ea826118a5565b915081905092915050565b60008160070b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061193c826118f5565b9150611947836118f5565b925081677fffffffffffffff0383136000831215161561196a57611969611902565b5b817fffffffffffffffffffffffffffffffffffffffffffffffff80000000000000000383126000831216156119a2576119a1611902565b5b828201905092915050565b6000819050919050565b60006119c2826119ad565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156119f5576119f4611902565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611a4757607f821691505b60208210811415611a5b57611a5a611a00565b5b50919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60006040830160008301518482036000860152611aaa8282611646565b91505060208301518482036020860152611ac48282611646565b9150508091505092915050565b6000611add8383611a8d565b905092915050565b6000602082019050919050565b6000611afd82611a61565b611b078185611a6c565b935083602082028501611b1985611a7d565b8060005b85811015611b555784840389528151611b368582611ad1565b9450611b4183611ae5565b925060208a01995050600181019050611b1d565b50829750879550505050505092915050565b60006060820190508181036000830152611b8181866115d0565b90508181036020830152611b9581856115d0565b90508181036040830152611ba98184611af2565b9050949350505050565b6000611bbf828561184b565b9150611bcb828461184b565b91508190509392505050565b7f2c00000000000000000000000000000000000000000000000000000000000000600082015250565b6000611c0d6001836117ce565b9150611c1882611bd7565b600182019050919050565b6000611c2f828461184b565b9150611c3a82611c00565b915081905092915050565b7f5d00000000000000000000000000000000000000000000000000000000000000600082015250565b6000611c7b6001836117ce565b9150611c8682611c45565b600182019050919050565b6000611c9d828461184b565b9150611ca882611c6e565b915081905092915050565b7f7d00000000000000000000000000000000000000000000000000000000000000600082015250565b6000611ce96001836117ce565b9150611cf482611cb3565b600182019050919050565b6000611d0b828461184b565b9150611d1682611cdc565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f7b22737263223a22000000000000000000000000000000000000000000000000600082015250565b6000611db56008836117ce565b9150611dc082611d7f565b600882019050919050565b7f222c226f70223a22000000000000000000000000000000000000000000000000600082015250565b6000611e016008836117ce565b9150611e0c82611dcb565b600882019050919050565b7f222c22647374223a220000000000000000000000000000000000000000000000600082015250565b6000611e4d6009836117ce565b9150611e5882611e17565b600982019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b6000611e996002836117ce565b9150611ea482611e63565b600282019050919050565b6000611eba82611da8565b9150611ec6828661184b565b9150611ed182611df4565b9150611edd828561184b565b9150611ee882611e40565b9150611ef4828461184b565b9150611eff82611e8c565b9150819050949350505050565b7f556e737570706f72746564206f70657261746f72000000000000000000000000600082015250565b6000611f4260148361158c565b9150611f4d82611f0c565b602082019050919050565b60006020820190508181036000830152611f7181611f35565b905091905056fe68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6c6974656e7472792f76632d6a736f6e736368656d612f6d61696e2f646973742f736368656d61732f362d747769747465722d666f6c6c6f7765722d616d6f756e742f312d302d302e6a736f6e2f646174612f7075626c69635f6d6574726963732f666f6c6c6f776572735f636f756e745468652072616e6765206f662074686520757365722773205477697474657220666f6c6c6f77657220636f756e74a26469706673582212209ff57514694394ff5370932758496dcd286b2307f371c98c7eb1ceeedfc15adb64736f6c634300080b0033").unwrap(), + hex::decode("608060405234801561001057600080fd5b5061215c806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063b4e4c68514610030575b600080fd5b61004a60048036038101906100459190611559565b610064565b60405161005b9594939291906117af565b60405180910390f35b6060806060806000806040518060600160405280602e81526020016120f9602e9139905060006040518060400160405280601781526020017f5477697474657220466f6c6c6f77657220416d6f756e7400000000000000000081525090506040518060a00160405280606f815260200161208a606f9139600090805190602001906100f0929190610ee6565b506000806000905060005b8c518110156101ed576101278d828151811061011a5761011961181e565b5b6020026020010151610505565b156101da5760008d82815181106101415761014061181e565b5b60200260200101516020015160405160200161015d9190611947565b604051602081830303815290604052905060006101948e6000815181106101875761018661181e565b5b6020026020010151610519565b90506000806101bc8460405180606001604052806024815260200161206660249139856105ee565b9150915081156101d55780866101d291906119b0565b95505b505050505b80806101e590611a36565b9150506100fb565b5060008060008360070b12158015610209575060018360070b13155b1561021b5760009150600190506102f0565b60018360070b138015610232575060648360070b13155b156102445760019150606490506102ef565b60648360070b13801561025c57506103e88360070b13155b1561026f57606491506103e890506102ee565b6103e88360070b13801561028857506127108360070b13155b1561029c576103e8915061271090506102ed565b6127108360070b1380156102b65750620186a08360070b13155b156102cb576127109150620186a090506102ec565b620186a08360070b13156102eb57620186a09150677fffffffffffffff90505b5b5b5b5b5b60008260070b1415935060006040518060400160405280601081526020017f24746f74616c5f666f6c6c6f7765727300000000000000000000000000000000815250905060006040518060400160405280600267ffffffffffffffff81111561035c5761035b61101c565b5b60405190808252806020026020018201604052801561039557816020015b610382610f6c565b81526020019060019003908161037a5790505b5081526020016001151581525090506103be8160008460006103b98960070b610664565b6106f2565b506103d98160018460036103d48860070b610664565b6106f2565b506000600167ffffffffffffffff8111156103f7576103f661101c565b5b60405190808252806020026020018201604052801561042a57816020015b60608152602001906001900390816104155790505b50905061043682610724565b8160008151811061044a5761044961181e565b5b602002602001018190525088888260008a81805461046790611aae565b80601f016020809104026020016040519081016040528092919081815260200182805461049390611aae565b80156104e05780601f106104b5576101008083540402835291602001916104e0565b820191906000526020600020905b8154815290600101906020018083116104c357829003601f168201915b505050505091509d509d509d509d509d50505050505050505050939792965093509350565b60006105128260006108f4565b9050919050565b60606000600167ffffffffffffffff8111156105385761053761101c565b5b60405190808252806020026020018201604052801561057157816020015b61055e610f9f565b8152602001906001900390816105565790505b50905060405180604001604052806040518060400160405280600d81526020017f617574686f72697a6174696f6e0000000000000000000000000000000000000081525081526020016105c385610922565b815250816000815181106105da576105d961181e565b5b602002602001018190525080915050919050565b600080600080600087878760405160200161060b93929190611be6565b6040516020818303038152906040529050600081519050604051604081836020860160006103e8600019f161063f57600080fd5b8051945060208101519350604081016040525083839550955050505050935093915050565b60606000821261068357604051806020016040528060008152506106ba565b6040518060400160405280600181526020017f2d000000000000000000000000000000000000000000000000000000000000008152505b6106cb6106c68461094b565b610967565b6040516020016106dc929190611c32565b6040516020818303038152906040529050919050565b6106fa610fb9565b6107078686868686610a3f565b600186602001901515908115158152505085905095945050505050565b606060006040518060400160405280600181526020017f7b000000000000000000000000000000000000000000000000000000000000008152509050600083600001515111156108c9578083602001516107b3576040518060400160405280600681526020017f226f72223a5b00000000000000000000000000000000000000000000000000008152506107ea565b6040518060400160405280600781526020017f22616e64223a5b000000000000000000000000000000000000000000000000008152505b6040516020016107fb929190611c32565b604051602081830303815290604052905060005b8360000151518110156108a557600081111561084857816040516020016108369190611ca2565b60405160208183030381529060405291505b81610870856000015183815181106108635761086261181e565b5b6020026020010151610a95565b604051602001610881929190611c32565b6040516020818303038152906040529150808061089d90611a36565b91505061080f565b50806040516020016108b79190611d10565b60405160208183030381529060405290505b806040516020016108da9190611d7e565b604051602081830303815290604052905080915050919050565b60008163ffffffff16836000015163ffffffff161415610917576001905061091c565b600090505b92915050565b6060816040516020016109359190611dec565b6040516020818303038152906040529050919050565b60008082121561095e5781600003610960565b815b9050919050565b60606000600161097684610ad6565b01905060008167ffffffffffffffff8111156109955761099461101c565b5b6040519080825280601f01601f1916602001820160405280156109c75781602001600182028036833780820191505090505b509050600082602001820190505b600115610a34578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610a1e57610a1d611e0e565b5b0494506000851415610a2f57610a34565b6109d5565b819350505050919050565b6040518060600160405280848152602001836005811115610a6357610a62611e3d565b5b81526020018281525085600001518581518110610a8357610a8261181e565b5b60200260200101819052505050505050565b60608160000151610aa98360200151610c29565b8360400151604051602001610ac093929190611f9c565b6040516020818303038152906040529050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610b34577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381610b2a57610b29611e0e565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610b71576d04ee2d6d415b85acef81000000008381610b6757610b66611e0e565b5b0492506020810190505b662386f26fc100008310610ba057662386f26fc100008381610b9657610b95611e0e565b5b0492506010810190505b6305f5e1008310610bc9576305f5e1008381610bbf57610bbe611e0e565b5b0492506008810190505b6127108310610bee576127108381610be457610be3611e0e565b5b0492506004810190505b60648310610c115760648381610c0757610c06611e0e565b5b0492506002810190505b600a8310610c20576001810190505b80915050919050565b606060046005811115610c3f57610c3e611e3d565b5b826005811115610c5257610c51611e3d565b5b1415610c95576040518060400160405280600281526020017f3d3d0000000000000000000000000000000000000000000000000000000000008152509050610ee1565b60006005811115610ca957610ca8611e3d565b5b826005811115610cbc57610cbb611e3d565b5b1415610cff576040518060400160405280600181526020017f3e000000000000000000000000000000000000000000000000000000000000008152509050610ee1565b60016005811115610d1357610d12611e3d565b5b826005811115610d2657610d25611e3d565b5b1415610d69576040518060400160405280600181526020017f3c000000000000000000000000000000000000000000000000000000000000008152509050610ee1565b60026005811115610d7d57610d7c611e3d565b5b826005811115610d9057610d8f611e3d565b5b1415610dd3576040518060400160405280600281526020017f3e3d0000000000000000000000000000000000000000000000000000000000008152509050610ee1565b60036005811115610de757610de6611e3d565b5b826005811115610dfa57610df9611e3d565b5b1415610e3d576040518060400160405280600281526020017f3c3d0000000000000000000000000000000000000000000000000000000000008152509050610ee1565b600580811115610e5057610e4f611e3d565b5b826005811115610e6357610e62611e3d565b5b1415610ea6576040518060400160405280600281526020017f213d0000000000000000000000000000000000000000000000000000000000008152509050610ee1565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed890612045565b60405180910390fd5b919050565b828054610ef290611aae565b90600052602060002090601f016020900481019282610f145760008555610f5b565b82601f10610f2d57805160ff1916838001178555610f5b565b82800160010185558215610f5b579182015b82811115610f5a578251825591602001919060010190610f3f565b5b509050610f689190610fd5565b5090565b60405180606001604052806060815260200160006005811115610f9257610f91611e3d565b5b8152602001606081525090565b604051806040016040528060608152602001606081525090565b6040518060400160405280606081526020016000151581525090565b5b80821115610fee576000816000905550600101610fd6565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6110548261100b565b810181811067ffffffffffffffff821117156110735761107261101c565b5b80604052505050565b6000611086610ff2565b9050611092828261104b565b919050565b600067ffffffffffffffff8211156110b2576110b161101c565b5b602082029050602081019050919050565b600080fd5b600080fd5b600080fd5b600063ffffffff82169050919050565b6110eb816110d2565b81146110f657600080fd5b50565b600081359050611108816110e2565b92915050565b600080fd5b600067ffffffffffffffff82111561112e5761112d61101c565b5b6111378261100b565b9050602081019050919050565b82818337600083830152505050565b600061116661116184611113565b61107c565b9050828152602081018484840111156111825761118161110e565b5b61118d848285611144565b509392505050565b600082601f8301126111aa576111a9611006565b5b81356111ba848260208601611153565b91505092915050565b600067ffffffffffffffff8211156111de576111dd61101c565b5b602082029050602081019050919050565b60006112026111fd846111c3565b61107c565b90508083825260208201905060208402830185811115611225576112246110c3565b5b835b8181101561124e578061123a88826110f9565b845260208401935050602081019050611227565b5050509392505050565b600082601f83011261126d5761126c611006565b5b813561127d8482602086016111ef565b91505092915050565b60006060828403121561129c5761129b6110c8565b5b6112a6606061107c565b905060006112b6848285016110f9565b600083015250602082013567ffffffffffffffff8111156112da576112d96110cd565b5b6112e684828501611195565b602083015250604082013567ffffffffffffffff81111561130a576113096110cd565b5b61131684828501611258565b60408301525092915050565b600061133561133084611097565b61107c565b90508083825260208201905060208402830185811115611358576113576110c3565b5b835b8181101561139f57803567ffffffffffffffff81111561137d5761137c611006565b5b80860161138a8982611286565b8552602085019450505060208101905061135a565b5050509392505050565b600082601f8301126113be576113bd611006565b5b81356113ce848260208601611322565b91505092915050565b600067ffffffffffffffff8211156113f2576113f161101c565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561141e5761141d61101c565b5b6114278261100b565b9050602081019050919050565b600061144761144284611403565b61107c565b9050828152602081018484840111156114635761146261110e565b5b61146e848285611144565b509392505050565b600082601f83011261148b5761148a611006565b5b813561149b848260208601611434565b91505092915050565b60006114b76114b2846113d7565b61107c565b905080838252602082019050602084028301858111156114da576114d96110c3565b5b835b8181101561152157803567ffffffffffffffff8111156114ff576114fe611006565b5b80860161150c8982611476565b855260208501945050506020810190506114dc565b5050509392505050565b600082601f8301126115405761153f611006565b5b81356115508482602086016114a4565b91505092915050565b60008060006060848603121561157257611571610ffc565b5b600084013567ffffffffffffffff8111156115905761158f611001565b5b61159c868287016113a9565b935050602084013567ffffffffffffffff8111156115bd576115bc611001565b5b6115c98682870161152b565b925050604084013567ffffffffffffffff8111156115ea576115e9611001565b5b6115f686828701611195565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561163a57808201518184015260208101905061161f565b83811115611649576000848401525b50505050565b600061165a82611600565b611664818561160b565b935061167481856020860161161c565b61167d8161100b565b840191505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b60006116d082611600565b6116da81856116b4565b93506116ea81856020860161161c565b6116f38161100b565b840191505092915050565b600061170a83836116c5565b905092915050565b6000602082019050919050565b600061172a82611688565b6117348185611693565b935083602082028501611746856116a4565b8060005b85811015611782578484038952815161176385826116fe565b945061176e83611712565b925060208a0199505060018101905061174a565b50829750879550505050505092915050565b60008115159050919050565b6117a981611794565b82525050565b600060a08201905081810360008301526117c9818861164f565b905081810360208301526117dd818761164f565b905081810360408301526117f1818661171f565b90508181036060830152611805818561164f565b905061181460808301846117a0565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081905092915050565b7f687474703a2f2f6c6f63616c686f73743a31393532382f322f75736572732f6260008201527f792f757365726e616d652f000000000000000000000000000000000000000000602082015250565b60006118b4602b8361184d565b91506118bf82611858565b602b82019050919050565b60006118d582611600565b6118df818561184d565b93506118ef81856020860161161c565b80840191505092915050565b7f3f757365722e6669656c64733d7075626c69635f6d6574726963730000000000600082015250565b6000611931601b8361184d565b915061193c826118fb565b601b82019050919050565b6000611952826118a7565b915061195e82846118ca565b915061196982611924565b915081905092915050565b60008160070b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006119bb82611974565b91506119c683611974565b925081677fffffffffffffff038313600083121516156119e9576119e8611981565b5b817fffffffffffffffffffffffffffffffffffffffffffffffff8000000000000000038312600083121615611a2157611a20611981565b5b828201905092915050565b6000819050919050565b6000611a4182611a2c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611a7457611a73611981565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611ac657607f821691505b60208210811415611ada57611ad9611a7f565b5b50919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60006040830160008301518482036000860152611b2982826116c5565b91505060208301518482036020860152611b4382826116c5565b9150508091505092915050565b6000611b5c8383611b0c565b905092915050565b6000602082019050919050565b6000611b7c82611ae0565b611b868185611aeb565b935083602082028501611b9885611afc565b8060005b85811015611bd45784840389528151611bb58582611b50565b9450611bc083611b64565b925060208a01995050600181019050611b9c565b50829750879550505050505092915050565b60006060820190508181036000830152611c00818661164f565b90508181036020830152611c14818561164f565b90508181036040830152611c288184611b71565b9050949350505050565b6000611c3e82856118ca565b9150611c4a82846118ca565b91508190509392505050565b7f2c00000000000000000000000000000000000000000000000000000000000000600082015250565b6000611c8c60018361184d565b9150611c9782611c56565b600182019050919050565b6000611cae82846118ca565b9150611cb982611c7f565b915081905092915050565b7f5d00000000000000000000000000000000000000000000000000000000000000600082015250565b6000611cfa60018361184d565b9150611d0582611cc4565b600182019050919050565b6000611d1c82846118ca565b9150611d2782611ced565b915081905092915050565b7f7d00000000000000000000000000000000000000000000000000000000000000600082015250565b6000611d6860018361184d565b9150611d7382611d32565b600182019050919050565b6000611d8a82846118ca565b9150611d9582611d5b565b915081905092915050565b7f4265617265722000000000000000000000000000000000000000000000000000600082015250565b6000611dd660078361184d565b9150611de182611da0565b600782019050919050565b6000611df782611dc9565b9150611e0382846118ca565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f7b22737263223a22000000000000000000000000000000000000000000000000600082015250565b6000611ea260088361184d565b9150611ead82611e6c565b600882019050919050565b7f222c226f70223a22000000000000000000000000000000000000000000000000600082015250565b6000611eee60088361184d565b9150611ef982611eb8565b600882019050919050565b7f222c22647374223a220000000000000000000000000000000000000000000000600082015250565b6000611f3a60098361184d565b9150611f4582611f04565b600982019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b6000611f8660028361184d565b9150611f9182611f50565b600282019050919050565b6000611fa782611e95565b9150611fb382866118ca565b9150611fbe82611ee1565b9150611fca82856118ca565b9150611fd582611f2d565b9150611fe182846118ca565b9150611fec82611f79565b9150819050949350505050565b7f556e737570706f72746564206f70657261746f72000000000000000000000000600082015250565b600061202f60148361160b565b915061203a82611ff9565b602082019050919050565b6000602082019050818103600083015261205e81612022565b905091905056fe2f646174612f7075626c69635f6d6574726963732f666f6c6c6f776572735f636f756e7468747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6c6974656e7472792f76632d6a736f6e736368656d612f6d61696e2f646973742f736368656d61732f362d747769747465722d666f6c6c6f7765722d616d6f756e742f312d312d312e6a736f6e5468652072616e6765206f662074686520757365722773205477697474657220666f6c6c6f77657220636f756e74a26469706673582212209832f05c65c90754373a7ae7070900efb626c77ffa1fb60e681557dbbad8fdcd64736f6c634300080b0033").unwrap(), vec!["twitter_api_key".to_string()] ) ); // token holding amount - // ordi map.insert( hash(3), ( - hex::decode("608060405234801561001057600080fd5b50612810806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e256184614610030575b600080fd5b61004a60048036038101906100459190611950565b610064565b60405161005b959493929190611b77565b60405180910390f35b6060806060806000806040518060600160405280603081526020016127ab60309139905060006040518060400160405280601481526020017f546f6b656e20486f6c64696e6720416d6f756e7400000000000000000000000081525090506040518060a00160405280606d815260200161273e606d9139600090805190602001906100f09291906112dd565b5060006100fd8a8a6101e1565b9050600080600061010d846102b9565b925092509250600061011f838361041d565b90506000808511806101315750600086115b905087878360008481805461014590611c15565b80601f016020809104026020016040519081016040528092919081815260200182805461017190611c15565b80156101be5780601f10610193576101008083540402835291602001916101be565b820191906000526020600020905b8154815290600101906020018083116101a157829003601f168201915b505050505091509c509c509c509c509c5050505050505050509295509295909350565b6000806000905060008451905060005b818110156102ad57600086828151811061020e5761020d611c47565b5b602002602001015190506000816040015151905060005b818163ffffffff16101561029757600083604001518263ffffffff168151811061025257610251611c47565b5b60200260200101519050610265816105e9565b156102835761027584828b610602565b876102809190611caf565b96505b50808061028f90611d05565b915050610225565b50505080806102a590611d32565b9150506101f1565b50819250505092915050565b6000806000806102c76107ba565b90506000600182516102d99190611d7b565b90506000806000600190505b84518163ffffffff161015610367576102fc610922565b600a6103089190611eef565b858263ffffffff168151811061032157610320611c47565b5b60200260200101516103339190611f3a565b891015610354576001816103479190611f94565b63ffffffff169350610367565b808061035f90611d05565b9150506102e5565b50600184516103769190611d7b565b8314156103c2578383815181106103905761038f611c47565b5b602002602001015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9050610409565b8383815181106103d5576103d4611c47565b5b60200260200101519150836001846103ed9190611caf565b815181106103fe576103fd611c47565b5b602002602001015190505b828282965096509650505050509193909250565b606060006040518060400160405280600f81526020017f24686f6c64696e675f616d6f756e74000000000000000000000000000000000081525090506000604051806040016040528060008613610475576002610478565b60035b60ff1667ffffffffffffffff81111561049457610493611413565b5b6040519080825280602002602001820160405280156104cd57816020015b6104ba611363565b8152602001906001900390816104b25790505b5081526020016001151581525090506105278160006040518060400160405280600681526020017f24746f6b656e0000000000000000000000000000000000000000000000000000815250600461052261092b565b610968565b5061053f81600184600261053a8a61099a565b610968565b5060008413156105625761056081600284600161055b89610a72565b610968565b505b6000600167ffffffffffffffff81111561057f5761057e611413565b5b6040519080825280602002602001820160405280156105b257816020015b606081526020019060019003908161059d5790505b5090506105be82610b00565b816000815181106105d2576105d1611c47565b5b602002602001018190525080935050505092915050565b6000600963ffffffff168263ffffffff16149050919050565b6000806000610615858760200151610cd0565b9150915081156107ac57600061062961092b565b8260405160200161063b92919061210e565b60405160208183030381529060405290506000600167ffffffffffffffff81111561066957610668611413565b5b6040519080825280602002602001820160405280156106a257816020015b61068f611396565b8152602001906001900390816106875790505b50905060405180604001604052806040518060400160405280600781526020017f6170692d6b6579000000000000000000000000000000000000000000000000008152508152602001876000815181106106ff576106fe611c47565b5b60200260200101518152508160008151811061071e5761071d611c47565b5b602002602001018190525060008061076c846040518060400160405280601e81526020017f2f646174612f6c6973742f302f617661696c61626c655f62616c616e6365000081525085610d39565b9150915081156107a75760008061078a83610785610922565b610db2565b9150915081156107a45780985050505050505050506107b3565b50505b505050505b6000925050505b9392505050565b60606000600867ffffffffffffffff8111156107d9576107d8611413565b5b6040519080825280602002602001820160405280156108075781602001602082028036833780820191505090505b5090506000816000815181106108205761081f611c47565b5b60200260200101818152505060018160018151811061084257610841611c47565b5b60200260200101818152505060058160028151811061086457610863611c47565b5b60200260200101818152505060148160038151811061088657610885611c47565b5b6020026020010181815250506032816004815181106108a8576108a7611c47565b5b6020026020010181815250506064816005815181106108ca576108c9611c47565b5b60200260200101818152505060c8816006815181106108ec576108eb611c47565b5b6020026020010181815250506101f48160078151811061090f5761090e611c47565b5b6020026020010181815250508091505090565b60006012905090565b60606040518060400160405280600481526020017f6f72646900000000000000000000000000000000000000000000000000000000815250905090565b6109706113b0565b61097d8686868686610e1a565b600186602001901515908115158152505085905095945050505050565b6060600060016109a984610e70565b01905060008167ffffffffffffffff8111156109c8576109c7611413565b5b6040519080825280601f01601f1916602001820160405280156109fa5781602001600182028036833780820191505090505b509050600082602001820190505b600115610a67578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610a5157610a50612153565b5b0494506000851415610a6257610a67565b610a08565b819350505050919050565b606060008212610a915760405180602001604052806000815250610ac8565b6040518060400160405280600181526020017f2d000000000000000000000000000000000000000000000000000000000000008152505b610ad9610ad484610fc3565b61099a565b604051602001610aea929190612182565b6040516020818303038152906040529050919050565b606060006040518060400160405280600181526020017f7b00000000000000000000000000000000000000000000000000000000000000815250905060008360000151511115610ca557808360200151610b8f576040518060400160405280600681526020017f226f72223a5b0000000000000000000000000000000000000000000000000000815250610bc6565b6040518060400160405280600781526020017f22616e64223a5b000000000000000000000000000000000000000000000000008152505b604051602001610bd7929190612182565b604051602081830303815290604052905060005b836000015151811015610c81576000811115610c245781604051602001610c1291906121f2565b60405160208183030381529060405291505b81610c4c85600001518381518110610c3f57610c3e611c47565b5b6020026020010151610fdf565b604051602001610c5d929190612182565b60405160208183030381529060405291508080610c7990611d32565b915050610beb565b5080604051602001610c939190612260565b60405160208183030381529060405290505b80604051602001610cb691906122ce565b604051602081830303815290604052905080915050919050565b6000606060008484604051602001610ce9929190612354565b6040516020818303038152906040529050600081519050604051611000818360208601600061041c600019f1610d1e57600080fd5b80945060408101935061100081016040525050509250929050565b60006060600060606000878787604051602001610d589392919061248a565b604051602081830303815290604052905060008151905060405161100081836020860160006103ea600019f1610d8d57600080fd5b8051945060408101935061100081016040525083839550955050505050935093915050565b60008060008484604051602001610dca9291906124e5565b60405160208183030381529060405290506000815190506040516082818360208601600061041e600019f1610dfe57600080fd5b8051945060208101519350608281016040525050509250929050565b6040518060600160405280848152602001836005811115610e3e57610e3d612515565b5b81526020018281525085600001518581518110610e5e57610e5d611c47565b5b60200260200101819052505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610ece577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381610ec457610ec3612153565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610f0b576d04ee2d6d415b85acef81000000008381610f0157610f00612153565b5b0492506020810190505b662386f26fc100008310610f3a57662386f26fc100008381610f3057610f2f612153565b5b0492506010810190505b6305f5e1008310610f63576305f5e1008381610f5957610f58612153565b5b0492506008810190505b6127108310610f88576127108381610f7e57610f7d612153565b5b0492506004810190505b60648310610fab5760648381610fa157610fa0612153565b5b0492506002810190505b600a8310610fba576001810190505b80915050919050565b600080821215610fd65781600003610fd8565b815b9050919050565b60608160000151610ff38360200151611020565b836040015160405160200161100a93929190612674565b6040516020818303038152906040529050919050565b60606004600581111561103657611035612515565b5b82600581111561104957611048612515565b5b141561108c576040518060400160405280600281526020017f3d3d00000000000000000000000000000000000000000000000000000000000081525090506112d8565b600060058111156110a05761109f612515565b5b8260058111156110b3576110b2612515565b5b14156110f6576040518060400160405280600181526020017f3e0000000000000000000000000000000000000000000000000000000000000081525090506112d8565b6001600581111561110a57611109612515565b5b82600581111561111d5761111c612515565b5b1415611160576040518060400160405280600181526020017f3c0000000000000000000000000000000000000000000000000000000000000081525090506112d8565b6002600581111561117457611173612515565b5b82600581111561118757611186612515565b5b14156111ca576040518060400160405280600281526020017f3e3d00000000000000000000000000000000000000000000000000000000000081525090506112d8565b600360058111156111de576111dd612515565b5b8260058111156111f1576111f0612515565b5b1415611234576040518060400160405280600281526020017f3c3d00000000000000000000000000000000000000000000000000000000000081525090506112d8565b60058081111561124757611246612515565b5b82600581111561125a57611259612515565b5b141561129d576040518060400160405280600281526020017f213d00000000000000000000000000000000000000000000000000000000000081525090506112d8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112cf9061271d565b60405180910390fd5b919050565b8280546112e990611c15565b90600052602060002090601f01602090048101928261130b5760008555611352565b82601f1061132457805160ff1916838001178555611352565b82800160010185558215611352579182015b82811115611351578251825591602001919060010190611336565b5b50905061135f91906113cc565b5090565b6040518060600160405280606081526020016000600581111561138957611388612515565b5b8152602001606081525090565b604051806040016040528060608152602001606081525090565b6040518060400160405280606081526020016000151581525090565b5b808211156113e55760008160009055506001016113cd565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61144b82611402565b810181811067ffffffffffffffff8211171561146a57611469611413565b5b80604052505050565b600061147d6113e9565b90506114898282611442565b919050565b600067ffffffffffffffff8211156114a9576114a8611413565b5b602082029050602081019050919050565b600080fd5b600080fd5b600080fd5b600063ffffffff82169050919050565b6114e2816114c9565b81146114ed57600080fd5b50565b6000813590506114ff816114d9565b92915050565b600080fd5b600067ffffffffffffffff82111561152557611524611413565b5b61152e82611402565b9050602081019050919050565b82818337600083830152505050565b600061155d6115588461150a565b611473565b90508281526020810184848401111561157957611578611505565b5b61158484828561153b565b509392505050565b600082601f8301126115a1576115a06113fd565b5b81356115b184826020860161154a565b91505092915050565b600067ffffffffffffffff8211156115d5576115d4611413565b5b602082029050602081019050919050565b60006115f96115f4846115ba565b611473565b9050808382526020820190506020840283018581111561161c5761161b6114ba565b5b835b81811015611645578061163188826114f0565b84526020840193505060208101905061161e565b5050509392505050565b600082601f830112611664576116636113fd565b5b81356116748482602086016115e6565b91505092915050565b600060608284031215611693576116926114bf565b5b61169d6060611473565b905060006116ad848285016114f0565b600083015250602082013567ffffffffffffffff8111156116d1576116d06114c4565b5b6116dd8482850161158c565b602083015250604082013567ffffffffffffffff811115611701576117006114c4565b5b61170d8482850161164f565b60408301525092915050565b600061172c6117278461148e565b611473565b9050808382526020820190506020840283018581111561174f5761174e6114ba565b5b835b8181101561179657803567ffffffffffffffff811115611774576117736113fd565b5b808601611781898261167d565b85526020850194505050602081019050611751565b5050509392505050565b600082601f8301126117b5576117b46113fd565b5b81356117c5848260208601611719565b91505092915050565b600067ffffffffffffffff8211156117e9576117e8611413565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561181557611814611413565b5b61181e82611402565b9050602081019050919050565b600061183e611839846117fa565b611473565b90508281526020810184848401111561185a57611859611505565b5b61186584828561153b565b509392505050565b600082601f830112611882576118816113fd565b5b813561189284826020860161182b565b91505092915050565b60006118ae6118a9846117ce565b611473565b905080838252602082019050602084028301858111156118d1576118d06114ba565b5b835b8181101561191857803567ffffffffffffffff8111156118f6576118f56113fd565b5b808601611903898261186d565b855260208501945050506020810190506118d3565b5050509392505050565b600082601f830112611937576119366113fd565b5b813561194784826020860161189b565b91505092915050565b60008060408385031215611967576119666113f3565b5b600083013567ffffffffffffffff811115611985576119846113f8565b5b611991858286016117a0565b925050602083013567ffffffffffffffff8111156119b2576119b16113f8565b5b6119be85828601611922565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611a025780820151818401526020810190506119e7565b83811115611a11576000848401525b50505050565b6000611a22826119c8565b611a2c81856119d3565b9350611a3c8185602086016119e4565b611a4581611402565b840191505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000611a98826119c8565b611aa28185611a7c565b9350611ab28185602086016119e4565b611abb81611402565b840191505092915050565b6000611ad28383611a8d565b905092915050565b6000602082019050919050565b6000611af282611a50565b611afc8185611a5b565b935083602082028501611b0e85611a6c565b8060005b85811015611b4a5784840389528151611b2b8582611ac6565b9450611b3683611ada565b925060208a01995050600181019050611b12565b50829750879550505050505092915050565b60008115159050919050565b611b7181611b5c565b82525050565b600060a0820190508181036000830152611b918188611a17565b90508181036020830152611ba58187611a17565b90508181036040830152611bb98186611ae7565b90508181036060830152611bcd8185611a17565b9050611bdc6080830184611b68565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611c2d57607f821691505b60208210811415611c4157611c40611be6565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611cba82611c76565b9150611cc583611c76565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611cfa57611cf9611c80565b5b828201905092915050565b6000611d10826114c9565b915063ffffffff821415611d2757611d26611c80565b5b600182019050919050565b6000611d3d82611c76565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611d7057611d6f611c80565b5b600182019050919050565b6000611d8682611c76565b9150611d9183611c76565b925082821015611da457611da3611c80565b5b828203905092915050565b60008160011c9050919050565b6000808291508390505b6001851115611e0657808604811115611de257611de1611c80565b5b6001851615611df15780820291505b8081029050611dff85611daf565b9450611dc6565b94509492505050565b600082611e1f5760019050611edb565b81611e2d5760009050611edb565b8160018114611e435760028114611e4d57611e7c565b6001915050611edb565b60ff841115611e5f57611e5e611c80565b5b8360020a915084821115611e7657611e75611c80565b5b50611edb565b5060208310610133831016604e8410600b8410161715611eb15782820a905083811115611eac57611eab611c80565b5b611edb565b611ebe8484846001611dbc565b92509050818404811115611ed557611ed4611c80565b5b81810290505b9392505050565b600060ff82169050919050565b6000611efa82611c76565b9150611f0583611ee2565b9250611f327fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484611e0f565b905092915050565b6000611f4582611c76565b9150611f5083611c76565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611f8957611f88611c80565b5b828202905092915050565b6000611f9f826114c9565b9150611faa836114c9565b925082821015611fbd57611fbc611c80565b5b828203905092915050565b600081905092915050565b7f687474703a2f2f6c6f63616c686f73743a31393532392f6170692f312f62726360008201527f32302f62616c616e636500000000000000000000000000000000000000000000602082015250565b600061202f602a83611fc8565b915061203a82611fd3565b602a82019050919050565b7f3f7469636b3d0000000000000000000000000000000000000000000000000000600082015250565b600061207b600683611fc8565b915061208682612045565b600682019050919050565b600061209c826119c8565b6120a68185611fc8565b93506120b68185602086016119e4565b80840191505092915050565b7f26616464726573733d0000000000000000000000000000000000000000000000600082015250565b60006120f8600983611fc8565b9150612103826120c2565b600982019050919050565b600061211982612022565b91506121248261206e565b91506121308285612091565b915061213b826120eb565b91506121478284612091565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061218e8285612091565b915061219a8284612091565b91508190509392505050565b7f2c00000000000000000000000000000000000000000000000000000000000000600082015250565b60006121dc600183611fc8565b91506121e7826121a6565b600182019050919050565b60006121fe8284612091565b9150612209826121cf565b915081905092915050565b7f5d00000000000000000000000000000000000000000000000000000000000000600082015250565b600061224a600183611fc8565b915061225582612214565b600182019050919050565b600061226c8284612091565b91506122778261223d565b915081905092915050565b7f7d00000000000000000000000000000000000000000000000000000000000000600082015250565b60006122b8600183611fc8565b91506122c382612282565b600182019050919050565b60006122da8284612091565b91506122e5826122ab565b915081905092915050565b6122f9816114c9565b82525050565b600081519050919050565b600082825260208201905092915050565b6000612326826122ff565b612330818561230a565b93506123408185602086016119e4565b61234981611402565b840191505092915050565b600060408201905061236960008301856122f0565b818103602083015261237b818461231b565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600060408301600083015184820360008601526123cd8282611a8d565b915050602083015184820360208601526123e78282611a8d565b9150508091505092915050565b600061240083836123b0565b905092915050565b6000602082019050919050565b600061242082612384565b61242a818561238f565b93508360208202850161243c856123a0565b8060005b85811015612478578484038952815161245985826123f4565b945061246483612408565b925060208a01995050600181019050612440565b50829750879550505050505092915050565b600060608201905081810360008301526124a48186611a17565b905081810360208301526124b88185611a17565b905081810360408301526124cc8184612415565b9050949350505050565b6124df81611ee2565b82525050565b600060408201905081810360008301526124ff8185611a17565b905061250e60208301846124d6565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f7b22737263223a22000000000000000000000000000000000000000000000000600082015250565b600061257a600883611fc8565b915061258582612544565b600882019050919050565b7f222c226f70223a22000000000000000000000000000000000000000000000000600082015250565b60006125c6600883611fc8565b91506125d182612590565b600882019050919050565b7f222c22647374223a220000000000000000000000000000000000000000000000600082015250565b6000612612600983611fc8565b915061261d826125dc565b600982019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b600061265e600283611fc8565b915061266982612628565b600282019050919050565b600061267f8261256d565b915061268b8286612091565b9150612696826125b9565b91506126a28285612091565b91506126ad82612605565b91506126b98284612091565b91506126c482612651565b9150819050949350505050565b7f556e737570706f72746564206f70657261746f72000000000000000000000000600082015250565b60006127076014836119d3565b9150612712826126d1565b602082019050919050565b60006020820190508181036000830152612736816126fa565b905091905056fe68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6c6974656e7472792f76632d6a736f6e736368656d612f6d61696e2f646973742f736368656d61732f32352d746f6b656e2d686f6c64696e672d616d6f756e742f312d312d302e6a736f6e54686520616d6f756e74206f66206120706172746963756c617220746f6b656e20796f752061726520686f6c64696e67a2646970667358221220916c6f3f8237735f4bd3e8457550bc6079a42c4c3958743e9905dc5401961c4c64736f6c634300080b0033").unwrap(), + hex::decode("608060405234801561001057600080fd5b50612840806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063b4e4c68514610030575b600080fd5b61004a60048036038101906100459190611951565b610064565b60405161005b959493929190611ba7565b60405180910390f35b6060806060806000806040518060600160405280603081526020016127db60309139905060006040518060400160405280601481526020017f546f6b656e20486f6c64696e6720416d6f756e7400000000000000000000000081525090506040518060a00160405280606d815260200161276e606d9139600090805190602001906100f09291906112de565b5060006100fd8b8b6101e2565b9050600080600061010d846102ba565b925092509250600061011f838361041e565b90506000808511806101315750600086115b905087878360008481805461014590611c45565b80601f016020809104026020016040519081016040528092919081815260200182805461017190611c45565b80156101be5780601f10610193576101008083540402835291602001916101be565b820191906000526020600020905b8154815290600101906020018083116101a157829003601f168201915b505050505091509c509c509c509c509c505050505050505050939792965093509350565b6000806000905060008451905060005b818110156102ae57600086828151811061020f5761020e611c77565b5b602002602001015190506000816040015151905060005b818163ffffffff16101561029857600083604001518263ffffffff168151811061025357610252611c77565b5b60200260200101519050610266816105ea565b156102845761027684828b610603565b876102819190611cdf565b96505b50808061029090611d35565b915050610226565b50505080806102a690611d62565b9150506101f2565b50819250505092915050565b6000806000806102c86107bb565b90506000600182516102da9190611dab565b90506000806000600190505b84518163ffffffff161015610368576102fd610923565b600a6103099190611f1f565b858263ffffffff168151811061032257610321611c77565b5b60200260200101516103349190611f6a565b891015610355576001816103489190611fc4565b63ffffffff169350610368565b808061036090611d35565b9150506102e6565b50600184516103779190611dab565b8314156103c35783838151811061039157610390611c77565b5b602002602001015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905061040a565b8383815181106103d6576103d5611c77565b5b60200260200101519150836001846103ee9190611cdf565b815181106103ff576103fe611c77565b5b602002602001015190505b828282965096509650505050509193909250565b606060006040518060400160405280600f81526020017f24686f6c64696e675f616d6f756e74000000000000000000000000000000000081525090506000604051806040016040528060008613610476576002610479565b60035b60ff1667ffffffffffffffff81111561049557610494611414565b5b6040519080825280602002602001820160405280156104ce57816020015b6104bb611364565b8152602001906001900390816104b35790505b5081526020016001151581525090506105288160006040518060400160405280600681526020017f24746f6b656e0000000000000000000000000000000000000000000000000000815250600461052361092c565b610969565b5061054081600184600261053b8a61099b565b610969565b5060008413156105635761056181600284600161055c89610a73565b610969565b505b6000600167ffffffffffffffff8111156105805761057f611414565b5b6040519080825280602002602001820160405280156105b357816020015b606081526020019060019003908161059e5790505b5090506105bf82610b01565b816000815181106105d3576105d2611c77565b5b602002602001018190525080935050505092915050565b6000600963ffffffff168263ffffffff16149050919050565b6000806000610616858760200151610cd1565b9150915081156107ad57600061062a61092c565b8260405160200161063c92919061213e565b60405160208183030381529060405290506000600167ffffffffffffffff81111561066a57610669611414565b5b6040519080825280602002602001820160405280156106a357816020015b610690611397565b8152602001906001900390816106885790505b50905060405180604001604052806040518060400160405280600781526020017f6170692d6b657900000000000000000000000000000000000000000000000000815250815260200187600081518110610700576106ff611c77565b5b60200260200101518152508160008151811061071f5761071e611c77565b5b602002602001018190525060008061076d846040518060400160405280601e81526020017f2f646174612f6c6973742f302f617661696c61626c655f62616c616e6365000081525085610d3a565b9150915081156107a85760008061078b83610786610923565b610db3565b9150915081156107a55780985050505050505050506107b4565b50505b505050505b6000925050505b9392505050565b60606000600867ffffffffffffffff8111156107da576107d9611414565b5b6040519080825280602002602001820160405280156108085781602001602082028036833780820191505090505b50905060008160008151811061082157610820611c77565b5b60200260200101818152505060018160018151811061084357610842611c77565b5b60200260200101818152505060058160028151811061086557610864611c77565b5b60200260200101818152505060148160038151811061088757610886611c77565b5b6020026020010181815250506032816004815181106108a9576108a8611c77565b5b6020026020010181815250506064816005815181106108cb576108ca611c77565b5b60200260200101818152505060c8816006815181106108ed576108ec611c77565b5b6020026020010181815250506101f4816007815181106109105761090f611c77565b5b6020026020010181815250508091505090565b60006012905090565b60606040518060400160405280600481526020017f6f72646900000000000000000000000000000000000000000000000000000000815250905090565b6109716113b1565b61097e8686868686610e1b565b600186602001901515908115158152505085905095945050505050565b6060600060016109aa84610e71565b01905060008167ffffffffffffffff8111156109c9576109c8611414565b5b6040519080825280601f01601f1916602001820160405280156109fb5781602001600182028036833780820191505090505b509050600082602001820190505b600115610a68578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610a5257610a51612183565b5b0494506000851415610a6357610a68565b610a09565b819350505050919050565b606060008212610a925760405180602001604052806000815250610ac9565b6040518060400160405280600181526020017f2d000000000000000000000000000000000000000000000000000000000000008152505b610ada610ad584610fc4565b61099b565b604051602001610aeb9291906121b2565b6040516020818303038152906040529050919050565b606060006040518060400160405280600181526020017f7b00000000000000000000000000000000000000000000000000000000000000815250905060008360000151511115610ca657808360200151610b90576040518060400160405280600681526020017f226f72223a5b0000000000000000000000000000000000000000000000000000815250610bc7565b6040518060400160405280600781526020017f22616e64223a5b000000000000000000000000000000000000000000000000008152505b604051602001610bd89291906121b2565b604051602081830303815290604052905060005b836000015151811015610c82576000811115610c255781604051602001610c139190612222565b60405160208183030381529060405291505b81610c4d85600001518381518110610c4057610c3f611c77565b5b6020026020010151610fe0565b604051602001610c5e9291906121b2565b60405160208183030381529060405291508080610c7a90611d62565b915050610bec565b5080604051602001610c949190612290565b60405160208183030381529060405290505b80604051602001610cb791906122fe565b604051602081830303815290604052905080915050919050565b6000606060008484604051602001610cea929190612384565b6040516020818303038152906040529050600081519050604051611000818360208601600061041c600019f1610d1f57600080fd5b80945060408101935061100081016040525050509250929050565b60006060600060606000878787604051602001610d59939291906124ba565b604051602081830303815290604052905060008151905060405161100081836020860160006103ea600019f1610d8e57600080fd5b8051945060408101935061100081016040525083839550955050505050935093915050565b60008060008484604051602001610dcb929190612515565b60405160208183030381529060405290506000815190506040516082818360208601600061041e600019f1610dff57600080fd5b8051945060208101519350608281016040525050509250929050565b6040518060600160405280848152602001836005811115610e3f57610e3e612545565b5b81526020018281525085600001518581518110610e5f57610e5e611c77565b5b60200260200101819052505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610ecf577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381610ec557610ec4612183565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610f0c576d04ee2d6d415b85acef81000000008381610f0257610f01612183565b5b0492506020810190505b662386f26fc100008310610f3b57662386f26fc100008381610f3157610f30612183565b5b0492506010810190505b6305f5e1008310610f64576305f5e1008381610f5a57610f59612183565b5b0492506008810190505b6127108310610f89576127108381610f7f57610f7e612183565b5b0492506004810190505b60648310610fac5760648381610fa257610fa1612183565b5b0492506002810190505b600a8310610fbb576001810190505b80915050919050565b600080821215610fd75781600003610fd9565b815b9050919050565b60608160000151610ff48360200151611021565b836040015160405160200161100b939291906126a4565b6040516020818303038152906040529050919050565b60606004600581111561103757611036612545565b5b82600581111561104a57611049612545565b5b141561108d576040518060400160405280600281526020017f3d3d00000000000000000000000000000000000000000000000000000000000081525090506112d9565b600060058111156110a1576110a0612545565b5b8260058111156110b4576110b3612545565b5b14156110f7576040518060400160405280600181526020017f3e0000000000000000000000000000000000000000000000000000000000000081525090506112d9565b6001600581111561110b5761110a612545565b5b82600581111561111e5761111d612545565b5b1415611161576040518060400160405280600181526020017f3c0000000000000000000000000000000000000000000000000000000000000081525090506112d9565b6002600581111561117557611174612545565b5b82600581111561118857611187612545565b5b14156111cb576040518060400160405280600281526020017f3e3d00000000000000000000000000000000000000000000000000000000000081525090506112d9565b600360058111156111df576111de612545565b5b8260058111156111f2576111f1612545565b5b1415611235576040518060400160405280600281526020017f3c3d00000000000000000000000000000000000000000000000000000000000081525090506112d9565b60058081111561124857611247612545565b5b82600581111561125b5761125a612545565b5b141561129e576040518060400160405280600281526020017f213d00000000000000000000000000000000000000000000000000000000000081525090506112d9565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d09061274d565b60405180910390fd5b919050565b8280546112ea90611c45565b90600052602060002090601f01602090048101928261130c5760008555611353565b82601f1061132557805160ff1916838001178555611353565b82800160010185558215611353579182015b82811115611352578251825591602001919060010190611337565b5b50905061136091906113cd565b5090565b6040518060600160405280606081526020016000600581111561138a57611389612545565b5b8152602001606081525090565b604051806040016040528060608152602001606081525090565b6040518060400160405280606081526020016000151581525090565b5b808211156113e65760008160009055506001016113ce565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61144c82611403565b810181811067ffffffffffffffff8211171561146b5761146a611414565b5b80604052505050565b600061147e6113ea565b905061148a8282611443565b919050565b600067ffffffffffffffff8211156114aa576114a9611414565b5b602082029050602081019050919050565b600080fd5b600080fd5b600080fd5b600063ffffffff82169050919050565b6114e3816114ca565b81146114ee57600080fd5b50565b600081359050611500816114da565b92915050565b600080fd5b600067ffffffffffffffff82111561152657611525611414565b5b61152f82611403565b9050602081019050919050565b82818337600083830152505050565b600061155e6115598461150b565b611474565b90508281526020810184848401111561157a57611579611506565b5b61158584828561153c565b509392505050565b600082601f8301126115a2576115a16113fe565b5b81356115b284826020860161154b565b91505092915050565b600067ffffffffffffffff8211156115d6576115d5611414565b5b602082029050602081019050919050565b60006115fa6115f5846115bb565b611474565b9050808382526020820190506020840283018581111561161d5761161c6114bb565b5b835b81811015611646578061163288826114f1565b84526020840193505060208101905061161f565b5050509392505050565b600082601f830112611665576116646113fe565b5b81356116758482602086016115e7565b91505092915050565b600060608284031215611694576116936114c0565b5b61169e6060611474565b905060006116ae848285016114f1565b600083015250602082013567ffffffffffffffff8111156116d2576116d16114c5565b5b6116de8482850161158d565b602083015250604082013567ffffffffffffffff811115611702576117016114c5565b5b61170e84828501611650565b60408301525092915050565b600061172d6117288461148f565b611474565b905080838252602082019050602084028301858111156117505761174f6114bb565b5b835b8181101561179757803567ffffffffffffffff811115611775576117746113fe565b5b808601611782898261167e565b85526020850194505050602081019050611752565b5050509392505050565b600082601f8301126117b6576117b56113fe565b5b81356117c684826020860161171a565b91505092915050565b600067ffffffffffffffff8211156117ea576117e9611414565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561181657611815611414565b5b61181f82611403565b9050602081019050919050565b600061183f61183a846117fb565b611474565b90508281526020810184848401111561185b5761185a611506565b5b61186684828561153c565b509392505050565b600082601f830112611883576118826113fe565b5b813561189384826020860161182c565b91505092915050565b60006118af6118aa846117cf565b611474565b905080838252602082019050602084028301858111156118d2576118d16114bb565b5b835b8181101561191957803567ffffffffffffffff8111156118f7576118f66113fe565b5b808601611904898261186e565b855260208501945050506020810190506118d4565b5050509392505050565b600082601f830112611938576119376113fe565b5b813561194884826020860161189c565b91505092915050565b60008060006060848603121561196a576119696113f4565b5b600084013567ffffffffffffffff811115611988576119876113f9565b5b611994868287016117a1565b935050602084013567ffffffffffffffff8111156119b5576119b46113f9565b5b6119c186828701611923565b925050604084013567ffffffffffffffff8111156119e2576119e16113f9565b5b6119ee8682870161158d565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015611a32578082015181840152602081019050611a17565b83811115611a41576000848401525b50505050565b6000611a52826119f8565b611a5c8185611a03565b9350611a6c818560208601611a14565b611a7581611403565b840191505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000611ac8826119f8565b611ad28185611aac565b9350611ae2818560208601611a14565b611aeb81611403565b840191505092915050565b6000611b028383611abd565b905092915050565b6000602082019050919050565b6000611b2282611a80565b611b2c8185611a8b565b935083602082028501611b3e85611a9c565b8060005b85811015611b7a5784840389528151611b5b8582611af6565b9450611b6683611b0a565b925060208a01995050600181019050611b42565b50829750879550505050505092915050565b60008115159050919050565b611ba181611b8c565b82525050565b600060a0820190508181036000830152611bc18188611a47565b90508181036020830152611bd58187611a47565b90508181036040830152611be98186611b17565b90508181036060830152611bfd8185611a47565b9050611c0c6080830184611b98565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611c5d57607f821691505b60208210811415611c7157611c70611c16565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611cea82611ca6565b9150611cf583611ca6565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611d2a57611d29611cb0565b5b828201905092915050565b6000611d40826114ca565b915063ffffffff821415611d5757611d56611cb0565b5b600182019050919050565b6000611d6d82611ca6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611da057611d9f611cb0565b5b600182019050919050565b6000611db682611ca6565b9150611dc183611ca6565b925082821015611dd457611dd3611cb0565b5b828203905092915050565b60008160011c9050919050565b6000808291508390505b6001851115611e3657808604811115611e1257611e11611cb0565b5b6001851615611e215780820291505b8081029050611e2f85611ddf565b9450611df6565b94509492505050565b600082611e4f5760019050611f0b565b81611e5d5760009050611f0b565b8160018114611e735760028114611e7d57611eac565b6001915050611f0b565b60ff841115611e8f57611e8e611cb0565b5b8360020a915084821115611ea657611ea5611cb0565b5b50611f0b565b5060208310610133831016604e8410600b8410161715611ee15782820a905083811115611edc57611edb611cb0565b5b611f0b565b611eee8484846001611dec565b92509050818404811115611f0557611f04611cb0565b5b81810290505b9392505050565b600060ff82169050919050565b6000611f2a82611ca6565b9150611f3583611f12565b9250611f627fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484611e3f565b905092915050565b6000611f7582611ca6565b9150611f8083611ca6565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611fb957611fb8611cb0565b5b828202905092915050565b6000611fcf826114ca565b9150611fda836114ca565b925082821015611fed57611fec611cb0565b5b828203905092915050565b600081905092915050565b7f687474703a2f2f6c6f63616c686f73743a31393532392f6170692f312f62726360008201527f32302f62616c616e636500000000000000000000000000000000000000000000602082015250565b600061205f602a83611ff8565b915061206a82612003565b602a82019050919050565b7f3f7469636b3d0000000000000000000000000000000000000000000000000000600082015250565b60006120ab600683611ff8565b91506120b682612075565b600682019050919050565b60006120cc826119f8565b6120d68185611ff8565b93506120e6818560208601611a14565b80840191505092915050565b7f26616464726573733d0000000000000000000000000000000000000000000000600082015250565b6000612128600983611ff8565b9150612133826120f2565b600982019050919050565b600061214982612052565b91506121548261209e565b915061216082856120c1565b915061216b8261211b565b915061217782846120c1565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006121be82856120c1565b91506121ca82846120c1565b91508190509392505050565b7f2c00000000000000000000000000000000000000000000000000000000000000600082015250565b600061220c600183611ff8565b9150612217826121d6565b600182019050919050565b600061222e82846120c1565b9150612239826121ff565b915081905092915050565b7f5d00000000000000000000000000000000000000000000000000000000000000600082015250565b600061227a600183611ff8565b915061228582612244565b600182019050919050565b600061229c82846120c1565b91506122a78261226d565b915081905092915050565b7f7d00000000000000000000000000000000000000000000000000000000000000600082015250565b60006122e8600183611ff8565b91506122f3826122b2565b600182019050919050565b600061230a82846120c1565b9150612315826122db565b915081905092915050565b612329816114ca565b82525050565b600081519050919050565b600082825260208201905092915050565b60006123568261232f565b612360818561233a565b9350612370818560208601611a14565b61237981611403565b840191505092915050565b60006040820190506123996000830185612320565b81810360208301526123ab818461234b565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600060408301600083015184820360008601526123fd8282611abd565b915050602083015184820360208601526124178282611abd565b9150508091505092915050565b600061243083836123e0565b905092915050565b6000602082019050919050565b6000612450826123b4565b61245a81856123bf565b93508360208202850161246c856123d0565b8060005b858110156124a857848403895281516124898582612424565b945061249483612438565b925060208a01995050600181019050612470565b50829750879550505050505092915050565b600060608201905081810360008301526124d48186611a47565b905081810360208301526124e88185611a47565b905081810360408301526124fc8184612445565b9050949350505050565b61250f81611f12565b82525050565b6000604082019050818103600083015261252f8185611a47565b905061253e6020830184612506565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f7b22737263223a22000000000000000000000000000000000000000000000000600082015250565b60006125aa600883611ff8565b91506125b582612574565b600882019050919050565b7f222c226f70223a22000000000000000000000000000000000000000000000000600082015250565b60006125f6600883611ff8565b9150612601826125c0565b600882019050919050565b7f222c22647374223a220000000000000000000000000000000000000000000000600082015250565b6000612642600983611ff8565b915061264d8261260c565b600982019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b600061268e600283611ff8565b915061269982612658565b600282019050919050565b60006126af8261259d565b91506126bb82866120c1565b91506126c6826125e9565b91506126d282856120c1565b91506126dd82612635565b91506126e982846120c1565b91506126f482612681565b9150819050949350505050565b7f556e737570706f72746564206f70657261746f72000000000000000000000000600082015250565b6000612737601483611a03565b915061274282612701565b602082019050919050565b600060208201905081810360008301526127668161272a565b905091905056fe68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6c6974656e7472792f76632d6a736f6e736368656d612f6d61696e2f646973742f736368656d61732f32352d746f6b656e2d686f6c64696e672d616d6f756e742f312d312d302e6a736f6e54686520616d6f756e74206f66206120706172746963756c617220746f6b656e20796f752061726520686f6c64696e67a26469706673582212208912a01f10c4fd5b37c2f5b41c01229b784d1e17b0ff05da1d0f15b20e1c75ab64736f6c634300080b0033").unwrap(), vec!["geniidata_api_key".to_string()] ) ); diff --git a/tee-worker/litentry/core/assertion-build/src/lib.rs b/tee-worker/litentry/core/assertion-build/src/lib.rs index 30137b86d6..ed92ef992a 100644 --- a/tee-worker/litentry/core/assertion-build/src/lib.rs +++ b/tee-worker/litentry/core/assertion-build/src/lib.rs @@ -63,9 +63,9 @@ use litentry_primitives::{ p2pkh_address, p2sh_address, p2tr_address, p2wpkh_address, AchainableAmount, AchainableAmountHolding, AchainableAmountToken, AchainableAmounts, AchainableBasic, AchainableBetweenPercents, AchainableDate, AchainableDateInterval, AchainableDatePercent, - AchainableParams, AchainableToken, Assertion, ErrorDetail, ErrorString, Identity, - IdentityNetworkTuple, IntoErrorDetail, OneBlockCourseType, ParameterString, VCMPError as Error, - Web3Network, + AchainableParams, AchainableToken, Assertion, DynamicParams, ErrorDetail, ErrorString, + Identity, IdentityNetworkTuple, IntoErrorDetail, OneBlockCourseType, ParameterString, + VCMPError as Error, Web3Network, }; use log::*; use rust_base58::ToBase58; diff --git a/tee-worker/litentry/core/credentials/src/credential_schema.rs b/tee-worker/litentry/core/credentials/src/credential_schema.rs index b8597702e6..0467414f25 100644 --- a/tee-worker/litentry/core/credentials/src/credential_schema.rs +++ b/tee-worker/litentry/core/credentials/src/credential_schema.rs @@ -114,6 +114,6 @@ pub fn get_schema_url(assertion: &Assertion) -> Option { Assertion::TokenHoldingAmount(_) => Some(format!("{BASE_URL}/25-token-holding-amount/1-1-2.json")), - Assertion::Dynamic(_) => None, + Assertion::Dynamic(..) => None, } } diff --git a/tee-worker/litentry/core/dynamic-assertion/src/lib.rs b/tee-worker/litentry/core/dynamic-assertion/src/lib.rs index be883b5421..51726f4c99 100644 --- a/tee-worker/litentry/core/dynamic-assertion/src/lib.rs +++ b/tee-worker/litentry/core/dynamic-assertion/src/lib.rs @@ -43,10 +43,11 @@ pub struct AssertionResult { pub meet: bool, } -pub trait AssertionExecutor { +pub trait AssertionExecutor { fn execute( &self, assertion_id: I, + assertion_params: P, identities: &[IdentityNetworkTuple], ) -> Result; } diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/lib.rs b/tee-worker/litentry/core/evm-dynamic-assertions/src/lib.rs index cd9975f81a..cad2103af5 100644 --- a/tee-worker/litentry/core/evm-dynamic-assertions/src/lib.rs +++ b/tee-worker/litentry/core/evm-dynamic-assertions/src/lib.rs @@ -65,6 +65,7 @@ pub mod mock; pub use itp_settings::files::ASSERTIONS_FILE; pub type AssertionId = H160; +pub type AssertionParams = Vec; pub type SmartContractByteCode = Vec; pub type AssertionRepositoryItem = (SmartContractByteCode, Vec); @@ -96,11 +97,12 @@ pub fn execute_smart_contract(byte_code: Vec, input_data: Vec) -> (ExitR } impl> - AssertionExecutor for EvmAssertionExecutor + AssertionExecutor for EvmAssertionExecutor { fn execute( &self, assertion_id: A::Id, + assertion_params: AssertionParams, identities: &[IdentityNetworkTuple], ) -> Result { let (smart_contract_byte_code, secrets) = self @@ -108,7 +110,7 @@ impl> .get(&assertion_id) .map_err(|_| "Could not access assertion repository")? .ok_or("Assertion not found")?; - let input = prepare_execute_call_input(identities, secrets) + let input = prepare_execute_call_input(identities, secrets, assertion_params) .map_err(|_| "Could not prepare evm execution input")?; let call_result = execute_smart_contract(smart_contract_byte_code, input); @@ -151,13 +153,15 @@ fn prepare_memory() -> MemoryVicinity { fn prepare_execute_call_input( identities: &[IdentityNetworkTuple], secrets: Vec, + params: Vec, ) -> Result, ()> { let identities: Vec = identities.iter().map(identity_with_networks_to_token).collect(); let secrets: Vec = secrets.iter().map(secret_to_token).collect(); - let input = encode(&[Token::Array(identities), Token::Array(secrets)]); + let input = encode(&[Token::Array(identities), Token::Array(secrets), Token::Bytes(params)]); // hash of function to be called, all assertions contracts must have a function with this hash, signature: - // function execute(Identity[] memory identities, string[] memory secrets) - let function_hash = "e2561846"; + // function execute(Identity[] memory identities, string[] memory secrets, bytes memory params) + // use this string to generate function hash: execute((uint32,bytes,uint32[])[],string[],bytes) + let function_hash = "b4e4c685"; prepare_function_call_input(function_hash, input) } diff --git a/tee-worker/litentry/core/stf-task/receiver/src/handler/assertion.rs b/tee-worker/litentry/core/stf-task/receiver/src/handler/assertion.rs index 62a12af19c..62de17595b 100644 --- a/tee-worker/litentry/core/stf-task/receiver/src/handler/assertion.rs +++ b/tee-worker/litentry/core/stf-task/receiver/src/handler/assertion.rs @@ -276,11 +276,13 @@ where Assertion::NftHolder(nft_type) => lc_assertion_build_v2::nft_holder::build(req, nft_type, &context.data_provider_config), - Assertion::Dynamic(smart_contract_id) => lc_assertion_build::dynamic::build( - req, - smart_contract_id, - context.assertion_repository.clone(), - ), + Assertion::Dynamic(smart_contract_id, smart_contract_params) => + lc_assertion_build::dynamic::build( + req, + smart_contract_id, + smart_contract_params, + context.assertion_repository.clone(), + ), }?; // post-process the credential diff --git a/tee-worker/litentry/primitives/src/lib.rs b/tee-worker/litentry/primitives/src/lib.rs index 5826b4ec66..f49683cc68 100644 --- a/tee-worker/litentry/primitives/src/lib.rs +++ b/tee-worker/litentry/primitives/src/lib.rs @@ -72,10 +72,10 @@ pub use parentchain_primitives::{ }, identity::*, AccountId as ParentchainAccountId, Balance as ParentchainBalance, - BlockNumber as ParentchainBlockNumber, ErrorDetail, ErrorString, Hash as ParentchainHash, - Header as ParentchainHeader, IMPError, Index as ParentchainIndex, IntoErrorDetail, - ParameterString, SchemaContentString, SchemaIdString, Signature as ParentchainSignature, - VCMPError, MINUTES, + BlockNumber as ParentchainBlockNumber, DynamicParams, ErrorDetail, ErrorString, + Hash as ParentchainHash, Header as ParentchainHeader, IMPError, Index as ParentchainIndex, + IntoErrorDetail, ParameterString, SchemaContentString, SchemaIdString, + Signature as ParentchainSignature, VCMPError, MINUTES, }; use scale_info::TypeInfo; use sp_core::{ecdsa, ed25519, sr25519, ByteArray}; diff --git a/tee-worker/service/src/prometheus_metrics.rs b/tee-worker/service/src/prometheus_metrics.rs index 76d325d664..cace3fbbcf 100644 --- a/tee-worker/service/src/prometheus_metrics.rs +++ b/tee-worker/service/src/prometheus_metrics.rs @@ -317,7 +317,7 @@ fn assertion_to_string(assertion: Assertion) -> String { Assertion::TokenHoldingAmount(_) => "TokenHoldingAmount".into(), Assertion::PlatformUser(_) => "PlatformUser".into(), Assertion::NftHolder(_) => "NftHolder".into(), - Assertion::Dynamic(id) => { + Assertion::Dynamic(id, _) => { format!("DynamicAssertion({:?})", id) }, };