Contract migrated from name.near
to pool-details.near
Add pool details:
View pool details:
Add details about your whitelisted staking pool on NEAR blockchain.
Current contract address in NEAR Mainnet: pool-details.near
- update_field '{"pool_id": "
<<YOUR_POOL>>
", "name": "<<FIELD_NAME>>
", "value": "<<VALUE>>
"}' --accountId=<<YOUR_POOL_OWNER_ACCOUNT_ID>>
--gas=200000000000000
Please find list of suggested field names in FIELDS.md
- get_all_fields '{"from_index": 0, "limit": 100}'
- get_fields_by_pool '{"pool_id": "
<<YOUR_POOL>>
"}' - get_num_pools
near call pool-details.near update_field '{"pool_id": "zavodil.poolv1.near", "name": "url", "value": "https://zavodil.ru"}' --accountId=zavodil.near --gas=200000000000000
near call pool-details.near update_field '{"pool_id": "zavodil.poolv1.near", "name": "twitter", "value": "zavodil_ru"}' --accountId=zavodil.near --gas=200000000000000
near view pool-details.near get_all_fields '{"from_index": 0, "limit": 3}'
near view pool-details.near get_fields_by_pool '{"pool_id": "zavodil.poolv1.near"}'
Open in the Gitpod link above or clone the repository.
git clone https://github.com/zavodil/near-pool-details
Install dependencies:
yarn
If you don't have Rust
installed, complete the following 3 steps:
- Install Rustup by running:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
(Taken from official installation guide)
- Configure your current shell by running:
source $HOME/.cargo/env
- Add wasm target to your toolchain by running:
rustup target add wasm32-unknown-unknown
Next, make sure you have near-cli
by running:
near --version
If you need to install near-cli
:
npm install near-cli -g
If you do not have a NEAR account, please create one with NEAR Wallet.
In the project root, login with near-cli
by following the instructions after this command:
near login
Modify the top of src/config.js
, changing the CONTRACT_NAME
to be the NEAR account that was just used to log in.
…
const CONTRACT_NAME = 'YOUR_ACCOUNT_NAME_HERE'; /* TODO: fill this in! */
…
Build
yarn build
Deploy
yarn deploy
contract/src/lib.rs
for the contract code