Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions staking-pool-factory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,18 @@ pub fn on_staking_pool_create(
predecessor_account_id: AccountId,
) -> PromiseOrValue<bool>;
```

### Usage

Contract initialization:
```bash
near call <staking_pool_factory> new '{"staking_pool_whitelist_account_id": <whitelist_contract>}'
```
where `<whitelist_contract>` it the account id of the whitelist contract that this factory
is associated with.
Comment on lines +67 to +72
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be inlined with the deployment, but it's okay to have it as an initialization example with the note of caution.


Staking pool creation:
```bash
near call <staking_pool_factory> create_staking_pool '{"staking_pool_id": <staking_pool_id>, "owner_id": <owner_id>, "stake_public_key": <stake_public_key>, "reward_fee_fraction": <reward_fraction>}'
```
Here `reward_fee_fraction` is an object like `{"numerator": 10, "denominator": 100}`.
Comment on lines +74 to +78
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain every parameter, because people are still confused. Or point to the staking-pool contract