Transaction #14282

Hash 602adecc51f8f6d605bcadeac06bfce595a0dd17cf6b21141c3383e71b7b0f5f
Status Success
Timestamp 1314 days ago - 10/12/2020, 11:57:48 PM UTC+0
Block 18307
Stamps Used 1010
Burned Fee 0.28055556 TAU
From afd5b01156abeebe61c5e3a66a36559fc929c81ee6b5ddc9afa1e89dde791466 
Contract Name submission
Function Name submit_contract

Additional Info
SubBlock Number 0
Nonce 1
Processor 5b09493df6c18d17cc883ebce54fcb1f5afbd507533417fe32c006009a9c3c4a
Signature 266e9a20a63bf56976f9980ef8da24a73196d9f15a16bf056560535e7fdcdc6fd8c008ef047cba3569006eeb13e98b89afab46d418ef429419285578611d7d01
Stamps Supplied 1800
Stamps per TAU 36

Kwargs

code import currency import con_soccercoin_rewards balances = Hash(default_value=0) operator = Variable() distributionAmount = Variable() @construct def seed(vk: str, play_cost: int, match_time: int): operator.set(vk) distributionAmount.set(0) balances['play_cost'] = play_cost balances['match_time'] = match_time balances['match_extend'] = 1 balances['points_redeem'] = 500 @export def new_game(gameId: str, winner_pot: float): assert_owner() balances[gameId, 'jackpot'] = 0 balances['jackpot'] = winner_pot balances[gameId, 'best_score'] = 0 balances[gameId, 'leaders', 'num_of_leaders'] = 0 balances['gameId'] = gameId max_extend = balances['match_time'] * balances['match_extend'] balances['game_time'] = now + datetime.timedelta(hours=int(max_extend)) balances['game_locked'] = False @export def play(): account = ctx.caller operator_match = operator.get() gameId = balances['gameId'] assert balances['game_locked' ] == False, 'The match is finish!!!, please wait until current pot is distributed' play_before = balances[gameId, account, 'play_before'] if balances[gameId, 'leaders', 'num_of_leaders'] == 0: balances['match_extend'] = 1 max_extend = balances['match_time'] * balances['match_extend'] balances['game_time'] = now + datetime.timedelta(hours=int( max_extend)) if play_before == True: ammount_play = balances['play_cost'] * decimal('0.20') assert currency.balance_of(account ) >= ammount_play, 'Not enough Balance to play!' currency.transfer_from(ammount_play, operator_match, account) balances[gameId, 'jackpot'] += ammount_play balances['jackpot'] += ammount_play else: ammount_play = balances['play_cost'] assert currency.balance_of(account ) >= ammount_play, 'Not enough Balance to play!' currency.transfer_from(ammount_play, operator_match, account) balances[gameId, 'jackpot'] += ammount_play balances['jackpot'] += ammount_play balances[gameId, account, 'play_before'] = True balances[gameId, account, 'can_play'] = True balances[gameId, account, 'attempts'] += 1 balances[account, 'games_played'] += 1 @export def set_score(score: float, goals: float, account: str): assert_owner() gameId = balances['gameId'] balances[account, 'goals'] += goals if balances[gameId, 'best_score'] == score: balances[gameId, 'leaders', 'num_of_leaders'] += 1 num_leaders = balances[gameId, 'leaders', 'num_of_leaders'] balances[gameId, 'leaders', num_leaders] = account if balances[gameId, 'best_score'] < score: balances[gameId, 'best_score'] = score balances[gameId, 'leaders', 'num_of_leaders'] = 1 balances[gameId, 'leaders', 1] = account if balances[account, 'best_score'] < score: balances[account, 'best_score'] = score balances[account, 'soccer_point'] += score / 1000 balances[gameId, account, 'can_play'] = False @export def winner(): assert_owner() sender = operator.get() gameId = balances['gameId'] if balances[gameId, 'leaders', 'num_of_leaders'] == 0: balances['match_extend'] += 1 new_game(hashlib.sha3(str(now)), 0) return {'winner': 0, 'jackpot': 0, 'best_score': 0, 'gameId': gameId, 'attempts': 0} if balances[gameId, 'leaders', 'num_of_leaders'] == 1: winner = balances[gameId, 'leaders', 1] attempts = balances[gameId, winner, 'attempts'] nickname = balances[winner, 'nickname'] currency.transfer_from(balances[gameId, 'jackpot'] * decimal( '0.97'), winner, sender) balances[winner, 'soccer_point'] += 100 balances[winner, 'jackpot'] += balances[gameId, 'jackpot'] distributionAmount.set(distributionAmount.get() + balances[ gameId, 'jackpot']) new_game(hashlib.sha3(str(now)), 0) if nickname == 0: return {'winner': winner, 'jackpot': int(balances[gameId, 'jackpot']), 'best_score': balances[gameId, 'best_score'], 'gameId': gameId, 'attempts': attempts} else: return {'winner': nickname, 'jackpot': int(balances[gameId, 'jackpot']), 'best_score': balances[gameId, 'best_score'], 'gameId': gameId, 'attempts': attempts} if balances[gameId, 'leaders', 'num_of_leaders'] > 1: random.seed() randomInt = random.randint(1, balances[gameId, 'leaders', 'num_of_leaders']) winner = balances[gameId, 'leaders', randomInt] attempts = balances[gameId, winner, 'attempts'] nickname = balances[winner, 'nickname'] currency.transfer_from(balances[gameId, 'jackpot'] * decimal( '0.97'), winner, sender) balances[winner, 'soccer_point'] += 100 balances[winner, 'jackpot'] += balances[gameId, 'jackpot'] distributionAmount.set(distributionAmount.get() + balances[ gameId, 'jackpot']) new_game(hashlib.sha3(str(now)), 0) if nickname == 0: return {'winner': winner, 'jackpot': int(balances[gameId, 'jackpot']), 'best_score': balances[gameId, 'best_score'], 'gameId': gameId, 'attempts': attempts} else: return {'winner': nickname, 'jackpot': int(balances[gameId, 'jackpot']), 'best_score': balances[gameId, 'best_score'], 'gameId': gameId, 'attempts': attempts} @export def finish_match(): assert_owner() balances['game_locked'] = True @export def redeem_soccer_point(): caller = ctx.caller assert not balances[caller, 'soccer_point'] > 0 , 'Dont have soccer point' assert not balances[caller, 'soccer_point'] >= balances['points_redeem'] , 'Dont have soccer point necessary for redeem' con_soccercoin_rewards.transfer_from(1, caller, ctx.this) balances[caller, 'soccer_coin'] += 1 balances[caller, 'soccer_point'] -= balances['points_redeem'] @export def redeem_soccer_coin(amount: float): caller = ctx.caller assert con_soccercoin_rewards.balance_of(caller) >= amount, 'Not enough tokens to redeem!' assert amount > 0, 'Invalid amount!' share = amount / con_soccercoin_rewards.total_supply() reward = share * con_soccercoin_rewards.balance_of(ctx.this) if reward > 0: con_soccercoin_rewards.transfer_from_currency(reward, amount, caller) @export def set_nick_name(nickname: str): caller = ctx.caller assert len(nickname) <= 25, 'Nickname too long (25 chars max).' assert len(nickname) > 0, 'Nickname too short.' names_uid = hashlib.sha256(nickname.lower().replace(' ', '')) assert not balances['nicknames', names_uid ], 'A form of this name already belongs to ' + balances[ 'nicknames', names_uid] balances[caller, 'nickname'] = nickname balances['nicknames', names_uid] = nickname @export def change_nick_name_malicious(nickname: str, account: str, new_account: str, reserved: bool): assert_owner() assert len(nickname) <= 25, 'Nickname too long (25 chars max).' assert len(nickname) > 0, 'Nickname too short.' names_uid = hashlib.sha256(nickname.lower().replace(' ', '')) if reserved is True: balances[account, 'nickname'] = 'Reserved' else: balances[account, 'nickname'] = 'Banned words' balances[new_account, 'nickname'] = nickname balances['nicknames', names_uid] = nickname @export def transfer(amount: float, to: str): sender = ctx.caller assert amount > 0, 'Cannot send negative balances!' assert balances[sender] >= amount, 'Not enough coins to send!' balances[sender] -= amount balances[to] += amount @export def balance_of(account: str): return balances[account] @export def allowance(owner: str, spender: str): return balances[owner, spender] @export def approve(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' sender = ctx.caller balances[sender, to] += amount return balances[sender, to] @export def change_value(value: float): assert_owner() assert value > 0, 'Cannot send negative value!' balances['play_cost'] = value @export def change_match_time(value: float): assert_owner() assert value > 0, 'Cannot send negative value!' balances['match_time'] = value @export def change_match_extend_time(value: float): assert_owner() assert value > 0, 'Cannot send negative value!' balances['match_extend'] = value @export def change_points_redeem(value: float): assert_owner() assert value > 0, 'Cannot send negative value!' balances['points_redeem'] = value @export def active_item_game(contract: str, uid: str): owner = ctx.caller t = importlib.import_module(contract) assert_ownership(contract, uid, owner) balances[owner, contract, 'active_item'] = uid @export def create_item(contract: str, thing_string: str, name: str, title: str, description: str, category: str, meta: dict={}): assert_owner() sender = ctx.caller t = importlib.import_module(contract) thing_uid = t.add_thing(thing_string, name, title, description, category, meta, sender) return thing_uid @export def create_item_random(contract: str, owner: str, thing_string: str, name: str, title: str, description: str, category: str, meta: dict={}): assert_owner() t = importlib.import_module(contract) thing_uid = t.add_thing(thing_string, name, title, description, category, meta, owner) return thing_uid @export def buy_item_soccer_point(contract: str, uid: str): t = importlib.import_module(contract) owner = t.get_owner(uid) sender = ctx.caller assert_already_owned(contract, uid, sender) price_amount = t.get_price_amount_soccer_point(uid) assert balances[sender, 'soccer_point' ] >= price_amount, 'Not enough Soccer point to buy!' assert price_amount, uid + ' is not for sale' assert price_amount > 0, uid + ' is not for sale' balances[sender, 'soccer_point'] -= price_amount balances[sender, 'soccer_point'] += price_amount balances[owner, contract, 'active_item'] = '' transfer_ownership(contract, uid, sender) @export def transfer_item_master(contract: str, uid: str, account: str): assert_owner() t = importlib.import_module(contract) owner = t.get_owner(uid) if owner == operator.get(): transfer_ownership(contract, uid, account) @export def buy_item(contract: str, uid: str): t = importlib.import_module(contract) owner = t.get_owner(uid) sender = ctx.caller assert_already_owned(contract, uid, sender) price_amount = t.get_price_amount(uid) assert price_amount, uid + ' is not for sale' assert price_amount > 0, uid + ' is not for sale' assert currency.balance_of(sender ) >= price_amount, 'Not enough Balance to play!' currency.transfer_from(price_amount * decimal('0.97'), owner, sender) currency.transfer_from(price_amount * decimal('0.03'), operator.get(), sender) balances[owner, contract, 'active_item'] = '' transfer_ownership(contract, uid, sender) @export def sell_item(contract: str, uid: str, amount: int): t = importlib.import_module(contract) assert_ownership(contract, uid, ctx.caller) t.set_price(uid, amount) @export def sell_item_soccer_point(contract: str, uid: str, amount: int): t = importlib.import_module(contract) assert_ownership(contract, uid, ctx.caller) t.set_price_soccer_point(uid, amount) @export def like_item(contract: str, uid: str): sender = ctx.caller t = importlib.import_module(contract) assert balances[contract, 'liked', uid, sender ] == '', sender + ' already liked ' + uid t.like_thing(uid) balances[contract, 'liked', uid, sender] = True def assert_already_owned(contract: str, uid: str, sender): t = importlib.import_module(contract) owner = t.get_owner(uid) assert owner != sender, uid + ' already owned by ' + sender def transfer_ownership(contract: str, uid: str, new_owner: str): t = importlib.import_module(contract) old_owner = t.get_owner(uid) t.set_owner(uid, new_owner) if t.get_price_amount(uid) > 0: t.set_price(uid, 0) def assert_ownership(contract: str, uid: str, sender): t = importlib.import_module(contract) owner = t.get_owner(uid) assert owner == sender, uid + ' not owned by ' + sender def assert_owner(): assert ctx.caller == operator.get(), 'Only operator can call!'
constructor_args {"match_time":24,"play_cost":100,"vk":"afd5b01156abeebe61c5e3a66a36559fc929c81ee6b5ddc9afa1e89dde791466"}
name con_soccer

State Changes

Contract con_soccer
Variable operator
New Value afd5b01156abeebe61c5e3a66a36559fc929c81ee6b5ddc9afa1e89dde791466
 
Contract con_soccer
Variable distributionAmount
New Value 0
 
Contract con_soccer
Variable balances
Key play_cost
New Value 100
 
Contract con_soccer
Variable balances
Key match_time
New Value 24
 
Contract con_soccer
Variable balances
Key match_extend
New Value 1
 
Contract con_soccer
Variable balances
Key points_redeem
New Value 500
 
Contract con_soccer
Variable __code__
New Value import currency import con_soccercoin_rewards __balances = Hash(default_value=0, contract='con_soccer', name='balances') __operator = Variable(contract='con_soccer', name='operator') __distributionAmount = Variable(contract='con_soccer', name= 'distributionAmount') def ____(vk: str, play_cost: int, match_time: int): __operator.set(vk) __distributionAmount.set(0) __balances['play_cost'] = play_cost __balances['match_time'] = match_time __balances['match_extend'] = 1 __balances['points_redeem'] = 500 @__export('con_soccer') def new_game(gameId: str, winner_pot: float): __assert_owner() __balances[gameId, 'jackpot'] = 0 __balances['jackpot'] = winner_pot __balances[gameId, 'best_score'] = 0 __balances[gameId, 'leaders', 'num_of_leaders'] = 0 __balances['gameId'] = gameId max_extend = __balances['match_time'] * __balances['match_extend'] __balances['game_time'] = now + datetime.timedelta(hours=int(max_extend)) __balances['game_locked'] = False @__export('con_soccer') def play(): account = ctx.caller operator_match = __operator.get() gameId = __balances['gameId'] assert __balances['game_locked' ] == False, 'The match is finish!!!, please wait until current pot is distributed' play_before = __balances[gameId, account, 'play_before'] if __balances[gameId, 'leaders', 'num_of_leaders'] == 0: __balances['match_extend'] = 1 max_extend = __balances['match_time'] * __balances['match_extend'] __balances['game_time'] = now + datetime.timedelta(hours=int( max_extend)) if play_before == True: ammount_play = __balances['play_cost'] * decimal('0.20') assert currency.balance_of(account ) >= ammount_play, 'Not enough Balance to play!' currency.transfer_from(ammount_play, operator_match, account) __balances[gameId, 'jackpot'] += ammount_play __balances['jackpot'] += ammount_play else: ammount_play = __balances['play_cost'] assert currency.balance_of(account ) >= ammount_play, 'Not enough Balance to play!' currency.transfer_from(ammount_play, operator_match, account) __balances[gameId, 'jackpot'] += ammount_play __balances['jackpot'] += ammount_play __balances[gameId, account, 'play_before'] = True __balances[gameId, account, 'can_play'] = True __balances[gameId, account, 'attempts'] += 1 __balances[account, 'games_played'] += 1 @__export('con_soccer') def set_score(score: float, goals: float, account: str): __assert_owner() gameId = __balances['gameId'] __balances[account, 'goals'] += goals if __balances[gameId, 'best_score'] == score: __balances[gameId, 'leaders', 'num_of_leaders'] += 1 num_leaders = __balances[gameId, 'leaders', 'num_of_leaders'] __balances[gameId, 'leaders', num_leaders] = account if __balances[gameId, 'best_score'] < score: __balances[gameId, 'best_score'] = score __balances[gameId, 'leaders', 'num_of_leaders'] = 1 __balances[gameId, 'leaders', 1] = account if __balances[account, 'best_score'] < score: __balances[account, 'best_score'] = score __balances[account, 'soccer_point'] += score / 1000 __balances[gameId, account, 'can_play'] = False @__export('con_soccer') def winner(): __assert_owner() sender = __operator.get() gameId = __balances['gameId'] if __balances[gameId, 'leaders', 'num_of_leaders'] == 0: __balances['match_extend'] += 1 new_game(hashlib.sha3(str(now)), 0) return {'winner': 0, 'jackpot': 0, 'best_score': 0, 'gameId': gameId, 'attempts': 0} if __balances[gameId, 'leaders', 'num_of_leaders'] == 1: winner = __balances[gameId, 'leaders', 1] attempts = __balances[gameId, winner, 'attempts'] nickname = __balances[winner, 'nickname'] currency.transfer_from(__balances[gameId, 'jackpot'] * decimal( '0.97'), winner, sender) __balances[winner, 'soccer_point'] += 100 __balances[winner, 'jackpot'] += __balances[gameId, 'jackpot'] __distributionAmount.set(__distributionAmount.get() + __balances[ gameId, 'jackpot']) new_game(hashlib.sha3(str(now)), 0) if nickname == 0: return {'winner': winner, 'jackpot': int(__balances[gameId, 'jackpot']), 'best_score': __balances[gameId, 'best_score'], 'gameId': gameId, 'attempts': attempts} else: return {'winner': nickname, 'jackpot': int(__balances[gameId, 'jackpot']), 'best_score': __balances[gameId, 'best_score'], 'gameId': gameId, 'attempts': attempts} if __balances[gameId, 'leaders', 'num_of_leaders'] > 1: random.seed() randomInt = random.randint(1, __balances[gameId, 'leaders', 'num_of_leaders']) winner = __balances[gameId, 'leaders', randomInt] attempts = __balances[gameId, winner, 'attempts'] nickname = __balances[winner, 'nickname'] currency.transfer_from(__balances[gameId, 'jackpot'] * decimal( '0.97'), winner, sender) __balances[winner, 'soccer_point'] += 100 __balances[winner, 'jackpot'] += __balances[gameId, 'jackpot'] __distributionAmount.set(__distributionAmount.get() + __balances[ gameId, 'jackpot']) new_game(hashlib.sha3(str(now)), 0) if nickname == 0: return {'winner': winner, 'jackpot': int(__balances[gameId, 'jackpot']), 'best_score': __balances[gameId, 'best_score'], 'gameId': gameId, 'attempts': attempts} else: return {'winner': nickname, 'jackpot': int(__balances[gameId, 'jackpot']), 'best_score': __balances[gameId, 'best_score'], 'gameId': gameId, 'attempts': attempts} @__export('con_soccer') def finish_match(): __assert_owner() __balances['game_locked'] = True @__export('con_soccer') def redeem_soccer_point(): caller = ctx.caller assert not __balances[caller, 'soccer_point'] > 0, 'Dont have soccer point' assert not __balances[caller, 'soccer_point'] >= __balances['points_redeem' ], 'Dont have soccer point necessary for redeem' con_soccercoin_rewards.transfer_from(1, caller, ctx.this) __balances[caller, 'soccer_coin'] += 1 __balances[caller, 'soccer_point'] -= __balances['points_redeem'] @__export('con_soccer') def redeem_soccer_coin(amount: float): caller = ctx.caller assert con_soccercoin_rewards.balance_of(caller ) >= amount, 'Not enough tokens to redeem!' assert amount > 0, 'Invalid amount!' share = amount / con_soccercoin_rewards.total_supply() reward = share * con_soccercoin_rewards.balance_of(ctx.this) if reward > 0: con_soccercoin_rewards.transfer_from_currency(reward, amount, caller) @__export('con_soccer') def set_nick_name(nickname: str): caller = ctx.caller assert len(nickname) <= 25, 'Nickname too long (25 chars max).' assert len(nickname) > 0, 'Nickname too short.' names_uid = hashlib.sha256(nickname.lower().replace(' ', '')) assert not __balances['nicknames', names_uid ], 'A form of this name already belongs to ' + __balances[ 'nicknames', names_uid] __balances[caller, 'nickname'] = nickname __balances['nicknames', names_uid] = nickname @__export('con_soccer') def change_nick_name_malicious(nickname: str, account: str, new_account: str, reserved: bool): __assert_owner() assert len(nickname) <= 25, 'Nickname too long (25 chars max).' assert len(nickname) > 0, 'Nickname too short.' names_uid = hashlib.sha256(nickname.lower().replace(' ', '')) if reserved is True: __balances[account, 'nickname'] = 'Reserved' else: __balances[account, 'nickname'] = 'Banned words' __balances[new_account, 'nickname'] = nickname __balances['nicknames', names_uid] = nickname @__export('con_soccer') def transfer(amount: float, to: str): sender = ctx.caller assert amount > 0, 'Cannot send negative balances!' assert __balances[sender] >= amount, 'Not enough coins to send!' __balances[sender] -= amount __balances[to] += amount @__export('con_soccer') def balance_of(account: str): return __balances[account] @__export('con_soccer') def allowance(owner: str, spender: str): return __balances[owner, spender] @__export('con_soccer') def approve(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' sender = ctx.caller __balances[sender, to] += amount return __balances[sender, to] @__export('con_soccer') def change_value(value: float): __assert_owner() assert value > 0, 'Cannot send negative value!' __balances['play_cost'] = value @__export('con_soccer') def change_match_time(value: float): __assert_owner() assert value > 0, 'Cannot send negative value!' __balances['match_time'] = value @__export('con_soccer') def change_match_extend_time(value: float): __assert_owner() assert value > 0, 'Cannot send negative value!' __balances['match_extend'] = value @__export('con_soccer') def change_points_redeem(value: float): __assert_owner() assert value > 0, 'Cannot send negative value!' __balances['points_redeem'] = value @__export('con_soccer') def active_item_game(contract: str, uid: str): owner = ctx.caller t = importlib.import_module(contract) __assert_ownership(contract, uid, owner) __balances[owner, contract, 'active_item'] = uid @__export('con_soccer') def create_item(contract: str, thing_string: str, name: str, title: str, description: str, category: str, meta: dict={}): __assert_owner() sender = ctx.caller t = importlib.import_module(contract) thing_uid = t.add_thing(thing_string, name, title, description, category, meta, sender) return thing_uid @__export('con_soccer') def create_item_random(contract: str, owner: str, thing_string: str, name: str, title: str, description: str, category: str, meta: dict={}): __assert_owner() t = importlib.import_module(contract) thing_uid = t.add_thing(thing_string, name, title, description, category, meta, owner) return thing_uid @__export('con_soccer') def buy_item_soccer_point(contract: str, uid: str): t = importlib.import_module(contract) owner = t.get_owner(uid) sender = ctx.caller __assert_already_owned(contract, uid, sender) price_amount = t.get_price_amount_soccer_point(uid) assert __balances[sender, 'soccer_point' ] >= price_amount, 'Not enough Soccer point to buy!' assert price_amount, uid + ' is not for sale' assert price_amount > 0, uid + ' is not for sale' __balances[sender, 'soccer_point'] -= price_amount __balances[sender, 'soccer_point'] += price_amount __balances[owner, contract, 'active_item'] = '' __transfer_ownership(contract, uid, sender) @__export('con_soccer') def transfer_item_master(contract: str, uid: str, account: str): __assert_owner() t = importlib.import_module(contract) owner = t.get_owner(uid) if owner == __operator.get(): __transfer_ownership(contract, uid, account) @__export('con_soccer') def buy_item(contract: str, uid: str): t = importlib.import_module(contract) owner = t.get_owner(uid) sender = ctx.caller __assert_already_owned(contract, uid, sender) price_amount = t.get_price_amount(uid) assert price_amount, uid + ' is not for sale' assert price_amount > 0, uid + ' is not for sale' assert currency.balance_of(sender ) >= price_amount, 'Not enough Balance to play!' currency.transfer_from(price_amount * decimal('0.97'), owner, sender) currency.transfer_from(price_amount * decimal('0.03'), __operator.get(), sender) __balances[owner, contract, 'active_item'] = '' __transfer_ownership(contract, uid, sender) @__export('con_soccer') def sell_item(contract: str, uid: str, amount: int): t = importlib.import_module(contract) __assert_ownership(contract, uid, ctx.caller) t.set_price(uid, amount) @__export('con_soccer') def sell_item_soccer_point(contract: str, uid: str, amount: int): t = importlib.import_module(contract) __assert_ownership(contract, uid, ctx.caller) t.set_price_soccer_point(uid, amount) @__export('con_soccer') def like_item(contract: str, uid: str): sender = ctx.caller t = importlib.import_module(contract) assert __balances[contract, 'liked', uid, sender ] == '', sender + ' already liked ' + uid t.like_thing(uid) __balances[contract, 'liked', uid, sender] = True def __assert_already_owned(contract: str, uid: str, sender): t = importlib.import_module(contract) owner = t.get_owner(uid) assert owner != sender, uid + ' already owned by ' + sender def __transfer_ownership(contract: str, uid: str, new_owner: str): t = importlib.import_module(contract) old_owner = t.get_owner(uid) t.set_owner(uid, new_owner) if t.get_price_amount(uid) > 0: t.set_price(uid, 0) def __assert_ownership(contract: str, uid: str, sender): t = importlib.import_module(contract) owner = t.get_owner(uid) assert owner == sender, uid + ' not owned by ' + sender def __assert_owner(): assert ctx.caller == __operator.get(), 'Only operator can call!'
 
Contract con_soccer
Variable __compiled__
New Value e30000000000000000000000000b0000004000000073f2020000640064016c005a00640064016c015a01650264006402640364048d035a0365046402640564068d025a0565046402640764068d025a0665076508650864089c036409640a84045a09650a640283016507650b640b9c02640c640d840483015a0c650a64028301640e640f840083015a0d650a64028301650b650b650764109c0364116412840483015a0e650a6402830164136414840083015a0f650a6402830164156416840083015a10650a6402830164176418840083015a11650a64028301650b64199c01641a641b840483015a12650a640283016507641c9c01641d641e840483015a13650a640283016507650765076514641f9c0464206421840483015a15650a64028301650b650764229c0264236424840483015a16650a64028301650764259c0164266427840483015a17650a640283016507650764289c026429642a840483015a18650a64028301650b650764229c02642b642c840483015a19650a64028301650b642d9c01642e642f840483015a1a650a64028301650b642d9c0164306431840483015a1b650a64028301650b642d9c0164326433840483015a1c650a64028301650b642d9c0164346435840483015a1d650a640283016507650764369c0264376438840483015a1e650a6402830169006601650765076507650765076507651f64399c07643a643b840583015a20650a64028301690066016507650765076507650765076507651f643c9c08643d643e840583015a21650a640283016507650764369c02643f6440840483015a22650a6402830165076507650764419c0364426443840483015a23650a640283016507650764369c0264446445840483015a24650a6402830165076507650864469c0364476448840483015a25650a6402830165076507650864469c036449644a840483015a26650a640283016507650764369c02644b644c840483015a276507650764369c02644d644e84045a28650765076507644f9c036450645184045a296507650764369c026452645384045a2a6454645584005a2b640153002956e9000000004eda0a636f6e5f736f63636572da0862616c616e6365732903da0d64656661756c745f76616c7565da08636f6e7472616374da046e616d65da086f70657261746f72290272050000007206000000da12646973747269627574696f6e416d6f756e742903da02766bda09706c61795f636f7374da0a6d617463685f74696d65630300000000000000030000000300000043000000733800000074006a017c008301010074026a016401830101007c01740364023c007c02740364033c006404740364053c006406740364073c006400530029084e7201000000720a000000720b000000e901000000da0c6d617463685f657874656e6469f4010000da0d706f696e74735f72656465656d2904da0a5f5f6f70657261746f72da03736574da145f5f646973747269627574696f6e416d6f756e74da0a5f5f62616c616e63657329037209000000720a000000720b000000a9007213000000da00da045f5f5f5f09000000730c00000000010a010a0108010801080172150000002902da0667616d654964da0a77696e6e65725f706f746302000000000000000300000005000000430000007370000000740083000100640174017c00640266023c007c01740164023c00640174017c00640366023c00640174017c006404640566033c007c00740164063c0074016407190074016408190014007d02740274036a0474057c02830164098d0117007401640a3c00640b7401640c3c0064005300290d4e7201000000da076a61636b706f74da0a626573745f73636f7265da076c656164657273da0e6e756d5f6f665f6c6561646572737216000000720b000000720d0000002901da05686f757273da0967616d655f74696d6546da0b67616d655f6c6f636b65642906da0e5f5f6173736572745f6f776e65727212000000da036e6f77da086461746574696d65da0974696d6564656c7461da03696e74290372160000007217000000da0a6d61785f657874656e64721300000072130000007214000000da086e65775f67616d65120000007312000000000206010c0108010c010e010801100118017225000000630000000000000000060000000500000043000000737601000074006a017d0074026a0383007d017404640119007d0274046402190064036b02732a740564048301820174047c027c006405660319007d0374047c02640664076603190064086b02727a64097404640a3c007404640b19007404640a190014007d04740674076a0874097c048301640c8d0117007404640d3c007c03640e6b0272dc7404640f1900740a6410830114007d05740b6a0c7c0083017c056b0573a87405641183018201740b6a0d7c057c017c008303010074047c0264126602050019007c05370003003c0074046412050019007c05370003003c006e5e7404640f19007d05740b6a0c7c0083017c056b0573fa7405641183018201740b6a0d7c057c017c008303010074047c0264126602050019007c05370003003c0074046412050019007c05370003003c00640e74047c027c00640566033c00640e74047c027c00641366033c0074047c027c0064146603050019006409370003003c0074047c0064156602050019006409370003003c006400530029164e7216000000721e000000467a44546865206d617463682069732066696e6973682121212c20706c65617365207761697420756e74696c2063757272656e7420706f74206973206469737472696275746564da0b706c61795f6265666f7265721a000000721b0000007201000000720c000000720d000000720b0000002901721c000000721d00000054720a0000007a04302e32307a1b4e6f7420656e6f7567682042616c616e636520746f20706c6179217218000000da0863616e5f706c6179da08617474656d707473da0c67616d65735f706c61796564290eda03637478da0663616c6c6572720f000000da036765747212000000da0e417373657274696f6e4572726f727220000000722100000072220000007223000000da07646563696d616cda0863757272656e6379da0a62616c616e63655f6f66da0d7472616e736665725f66726f6d2906da076163636f756e74da0e6f70657261746f725f6d61746368721600000072260000007224000000da0c616d6d6f756e745f706c6179721300000072130000007214000000da04706c61791f0000007338000000000206010801080106010e010e01120108011001080110010801100108010e010e0114011202080108010e010e01140110010e010e01160172350000002903da0573636f7265da05676f616c73723200000063030000000000000005000000050000004300000073e20000007400830001007401640119007d0374017c0264026602050019007c01370003003c0074017c036403660219007c006b02726474017c03640464056603050019006406370003003c0074017c0364046405660319007d047c0274017c0364047c0466033c0074017c036403660219007c006b00729c7c0074017c03640366023c00640674017c036404640566033c007c0274017c036404640666033c0074017c026403660219007c006b0072b87c0074017c02640366023c0074017c0264076602050019007c0064081b00370003003c00640974017c037c02640a66033c0064005300290b4e721600000072370000007219000000721a000000721b000000720c000000da0c736f636365725f706f696e7469e80300004672270000002902721f000000721200000029057236000000723700000072320000007216000000da0b6e756d5f6c656164657273721300000072130000007214000000da097365745f73636f726540000000731e0000000002060108011401100116010e010e0110010c010e010e0110010c011801723a000000630000000000000000060000000600000043000000739202000074008300010074016a0283007d007403640119007d0174037c01640264036603190064046b02725c74036405050019006406370003003c00740474056a0674077408830183016404830201006404640464047c01640464079c05530074037c01640264036603190064066b029001726674037c0164026406660319007d0274037c017c026408660319007d0374037c026409660219007d0474096a0a74037c01640a66021900740b640b830114007c027c008303010074037c02640c660205001900640d370003003c0074037c02640a66020500190074037c01640a66021900370003003c00740c6a0d740c6a02830074037c01640a66021900170083010100740474056a0674077408830183016404830201007c0464046b02900172427c02740e74037c01640a66021900830174037c01640e660219007c017c0364079c0553007c04740e74037c01640a66021900830174037c01640e660219007c017c0364079c05530074037c01640264036603190064066b049002728e740f6a1083000100740f6a11640674037c01640264036603190083027d0574037c0164027c05660319007d0274037c017c026408660319007d0374037c026409660219007d0474096a0a74037c01640a66021900740b640b830114007c027c008303010074037c02640c660205001900640d370003003c0074037c02640a66020500190074037c01640a66021900370003003c00740c6a0d740c6a02830074037c01640a66021900170083010100740474056a0674077408830183016404830201007c0464046b029002726a7c02740e74037c01640a66021900830174037c01640e660219007c017c0364079c0553007c04740e74037c01640a66021900830174037c01640e660219007c017c0364079c05530064005300290f4e7216000000721a000000721b0000007201000000720d000000720c0000002905da0677696e6e657272180000007219000000721600000072280000007228000000da086e69636b6e616d6572180000007a04302e39377238000000e96400000072190000002912721f000000720f000000722c00000072120000007225000000da07686173686c6962da0473686133da037374727220000000722f0000007231000000722e000000721100000072100000007223000000da0672616e646f6dda0473656564da0772616e64696e742906da0673656e6465727216000000723b0000007228000000723c000000da0972616e646f6d496e74721300000072130000007214000000723b00000053000000735e000000000206010801080112011001140106010a0114010e010e010c0110010e0114011c010c010e0114010a01080112010a02080112010a01140108010c010a010e010e010c0110010e0114011c010c010e0114010a01080112010a0208011201723b00000063000000000000000000000000030000004300000073120000007400830001006401740164023c006400530029034e54721e0000002902721f00000072120000007213000000721300000072130000007214000000da0c66696e6973685f6d61746368880000007304000000000206017246000000630000000000000000010000000500000043000000737e00000074006a017d0074027c0064016602190064026b040c007320740364038301820174027c006401660219007402640419006b050c00733e740364058301820174046a0564067c0074006a068303010074027c0064076602050019006406370003003c0074027c006401660205001900740264041900380003003c006400530029084e723800000072010000007a16446f6e74206861766520736f6363657220706f696e74720e0000007a2b446f6e74206861766520736f6363657220706f696e74206e656365737361727920666f722072656465656d720c000000da0b736f636365725f636f696e2907722a000000722b0000007212000000722d000000da16636f6e5f736f63636572636f696e5f726577617264737231000000da04746869732901722b000000721300000072130000007214000000da1372656465656d5f736f636365725f706f696e748e000000730e000000000206011a011801060110011401724a0000002901da06616d6f756e74630100000000000000040000000400000043000000736200000074006a017d0174026a037c0183017c006b05731c74046401830182017c0064026b04732c74046403830182017c0074026a0583001b007d027c0274026a0374006a06830114007d037c0364026b04725e74026a077c037c007c01830301006400530029044e7a1c4e6f7420656e6f75676820746f6b656e7320746f2072656465656d2172010000007a0f496e76616c696420616d6f756e74212908722a000000722b00000072480000007230000000722d000000da0c746f74616c5f737570706c797249000000da167472616e736665725f66726f6d5f63757272656e63792904724b000000722b000000da057368617265da06726577617264721300000072130000007214000000da1272656465656d5f736f636365725f636f696e9900000073100000000002060108010e0110010c011001080172500000002901723c000000630100000000000000030000000500000043000000738200000074006a017d0174027c00830164016b01731a740364028301820174027c00830164036b04732e740364048301820174046a057c006a0683006a0764056406830283017d02740864077c02660219000c00736674036408740864077c02660219001700830182017c0074087c01640966023c007c00740864077c0266023c0064005300290a4ee9190000007a214e69636b6e616d6520746f6f206c6f6e6720283235206368617273206d6178292e72010000007a134e69636b6e616d6520746f6f2073686f72742efa01207214000000da096e69636b6e616d65737a274120666f726d206f662074686973206e616d6520616c72656164792062656c6f6e677320746f20723c0000002909722a000000722b000000da036c656e722d000000723e000000da06736861323536da056c6f776572da077265706c61636572120000002903723c000000722b000000da096e616d65735f756964721300000072130000007214000000da0d7365745f6e69636b5f6e616d65a5000000731200000000020601140114011601100104010e010c0172590000002904723c0000007232000000da0b6e65775f6163636f756e74da087265736572766564630400000000000000050000000400000043000000738200000074008300010074017c00830164016b01731a740264028301820174017c00830164036b04732e740264048301820174036a047c006a0583006a0664056406830283017d047c0364076b08725a640874077c01640966023c006e0c640a74077c01640966023c007c0074077c02640966023c007c007407640b7c0466023c0064005300290c4e72510000007a214e69636b6e616d6520746f6f206c6f6e6720283235206368617273206d6178292e72010000007a134e69636b6e616d6520746f6f2073686f72742e7252000000721400000054da085265736572766564723c0000007a0c42616e6e656420776f72647372530000002908721f0000007254000000722d000000723e00000072550000007256000000725700000072120000002905723c0000007232000000725a000000725b0000007258000000721300000072130000007214000000da1a6368616e67655f6e69636b5f6e616d655f6d616c6963696f7573b200000073120000000003060114011401160108010e020c010c01725d0000002902724b000000da02746f630200000000000000030000000400000043000000734e00000074006a017d027c0064016b047316740264028301820174037c0219007c006b05732a740264038301820174037c02050019007c00380003003c0074037c01050019007c00370003003c006400530029044e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a194e6f7420656e6f75676820636f696e7320746f2073656e64212904722a000000722b000000722d00000072120000002903724b000000725e0000007244000000721300000072130000007214000000da087472616e73666572c1000000730a00000000020601100114011001725f00000029017232000000630100000000000000010000000200000043000000730800000074007c001900530029014e29017212000000290172320000007213000000721300000072140000007230000000ca0000007302000000000272300000002902da056f776e6572da077370656e646572630200000000000000020000000300000043000000730c00000074007c007c0166021900530029014e29017212000000290272600000007261000000721300000072130000007214000000da09616c6c6f77616e6365cf00000073020000000002726200000063020000000000000003000000040000004300000073360000007c0064016b047310740064028301820174016a027d0274037c027c016602050019007c00370003003c0074037c027c0166021900530029034e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573212904722d000000722a000000722b00000072120000002903724b000000725e0000007244000000721300000072130000007214000000da07617070726f7665d40000007308000000000210010601140172630000002901da0576616c756563010000000000000001000000030000004300000073220000007400830001007c0064016b04731674016402830182017c00740264033c006400530029044e72010000007a1b43616e6e6f742073656e64206e656761746976652076616c756521720a0000002903721f000000722d000000721200000029017264000000721300000072130000007214000000da0c6368616e67655f76616c7565dc0000007306000000000206011001726500000063010000000000000001000000030000004300000073220000007400830001007c0064016b04731674016402830182017c00740264033c006400530029044e72010000007a1b43616e6e6f742073656e64206e656761746976652076616c756521720b0000002903721f000000722d000000721200000029017264000000721300000072130000007214000000da116368616e67655f6d617463685f74696d65e30000007306000000000206011001726600000063010000000000000001000000030000004300000073220000007400830001007c0064016b04731674016402830182017c00740264033c006400530029044e72010000007a1b43616e6e6f742073656e64206e656761746976652076616c756521720d0000002903721f000000722d000000721200000029017264000000721300000072130000007214000000da186368616e67655f6d617463685f657874656e645f74696d65ea0000007306000000000206011001726700000063010000000000000001000000030000004300000073220000007400830001007c0064016b04731674016402830182017c00740264033c006400530029044e72010000007a1b43616e6e6f742073656e64206e656761746976652076616c756521720e0000002903721f000000722d000000721200000029017264000000721300000072130000007214000000da146368616e67655f706f696e74735f72656465656df10000007306000000000206011001726800000029027205000000da03756964630200000000000000040000000500000043000000732e00000074006a017d0274026a037c0083017d0374047c007c017c02830301007c0174057c027c00640166033c006400530029024eda0b6163746976655f6974656d2906722a000000722b000000da09696d706f72746c6962da0d696d706f72745f6d6f64756c65da125f5f6173736572745f6f776e65727368697072120000002904720500000072690000007260000000da0174721300000072130000007214000000da106163746976655f6974656d5f67616d65f80000007308000000000206010a010c01726f00000029077205000000da0c7468696e675f737472696e677206000000da057469746c65da0b6465736372697074696f6eda0863617465676f7279da046d6574616307000000000000000a0000000800000043000000733000000074008300010074016a027d0774036a047c0083017d087c086a057c017c027c037c047c057c067c0783077d097c09530029014e2906721f000000722a000000722b000000726b000000726c000000da096164645f7468696e67290a72050000007270000000720600000072710000007272000000727300000072740000007244000000726e000000da097468696e675f756964721300000072130000007214000000da0b6372656174655f6974656d00010000730c0000000003060106010a010c010a0172770000002908720500000072600000007270000000720600000072710000007272000000727300000072740000006308000000000000000a0000000800000043000000732a00000074008300010074016a027c0083017d087c086a037c027c037c047c057c067c077c0183077d097c09530029014e2904721f000000726b000000726c0000007275000000290a72050000007260000000727000000072060000007271000000727200000072730000007274000000726e0000007276000000721300000072130000007214000000da126372656174655f6974656d5f72616e646f6d0b010000730a000000000306010a010c010a01727800000063020000000000000006000000050000004300000073b200000074006a017c0083017d027c026a027c0183017d0374036a047d0474057c007c017c04830301007c026a067c0183017d0574077c046401660219007c056b05734874086402830182017c05735874087c0164031700830182017c0564046b04736c74087c01640317008301820174077c0464016602050019007c05380003003c0074077c0464016602050019007c05370003003c00640574077c037c00640666033c0074097c007c017c04830301006400530029074e72380000007a1f4e6f7420656e6f75676820536f6363657220706f696e7420746f20627579217a10206973206e6f7420666f722073616c6572010000007214000000726a000000290a726b000000726c000000da096765745f6f776e6572722a000000722b000000da165f5f6173736572745f616c72656164795f6f776e6564da1d6765745f70726963655f616d6f756e745f736f636365725f706f696e747212000000722d000000da145f5f7472616e736665725f6f776e657273686970290672050000007269000000726e00000072600000007244000000da0c70726963655f616d6f756e74721300000072130000007214000000da156275795f6974656d5f736f636365725f706f696e7415010000731a00000000020a010a0106010c010a010a010e0110011401140114010e01727e0000002903720500000072690000007232000000630300000000000000050000000400000043000000733600000074008300010074016a027c0083017d037c036a037c0183017d047c0474046a0583006b02723274067c007c017c02830301006400530029014e2907721f000000726b000000726c0000007279000000720f000000722c000000727c0000002905720500000072690000007232000000726e0000007260000000721300000072130000007214000000da147472616e736665725f6974656d5f6d617374657226010000730a000000000206010a010a010c01727f00000063020000000000000006000000050000004300000073b800000074006a017c0083017d027c026a027c0183017d0374036a047d0474057c007c017c04830301007c026a067c0183017d057c05734074077c0164011700830182017c0564026b04735474077c01640117008301820174086a097c0483017c056b05736a740764038301820174086a0a7c05740b6404830114007c037c048303010074086a0a7c05740b640583011400740c6a0d83007c04830301006406740e7c037c00640766033c00740f7c007c017c04830301006400530029084e7a10206973206e6f7420666f722073616c6572010000007a1b4e6f7420656e6f7567682042616c616e636520746f20706c6179217a04302e39377a04302e30337214000000726a0000002910726b000000726c0000007279000000722a000000722b000000727a000000da106765745f70726963655f616d6f756e74722d000000722f00000072300000007231000000722e000000720f000000722c0000007212000000727c000000290672050000007269000000726e00000072600000007244000000727d000000721300000072130000007214000000da086275795f6974656d2f010000731c00000000020a010a0106010c010a011001140108010e011601140106010e017281000000290372050000007269000000724b000000630300000000000000040000000400000043000000732800000074006a017c0083017d0374027c007c0174036a04830301007c036a057c017c02830201006400530029014e2906726b000000726c000000726d000000722a000000722b000000da097365745f7072696365290472050000007269000000724b000000726e000000721300000072130000007214000000da0973656c6c5f6974656d41010000730600000000020a010e017283000000630300000000000000040000000400000043000000732800000074006a017c0083017d0374027c007c0174036a04830301007c036a057c017c02830201006400530029014e2906726b000000726c000000726d000000722a000000722b000000da167365745f70726963655f736f636365725f706f696e74290472050000007269000000724b000000726e000000721300000072130000007214000000da1673656c6c5f6974656d5f736f636365725f706f696e7448010000730600000000020a010e017285000000630200000000000000040000000600000043000000735200000074006a017d0274026a037c0083017d0374047c0064017c017c026604190064026b02733474057c02640317007c011700830182017c036a067c0183010100640474047c0064017c017c0266043c006400530029054eda056c696b656472140000007a0f20616c7265616479206c696b656420542907722a000000722b000000726b000000726c0000007212000000722d000000da0a6c696b655f7468696e672904720500000072690000007244000000726e000000721300000072130000007214000000da096c696b655f6974656d4f010000730c000000000206010a010e0116010a017288000000630300000000000000050000000300000043000000733000000074006a017c0083017d037c036a027c0183017d047c047c026b03732c74037c01640117007c021700830182016400530029024e7a1220616c7265616479206f776e6564206279202904726b000000726c0000007279000000722d0000002905720500000072690000007244000000726e0000007260000000721300000072130000007214000000727a00000059010000730600000000010a010a01727a000000290372050000007269000000da096e65775f6f776e6572630300000000000000050000000300000043000000733e00000074006a017c0083017d037c036a027c0183017d047c036a037c017c02830201007c036a047c01830164016b04723a7c036a057c016401830201006400530029024e72010000002906726b000000726c0000007279000000da097365745f6f776e6572728000000072820000002905720500000072690000007289000000726e000000da096f6c645f6f776e6572721300000072130000007214000000727c0000005f010000730a00000000010a010a010c010e01727c000000630300000000000000050000000300000043000000733000000074006a017c0083017d037c036a027c0183017d047c047c026b02732c74037c01640117007c021700830182016400530029024e7a0e206e6f74206f776e6564206279202904726b000000726c0000007279000000722d0000002905720500000072690000007244000000726e0000007260000000721300000072130000007214000000726d00000067010000730600000000010a010a01726d000000630000000000000000000000000200000043000000731a00000074006a0174026a0383006b02731674046401830182016400530029024e7a174f6e6c79206f70657261746f722063616e2063616c6c212905722a000000722b000000720f000000722c000000722d0000007213000000721300000072130000007214000000721f0000006d01000073020000000001721f000000292c722f0000007248000000da04486173687212000000da085661726961626c65720f0000007211000000724000000072230000007215000000da085f5f6578706f7274da05666c6f617472250000007235000000723a000000723b0000007246000000724a00000072500000007259000000da04626f6f6c725d000000725f0000007230000000726200000072630000007265000000726600000072670000007268000000726f000000da046469637472770000007278000000727e000000727f0000007281000000728300000072850000007288000000727a000000727c000000726d000000721f0000007213000000721300000072130000007214000000da083c6d6f64756c653e010000007376000000080108010e010c010401080312090601120c10210601141210351006100b0601100b0601100c06010401120d0601120806011004060112040601120706011006060110060601100606011006060112070602200906022208060112100601140806011211060114060601140606011209100612081006
 
Contract con_soccer
Variable __owner__
New Value null
 
Contract con_soccer
Variable __submitted__
New Value 2020,10,12,23,57,49,0
 
Contract con_soccer
Variable __developer__
New Value afd5b01156abeebe61c5e3a66a36559fc929c81ee6b5ddc9afa1e89dde791466
 
Contract currency
Variable balances
Key afd5b01156abeebe61c5e3a66a36559fc929c81ee6b5ddc9afa1e89dde791466
New Value 4964.083333333333332