pub fn store_request(&mut self, sender: AccountId, payment: U128, spec_id: Base64String, callback_address: AccountId, callback_method: String, nonce: U128, data_version: U128, data: Base64String) {
        // this method should only ever be called from this contract
        self._only_owner_predecessor();

        // TODO: fix this "if" workaround until I can figure out how to write tests with promises
        if cfg!(target_arch = "wasm32") {
            assert_eq!(env::promise_results_count(), 1);
            // ensure successful promise, meaning tokens are transferred
            match env::promise_result(0) {
                PromiseResult::Successful(_) => {},
                PromiseResult::Failed => env::panic(b"The promise failed. See receipt failures."),
                PromiseResult::NotReady => env::panic(b"The promise was not ready."),
            };
        }

        // cast arguments in order to be formatted
        let payment_u128: u128 = payment.into();
        let nonce_u128: u128 = nonce.into();
        let expiration: u64 = env::block_timestamp() + EXPIRY_TIME;

        // store request
        let oracle_request = OracleRequest {
            caller_account: sender.clone(),
            request_spec: spec_id,
            callback_address,
            callback_method,
            data,
            payment: payment_u128,
            expiration,
        };

        // Insert request and commitment into state.
        /*
          account =>
            nonce => { Request }
        */
        let nonce_request_entry = self.requests.get(&sender);
        let mut nonce_request = if nonce_request_entry.is_none() {
            TreeMap::new(sender.clone().into_bytes())
        } else {
            nonce_request_entry.unwrap()
        };
        nonce_request.insert(&nonce_u128, &oracle_request);
        self.requests.insert(&sender.clone(), &nonce_request);
        self.nonces.insert(&sender.clone(), &nonce.clone());
        env::log(format!("Inserted request with\nKey: {:?}\nValue: {:?}", nonce_u128.clone(), oracle_request.clone()).as_bytes());
    }
// for data_version, which is also not used in Solidity as I understand
for data_version, which is also not used in Solidity as I understand
for data_version which is also not used in Solidity as I understand
pub fn store_request(&mut self, sender: AccountId, payment: U128, spec_id: Base64String, callback_address: AccountId, callback_method: String, nonce: U128, data_version: U128, data: Base64String) {
        // this method should only ever be called from this contract
        self._only_owner_predecessor();
        // TODO: fix this "if" workaround until I can figure out how to write tests with promises
        if cfg!(target_arch = "wasm32") {
            assert_eq!(env::promise_results_count(), 1);
            // ensure successful promise, meaning tokens are transferred
            match env::promise_result(0) {
                PromiseResult::Successful(_) => {},
                PromiseResult::Failed => env::panic(b"The promise failed. See receipt failures."),
                PromiseResult::NotReady => env::panic(b"The promise was not ready."),
            };
        }
        // cast arguments in order to be formatted
        let payment_u128: u128 = payment.into();
        let nonce_u128: u128 = nonce.into();
        let expiration: u64 = env::block_timestamp() + EXPIRY_TIME;
        // store request
        let oracle_request = OracleRequest {
            caller_account: sender.clone(),
            request_spec: spec_id,
            callback_address,
            callback_method,
            data,
            payment: payment_u128,
            expiration,
        };
        // Insert request and commitment into state.
        /*
          account =>
            nonce => { Request }
        */
        let nonce_request_entry = self.requests.get(&sender);
        let mut nonce_request = if nonce_request_entry.is_none() {
            TreeMap::new(sender.clone().into_bytes())
        } else {
            nonce_request_entry.unwrap()
        };
        nonce_request.insert(&nonce_u128, &oracle_request);
        self.requests.insert(&sender.clone(), &nonce_request);
        self.nonces.insert(&sender.clone(), &nonce.clone());
        env::log(format!("Inserted request with\nKey: {:?}\nValue: {:?}", nonce_u128.clone(), oracle_request.clone()).as_bytes());
    }
pub fn store_request ( & mut self , sender : AccountId , payment : U128 , spec_id : Base64String , callback_address : AccountId , callback_method : String , nonce : U128 , data_version : U128 , data : Base64String ) { // this method should only ever be called from this contract self . _only_owner_predecessor ( ) ; // TODO: fix this "if" workaround until I can figure out how to write tests with promises if cfg ! ( target_arch " " ) { assert_eq ! ( env promise_results_count ( ) 1 ) ; // ensure successful promise, meaning tokens are transferred match env :: promise_result ( 0 ) { PromiseResult :: Successful ( _ ) => { } , PromiseResult :: Failed => env :: panic ( b" " ) , PromiseResult :: NotReady => env :: panic ( b" " ) , } ; } // cast arguments in order to be formatted let payment_u128 : u128 = payment . into ( ) ; let nonce_u128 : u128 = nonce . into ( ) ; let expiration : u64 = env :: block_timestamp ( ) + EXPIRY_TIME ; // store request let oracle_request = OracleRequest { caller_account : sender . clone ( ) , request_spec : spec_id , callback_address , callback_method , data , payment : payment_u128 , expiration , } ; // Insert request and commitment into state. /*
          account =>
            nonce => { Request }
        */ let nonce_request_entry = self . requests . get ( & sender ) ; let mut nonce_request = if nonce_request_entry . is_none ( ) { TreeMap :: new ( sender . clone ( ) . into_bytes ( ) ) } else { nonce_request_entry . unwrap ( ) } ; nonce_request . insert ( & nonce_u128 , & oracle_request ) ; self . requests . insert ( & sender . clone ( ) , & nonce_request ) ; self . nonces . insert ( & sender . clone ( ) , & nonce . clone ( ) ) ; env :: log ( format ! ( " \n \n " nonce_u128 clone ( ) oracle_request clone ( ) ) . as_bytes ( ) ) ; }
for data_version, which is also not used in Solidity as I understand
for data_version which is also not used in Solidity as I understand
&mut self
sender
AccountId
payment
U128
spec_id
Base64String
callback_address
AccountId
callback_method
String
nonce
U128
data_version
U128
data
Base64String
&mut self
sender
AccountId
payment
U128
spec_id
Base64String
callback_address
AccountId
callback_method
String
nonce
U128
data_version
U128
data
Base64String