npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

juno-trestle

v0.1.2

Published

Trestle is a development framework for building juno contracts. The aim of the project is to make juno contracts development process simple, efficient and scalable. User can focus on logic of juno contract and not much about further steps in development.

Downloads

94

Readme

Trestle

Trestle is a development framework for building juno contracts. The aim of the project is to make juno contracts development process simple, efficient and scalable. User can focus on logic of juno contract and not much about further steps in development. It facilitates features such as initiating project repo from contract templates, easy compilation of contracts, deployment, Interacting with contracts using schema and contract testing framework.

Requirements

The minimum packages/requirements are as follows:

  • Node 14+
  • Yarn v1.22+ or NPM `v6.0+**
  • Connection to an Juno node.

Install trestle

Installation from released version

To install trestle globally in your system you can use:

  • Using Yarn: yarn global add juno-trestle
  • Using NPM: npm install -g juno-trestle // or trestle-af

Installation from master.

The master branch corresponds to the latest version.

To use trestle on your system, follow the steps below:

$ git clone https://github.com/arufa-research/trestle.git
$ cd trestle
$ yarn install
$ yarn build
$ cd packages/trestle
$ yarn link
$ chmod +x $HOME/.yarn/bin/trestle

Install dependencies

Setup Rust compiler

$ cd infrastructure
$ make setup-rust

Follow our infrastructure README for instructions how to setup a private network.

Usage

Initialize a project

$ trestle init <project-name>

This will create a directory inside current directory with boiler-plate code. The contracts/ directory has all the rust files for the contract logic. scripts/ directory contains .js scripts that user can write according to the use case, a sample script has been added to give some understanding of how a user script should look like. test/ directory contains .js scripts to run tests for the deployed contracts.

Listing Tasks

To see the possible tasks (commands) that are available, go to project's folder.

$ trestle

This is the list of built-in tasks. This is your starting point to find out what tasks are available to run.

Compile the project

To compile the contracts, Go to project directory:

$ cd <project-name>
$ trestle compile

This command will generate compiled .wasm files in artifacts/contracts/ dir and schema .json files in artifacts/schema/ dir.

Cleanup Artifacts

To clear artifacts data, use

$ trestle clean

This will remove the artifacts directory completely. To clean artifacts for only one contract, use

$ trestle clean <contract-name>

This will remove specific files related to that contract.

Running user scripts

User scripts are a way to define the flow of interacting with contracts on some network in form of a script. These scripts can be used to deploy a contract, query/transact with the contract.A sample script scripts/sample-script.js is available in the boilerplate.

Run tests

$ yarn run test

License

This project is forked from hardhat, and just base on the hardhat-core part then modify it under MIT license.

Thanks

hardhat - Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software. Get Solidity stack traces & console.log.