A nice template for NEAR repos

Overview

Template for a NEAR project

If you're looking for a no-std version of this template, go here.

Contains:

  • a setup script
  • Cargo.toml setup with simulation testing and NEAR sdk crates
  • build and deploy scripts
  • a src directory containing lib.rs, with common imports and ignore attributes
  • a test directory containing a simulation test setup
  • my preferred .gitignore and .rustfmt.toml setup

Setup script usage:

./setup.sh my_project_name will change all instances of "dummy" to whatever you'd like to call this project, and rename this README to instructions.md.

Build script usage:

./build.sh to build the wasm blob. The wasm blob will be copied into res/.

Deploy script usage:

./deploy.sh MYADDRESS to deploy your wasm blob to the NEAR testnet.

Note that if you change the constructor arguments, You will have to modify the arguments int the deploy.sh script. If my constructor is new(name: String, number: u32) -> Self, and I want to initialize with ("Todd", 1), I will change the script to:

near deploy --wasmFile res/dummy.wasm --initFunction "new" --initArgs '{"name": "Todd", "number": 1}' --accountId $1.testnet

and call ./deploy.sh MYADDRESS, or to provide arguments, change deploy.sh to:

near deploy --wasmFile res/dummy.wasm --initFunction "new" --initArgs "{\"name\": $1, \"number\": $2}" --accountId $1.testnet

and call ./deploy.sh MYADDRESS MYNAME MYNUM.

You might also like...
Balsa is a delightfully simple HTML template engine

🌳 balsa Balsa is a delightfully simple HTML template engine. It is designed to be used in user interfaces such as a CMS where a user needs to be able

Bevy GitHub CI Template

Bevy GitHub CI Template This repo show how to setup CI on a github project for Bevy. It creates two workflows: CI Release CI Definition: .github/workf

This is a template repo for eframe, a framework for writing apps using egui.

eframe template This is a template repo for eframe, a framework for writing apps using egui. The goal is for this to be the simplest way to get starte

A template for creating services in Rust using Axum and Prisma.

A template for creating services in Rust using Axum and Prisma. This uses the super cool Prisma Rust Client.

✨ A perfect template for a binary rust project.

Rust Template A project template for Rust, helping to structure your projects blazingly fast ⚡ . Features 🔥 Code-ready for binary projects. Add amazi

Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

Generate Nice Solana Address By Template

Yes, I know about GPU generators. https://smith-mcf.medium.com/solana-vanity-address-using-gpus-5a68ad94d1d4 ./solana-nice-address --help solana-nice-

A peer-reviewed collection of articles/talks/repos which teach concise, idiomatic Rust.
A peer-reviewed collection of articles/talks/repos which teach concise, idiomatic Rust.

This repository collects resources for writing clean, idiomatic Rust code. Please bring your own. 😊 Idiomatic coding means following the conventions

Generates a Nix expression for buildDotnetModule, with support for non nuget.org repos.

nuget2nix Generates a Nix expression for buildDotnetModule, with support for non nuget.org repos. Usage Similar to the nuget-to-nix command available

Mac App/CLI that automatically adds project logos to your locally cloned GitHub repos
Mac App/CLI that automatically adds project logos to your locally cloned GitHub repos

Download the app Automatically adds project logos to your locally cloned GitHub repos. Youtube Video This repository contains the source code for the

🎒 CLI to create starters from repos + Templates 🤖 + Actions 🚀
🎒 CLI to create starters from repos + Templates 🤖 + Actions 🚀

Backpack A tool to curate and automate your starter projects Key Features • How To Use • Download • Contributing • License Key Features Generate from

🗂️ A simple, opinionated, tool, written in Rust, for declaratively managing Git repos on your machine.

gitrs 🗂️ A simple, opinionated, tool, written in Rust, for declaretively managing Git repos on your machine. "simple" - limited in what it supports.

GitHub CLI extension to search some repos interactively.
GitHub CLI extension to search some repos interactively.

gh activity GitHub CLI extension to search some repos interactively. It's wrapper to build gh command provided by GitHub CLI, it could search more eas

Ask questions, get insights from repos
Ask questions, get insights from repos

🍕 RepoQuery 🍕 A REST service to answer user-queries about public GitHub repositories 🔎 The Project RepoQuery is an early-beta project, that uses re

Send nice emails
Send nice emails

Jolimail is an open source alternative to all the transactionnal email solutions. Why did we build jolimail? Jolimail comes from the frustration of us

A rust script to convert a better bibtex json file from Zotero into nice organised notes in Obsidian

Zotero to Obsidian script This is a script that takes a better bibtex JSON file exported by Zotero and generates an organised collection of reference

Add nice user-facing diagnostics to your errors without being weird about it.

thisdiagnostic is a Rust library for adding rich diagnostic metadata to errors, for some really fancy and customizable error reporting!

A versatile and efficient proxy framework with nice features suitable for various use cases.

A versatile and efficient proxy framework with nice features suitable for various use cases.

A developer environment manager with a nice future

Motive A developer environment manager with a nice future. But first let's just make a simple task runner that takes advantage of a special version of

Owner
Thor
zk wink
Thor
A template engine for Rust based on Jinja2/Django

Tera Tera is a template engine inspired by Jinja2 and the Django template language. <title>{% block title %}{% endblock title %}</title> <ul> {% for u

Vincent Prouillet 2.5k Jan 1, 2023
A flexible template engine for Rust

Rustache Rustache is a Rust implementation of the Mustache spec. Documentation The different Mustache tags are documented at the mustache(5) man page.

rustache 208 May 10, 2022
Compiler for Jade-like template language to cito.js-based virtual dom

Marafet A very experimental DSL for creating (mostly) single page applications in HTML. It's mostly a Jade-like (or Haml-like) templating language wit

Paul Colomiets 11 Jun 25, 2020
A minimalist Rust WebAssembly project template

MiniWASM - A minimalist Rust WebAssembly project template This is a minimal Rust-powered WebAssembly application template. It was designed to showcase

Emil Loer 160 Jul 26, 2022
A template for a Rust-powered static-page Try Online interface

rust-tio-template A template for a Rust-powered static-page Try Online interface What is included This is an example setup that enables all of the fol

null 2 Dec 13, 2021
Yew Tauri Desktop App Template

Yew Tauri Desktop App Template This is Template App for Desktop App. Run Develop $ cargo tauri dev Build App $ cargo tauri build Setup yew setup Using

usa 16 Oct 16, 2022
MiniJinja is a powerful but minimal dependency template engine for Rust

MiniJinja: a powerful template engine for Rust with minimal dependencies MiniJinja is a powerful but minimal dependency template engine for Rust which

Armin Ronacher 686 Jan 5, 2023
Template for Cargo based SysY compiler projects.

基于 Cargo 的 SysY 编译器项目模板 该仓库中存放了一个基于 Cargo 的 SysY 编译器项目的模板, 你可以在该模板的基础上进行进一步的开发. 该仓库中的 Rust 代码实现仅作为演示, 不代表你的编译器必须以此方式实现. 如你需要使用该模板, 建议你删掉所有 Rust 源文件, 仅

PKU Compiler Course 1 Nov 1, 2021
finch - a super fast and efficient template rendering engine for node.js

finch A super fast and efficient template rendering engine for node.js, inspired by Handlebars. Usage Finch is very simple to use: Register a template

null 1 Nov 2, 2021
A "Hello, world!" template of a Rust binary crate for the ESP-IDF framework.

Rust on ESP-IDF "Hello, World" template A "Hello, world!" template of a Rust binary crate for the ESP-IDF framework. This is the crate you get when ru

Ivan Markov 140 Jan 4, 2023