Docs.rs
human-program-0.1.0
human-program 0.1.0
Docs.rs crate page
Links
crates.io
Source
Owners
holykol
Dependencies
anchor-lang ^0.27.0
normal
borsh ^0.9.1
normal
human-common ^0.1.0
normal
human-fanout ^0.1.0
normal
human-round ^0.1.0
normal
mpl-token-metadata ^1.3.3
normal
shank ^0.0.2
normal
solana-program ^1.10.25
normal
spl-associated-token-account ^1.0.3
normal
spl-math ^0.1
normal
spl-token ^3.3.0
normal
spl-token-swap ^2.1.0
normal
thiserror ^1.0
normal
proptest ^1.0.0
dev
rand ^0.8
dev
solana-program-test ^1.9.6
dev
solana-sdk ^1.9.6
dev
Versions
22.83%
of the crate is documented
Platform
i686-pc-windows-msvc
i686-unknown-linux-gnu
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
☰
ContractState
Methods
calculate_buy_split
calculate_split_by_lamports
clear_drop
create_drop
In human_program::state
?
Type Definition
human_program
::
state
::
ContractState
source
·
[
−
]
pub type ContractState =
ContractStateV4
;
Implementations
§
source
§
impl
ContractState
source
pub fn
calculate_buy_split
( &self, now:
UnixTimestamp
, token_amount:
u64
, expected_price:
u64
) ->
Result
<
BuySplit
,
ProgramError
>
source
pub fn
calculate_split_by_lamports
(lamports:
u64
) ->
Option
<
BuySplit
>
source
pub fn
create_drop
( &mut self, price:
u64
, id:
u64
, amount:
u64
, now:
UnixTimestamp
, start_date:
UnixTimestamp
, end_date:
UnixTimestamp
) ->
Result
<
()
,
ProgramError
>
source
pub fn
clear_drop
(&mut self)