Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nft-blind-box-protocol

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nft-blind-box-protocol

- [SDK package](./sdk/) - [Sample Scripts](#sample-scripts) - [RiverBox Dev](#riverbox-dev) - [Admin SOP](#admin-sop) - [Latest Contract Address](./logs-persis/deployment.json)

  • 0.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

RiverBox - NFT Protocol

  • SDK package
  • Sample Scripts
  • RiverBox Dev
  • Admin SOP
  • Latest Contract Address

Sample Scripts

Install dependencies

yarn

Compile contracts

yarn run hardhat compile

Build doc

yarn run hardhat docgen 

Run lint

yarn run lint
yarn run lint:fix

Run format

yarn run format
yarn run format:fix

Generate types for SDK

yarn run hardhat typechain 

Hardhat start local test node

yarn run hardhat node --network hardhat --no-deploy --show-accounts
# or use arbitrary env file
yarn run env-cmd -f envs/.env.exampleA yarn run hardhat node --network hardhat --no-deploy --show-accounts

Hardhat run tests on local node

yarn run hardhat test --network localhost
# or use arbitrary env file e.g.
yarn run env-cmd -f envs/.env.exampleA yarn run hardhat test --network localhost

Hardhat run scripts on local node

yarn run hardhat run scripts/sample-script.ts --network localhost
# or use arbitrary env file e.g.
yarn run env-cmd -f envs/.env.exampleA yarn run hardhat run scripts/sample-script.ts --network localhost

Hardhat run deploy

yarn run hardhat deploy --network localhost
# or use arbitrary env file e.g.
yarn run env-cmd -f envs/.env.exampleA yarn run hardhat deploy --network localhost --reset

RiverBox Dev (Only focus upgradeable version)

Hardhat test

FUSION_TABLE=./config/assets/6.17-fusion-table.csv yarn run hardhat test --network hardhat test/upgradeable/*.ts

Hardhat solidity-coverage

yarn run hardhat coverage --testfiles test/upgradeable --network hardhat

Admin SOP

Fresh deployment

localhost

Deploy deploy proxy contracts (start a local hardhat network first ref)

LOAD_TASK=True yarn run hardhat riverbox:upgradeable:init:deploy --network localhost | tee -a ./logs/deployToLocal.log

setHierarchy(Use existing deployment information)

LOAD_TASK=True yarn run hardhat riverbox:setHierarchy --input ./config/assets/6.19-fusion-table.csv --batch-size 50 --stock-sub-sample 10 --network localhost | tee -a ./logs/setHierarchyLocal.log

setHierarchy(Override address or implementation name)

export RIVERBOX_ADDRESS={}
export RIVERBOX_IMPL={}
LOAD_TASK=True yarn run hardhat riverbox:setHierarchy --input ./config/assets/6.19-fusion-table.csv --batch-size 50 --river-box-address $RIVERBOX_ADDRESS --river-box-impl $RIVERBOX_IMPL --stock-sub-sample 10 --network localhost | tee -a ./logs/setHierarchyLocal.log

Upgrade RiverBox Implementation. (Replace --new-impl-name with the name of new implementation contract name)

LOAD_TASK=True yarn run hardhat riverbox:proxy:upgradeImpl --new-impl-name RiverBoxImpl --network localhost | tee -a ./logs/upgradeRiverBoxLocal.log

Upgrade RiverBoxEx Implementation. (Replace --new-impl-name with the name of new implementation contract name)

LOAD_TASK=True yarn run hardhat riverboxEx:proxy:upgradeImpl --new-impl-name RiverBoxExchangeImpl --network localhost | tee -a ./logs/upgradeRiverBoxExLocal.log
bscTest

Deploy deploy proxy contracts

LOAD_TASK=True yarn run env-cmd -f ./envs/.env.eth.bsc-test yarn run hardhat riverbox:upgradeable:init:deploy --network bscTest | tee -a ./logs/deployToBscTest.log

setHierarchy(Use existing deployment information)

LOAD_TASK=True yarn run env-cmd -f ./envs/.env.eth.bsc-test yarn run hardhat riverbox:setHierarchy --input ./config/assets/6.19-fusion-table.csv --batch-size 50 --stock-sub-sample 10 --network bscTest | tee -a ./logs/setHierarchyBscTest.log

setHierarchy(Override address or implementation name)

export RIVERBOX_ADDRESS={}
export RIVERBOX_IMPL={}
LOAD_TASK=True yarn run env-cmd -f ./envs/.env.eth.bsc-test yarn run hardhat riverbox:setHierarchy --input ./config/assets/6.1-fusion-table.csv --batch-size 50 --river-box-address $RIVERBOX_ADDRESS --river-box-impl $RIVERBOX_IMPL --network bscTest | tee -a ./logs/setHierarchyBscTest.log

Upgrade RiverBox Implementation. (Replace --new-impl-name with the name of new implementation contract name)

LOAD_TASK=True yarn run env-cmd -f ./envs/.env.eth.bsc-test yarn run hardhat riverbox:proxy:upgradeImpl --new-impl-name RiverBoxImpl --network bscTest | tee -a ./logs/upgradeRiverBoxBscTest.log

Upgrade RiverBoxEx Implementation. (Replace --new-impl-name with the name of new implementation contract name)

LOAD_TASK=True yarn run env-cmd -f ./envs/.env.eth.bsc-test yarn run hardhat riverboxEx:proxy:upgradeImpl --new-impl-name RiverBoxExchangeImpl --network bscTest | tee -a ./logs/upgradeRiverBoxExBscTest.log

Generic Interact

# check supply
LOAD_TASK=True yarn run env-cmd -f ./envs/.env.eth.bsc-test yarn run hardhat riverbox:interact --function-name totalSupply --args \[\] --network bscTest
# withdraw
LOAD_TASK=True yarn run env-cmd -f ./envs/.env.eth.bsc-test yarn run hardhat riverbox:interact --function-name withdraw --args \[\"0xEd558c75937611cD07dEC3dB75B557462bbe8EF7\",\"1150000000000000000\"\] --network bscTest
# check paused
LOAD_TASK=True yarn run env-cmd -f ./envs/.env.eth.bsc-test yarn run hardhat riverbox:interact --function-name paused --args \[\] --network bscTest

FAQs

Package last updated on 19 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc