-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from horuslabsio/feat/jolt
Feat/jolt
- Loading branch information
Showing
19 changed files
with
1,562 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
pub mod IKarstNFT; | ||
pub mod IERC721; | ||
pub mod IERC20; | ||
pub mod IRegistry; | ||
pub mod IProfile; | ||
pub mod IFollowNFT; | ||
pub mod IPublication; | ||
pub mod IHandle; | ||
pub mod IHandleRegistry; | ||
pub mod IHub; | ||
pub mod IJolt; | ||
pub mod ICollectNFT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use starknet::ContractAddress; | ||
|
||
// ************************************************************************* | ||
// IERC20 | ||
// ************************************************************************* | ||
#[starknet::interface] | ||
pub trait IERC20<TState> { | ||
fn total_supply(self: @TState) -> u256; | ||
fn balance_of(self: @TState, account: ContractAddress) -> u256; | ||
fn allowance(self: @TState, owner: ContractAddress, spender: ContractAddress) -> u256; | ||
fn transfer(ref self: TState, recipient: ContractAddress, amount: u256) -> bool; | ||
fn transfer_from( | ||
ref self: TState, sender: ContractAddress, recipient: ContractAddress, amount: u256 | ||
) -> bool; | ||
fn approve(ref self: TState, spender: ContractAddress, amount: u256) -> bool; | ||
|
||
fn name(self: @TState) -> ByteArray; | ||
fn symbol(self: @TState) -> ByteArray; | ||
fn decimals(self: @TState) -> u8; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use starknet::ContractAddress; | ||
use karst::base::constants::types::{JoltParams, JoltData}; | ||
|
||
#[starknet::interface] | ||
pub trait IJolt<TState> { | ||
// ************************************************************************* | ||
// EXTERNALS | ||
// ************************************************************************* | ||
fn jolt(ref self: TState, jolt_params: JoltParams) -> u256; | ||
fn set_fee_address(ref self: TState, _fee_address: ContractAddress); | ||
fn auto_renew(ref self: TState, profile: ContractAddress, renewal_id: u256) -> bool; | ||
fn fulfill_request(ref self: TState, jolt_id: u256) -> bool; | ||
// ************************************************************************* | ||
// GETTERS | ||
// ************************************************************************* | ||
fn get_jolt(self: @TState, jolt_id: u256) -> JoltData; | ||
fn get_fee_address(self: @TState) -> ContractAddress; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod jolt; |
Oops, something went wrong.