# Revoked references

**URL:** <https://community.starknet.io/t/revoked-references/812>\
**Category:** Support\
**Created:** [March 9, 2022, 2:27am UTC](https://community.starknet.io/t/revoked-references/812 "2022-03-09T02:27:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bowlofchilli](https://dub1.discourse-cdn.com/flex005/user_avatar/community.starknet.io/bowlofchilli/32/73368_2.png) [@bowlofchilli](https://community.starknet.io/u/bowlofchilli)\
**Post date:** [March 9, 2022, 2:27am UTC](https://community.starknet.io/t/revoked-references/812/1 "2022-03-09T02:27:14Z")

</div>

I have a revoked reference compile time error, very strange  
func deposit\_reward{syscall\_ptr : felt, pedersen\_ptr : HashBuiltin, range\_check\_ptr}(amount :Uint256 ):  
alloc\_locals  
let (local caller\_address:felt) = get\_caller\_address()  
let (local reward\_token\_address:felt) = rewarderc20\_address.read()  
let (contract\_address) = get\_contract\_address()

```
IERC20.transferFrom(contract_address=reward_token_address, sender=caller_address,recipient=contract_address,amount =amount)
    # Instanciating a zero in uint format
let zero_as_uint256: Uint256 = Uint256(0,0)
let cur_total_supply :Uint256 = total_supply.read()
let (is_equal) = uint256_eq(cur_total_supply, zero_as_uint256)
if is_equal == 0:
    let (local tmp_reward_factorinc:Uint256, ) = uint256_unsigned_div_rem(amount,cur_total_supply )
    let (local cur_reward:Uint256) = reward_factor.read()
    let (local newreward:Uint256,) = uint256_add(tmp_reward_factor_inc, cur_reward)
    reward_factor.write(value=new_reward)
end

deposit_reward_called.emit(user=caller_address, reward_amount=amount)

```

return ()  
on → deposit\_reward\_called.emit(user=caller\_address, reward\_amount=amount)  
any hints would be nice, thanks
