0.0.1 • Published 11 months ago
@minedfi/sdk v0.0.1
mined.fi contracts
Prerequisites
- Node.js (node)
- Docker Engine (docker-engine)
- Docker Compose (substrate-contracts-node)
Install Node.js
# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# download and install Node.js (you may need to restart the terminal)
nvm install 20
# verifies the right Node.js version is in the environment
node -v # should print `v20.15.1`
# verifies the right NPM version is in the environment
npm -v # should print `10.7.0`Install Docker Engine
Uninstall all conflicting packages
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; doneAdd Docker to your apt repository'
# adds Docker's official GPG key
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# adds the repository to Apt sources
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get updateInstall Docker Engine
# installs the latest version
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
#verify if Docker Engine runs correctly
sudo docker run hello-worldInstall Docker Compose
Installation of Docker Engine is required before installing Docker Compose.
sudo apt-get update
sudo apt-get install docker-compose-pluginDevelopment
Install dependencies
npm iStart a local devnet
cd alephium-stack && make restart-devnetCompile
Compile the contracts:
npm run compileBuild the library
npm run buildTesting
npm run test0.0.1
11 months ago