Skip to content

Commit

Permalink
add fns to get reward token and payer
Browse files Browse the repository at this point in the history
  • Loading branch information
credence0x committed May 19, 2024
1 parent 4688f70 commit e44cd34
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contracts/src/components/strealm.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use openzeppelin::token::erc721::interface::{IERC721Dispatcher};
use starknet::ContractAddress;
#[starknet::interface]
trait IStRealm<TState> {
fn get_reward_token(self: @TState) -> ContractAddress;
fn get_reward_payer(self: @TState) -> ContractAddress;
fn get_stream(self: @TState, owner: ContractAddress) -> Stream;
fn get_flow(self: @TState, flow_id: u32) -> Flow;
fn get_latest_flow_id(self: @TState) -> u32;
Expand Down Expand Up @@ -125,6 +127,14 @@ mod StRealmComponent {
self._reward_balance(starknet::get_caller_address())
}

fn get_reward_token(self: @ComponentState<TContractState>) -> ContractAddress {
self.StRealm_reward_token.read()
}

fn get_reward_payer(self: @ComponentState<TContractState>) -> ContractAddress {
self.StRealm_reward_payer.read()
}


//
// Mutables
Expand Down

0 comments on commit e44cd34

Please sign in to comment.