def allowance(self): owner = self.data.get('allowance_owner') spender = self.data.get('allowance_spender') if spender: # owner will default if omitted res = self.vm.allowance(owner, spender) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def register(self): url = self.data.get('register_url') gas_price = self.data.get('gas_price') if url and gas_price: res = self.vm.register(url, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def resolve_registration(self): hash = self.data.get('resolve_hash') gas_price = self.data.get('gas_price') if hash and gas_price: res = self.vm.resolve_registration(hash, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def set_backend_url(self): url = self.data.get('set_backend_url') gas_price = self.data.get('gas_price') if url and gas_price: res = self.vm.set_backend_url(url, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def list(self): hash = self.data.get('list_hash') gas_price = self.data.get('gas_price') if hash and gas_price: res = self.vm.list(hash, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def support(self): offer = self.data.get('support_offer') gas_price = self.data.get('gas_price') if offer and gas_price: res = self.vm.support(offer, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def claim_access_reward(self): hash = self.data.get('claim_hash') gas_price = self.data.get('gas_price') if hash and gas_price: res = self.vm.claim_access_reward(hash, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def set_privileged(self): listing = self.data.get('set_privileged_listing') gas_price = self.data.get('gas_price') if listing and gas_price: res = self.vm.set_privileged(listing, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def vote(self): hash = self.data.get('vote_hash') option = self.data.get('vote_option') gas_price = self.data.get('gas_price') if hash and option and gas_price: res = self.vm.vote(hash, option, gas_price) self._scene.add_effect(PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def request_delivery(self): hash = self.data.get('request_delivery_hash') amount = self.data.get('request_delivery_amount') gas_price = self.data.get('gas_price') if hash and amount and gas_price: res = self.vm.request_delivery(hash, amount, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def set_data_hash(self): listing = self.data.get('set_data_hash_listing') data = self.data.get('set_data_hash_data') gas_price = self.data.get('gas_price') if listing and data and gas_price: res = self.vm.set_data_hash(listing, data, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def reparameterize(self): param = self.data.get('reparameterize_param') value = self.data.get('reparameterize_value') gas_price = self.data.get('gas_price') if param and value and gas_price: res = self.vm.reparameterize(param, value, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def withdraw_from_listing(self): hash = self.data.get('withdraw_hash') amount = self.data.get('withdraw_amount') gas_price = self.data.get('gas_price') if hash and amount and gas_price: res = self.vm.withdraw_from_listing(hash, amount, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def delivered(self): hash = self.data.get('delivered_hash') url = self.data.get('delivered_url') gas_price = self.data.get('gas_price') if hash and url and gas_price: res = self.vm.delivered(hash, url, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def decrease_allowance(self): spender = self.data.get('decrease_allowance_spender') amount = self.data.get('decrease_allowance_amount') gas_price = self.data.get('gas_price') if spender and amount and gas_price: res = self.vm.decrease_allowance(spender, amount, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def transfer(self): to = self.data.get('transfer_to') amount = self.data.get('transfer_amount') gas_price = self.data.get('gas_price') if to and amount and gas_price: res = self.vm.transfer(to, amount, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def set_privileged(self): parameterizer = self.data.get('set_privileged_parameterizer') datatrust = self.data.get('set_privileged_datatrust') listing = self.data.get('set_privileged_listing') gas_price = self.data.get('gas_price') if parameterizer and datatrust and listing and gas_price: res = self.vm.set_privileged(parameterizer, datatrust, listing, gas_price) self._scene.add_effect(PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def transfer_from(self): source = self.data.get('transfer_from_source') to = self.data.get('transfer_from_to') amount = self.data.get('transfer_from_amount') gas_price = self.data.get('gas_price') if source and to and amount and gas_price: res = self.vm.transfer_from(source, to, amount, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def listing_accessed(self): listing = self.data.get('listing_accessed_listing') delivery = self.data.get('listing_accessed_delivery') amount = self.data.get('listing_accessed_amount') gas_price = self.data.get('gas_price') if listing and delivery and amount and gas_price: res = self.vm.listing_accessed(listing, delivery, amount, gas_price) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def balance_of(self): owner = self.data.get( 'balance_of_owner') # can be blank, will default to env res = self.vm.balance_of(owner) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def total_supply(self): res = self.vm.total_supply() self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def get_decimals(self): res = self.vm.get_decimals() self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def get_symbol(self): # we'll use the viewmodel to relay commands res = self.vm.get_symbol() self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def get_bytes_purchased(self): addr = self.data.get('get_bytes_purchased_addr') # we'll use the viewmodel to relay commands res = self.vm.get_bytes_purchased(addr) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def get_delivery(self): hash = self.data.get('get_delivery_hash') res = self.vm.get_delivery(hash) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def get_access_reward_earned(self): hash = self.data.get('get_access_reward_hash') res = self.vm.get_access_reward_earned(hash) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def get_privileged(self): res = self.vm.get_privileged() self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def deposit(self): amount = self.data.get('deposit_amount') gas_price = self.data.get('gas_price') if amount and gas_price: res = self.vm.deposit(amount, gas_price) self._scene.add_effect(PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def withdraw(self): amount = self.data.get('withdraw_amount') gas_price = self.data.get('gas_price') if amount and gas_price: res = self.vm.withdraw(amount, gas_price) self._scene.add_effect(PopUpDialog(self._screen, res, ['OK'], has_shadow=True))
def get_hash(self): url = self.data.get('get_hash_url') res = self.vm.get_hash(url) self._scene.add_effect( PopUpDialog(self._screen, res, ['OK'], has_shadow=True))