Here you'll find the open sourced code for the MOBIX staking contracts.

Related tags

Cryptography staking
Overview

Mobix Staking

Compile:

rustup default stable
cargo wasm

Test:

cargo test

Optimize:

quick and good:

RUSTFLAGS='-C link-arg=-s' cargo wasm

slow and better (*requires Docker):

docker run --rm -v "$(pwd)":/code   --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target   --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry   cosmwasm/rust-optimizer:0.12.4

Contract Verification Guide

After you used the command above for the optimized compilation of the contract with docker, you will find the wasm file in the artifacts dir. Ultimately you would want to verify this is the same as the contract on-chain.

To do that you can use some of the following techniques.

Without fetchd

  • Get the hash of the compiled contract:
sha256sum artifacts/mobix_staking.wasm
  • Get the info of the contract on-chain:
curl <rest_endpoint>/wasm/contract/<contract_address>

*You will need the code_id from the result.

  • Get the hash of that contract on-chain:
curl <rest_endpoint>/wasm/code/<code_id>

*You will find it under data_hash from the result.

  • Compare the two

With fetchd

  • Get the hash of the compiled contract:
sha256sum artifacts/mobix_staking.wasm
  • Get the info of the contract on-chain:
fetchd query wasm contract <contract_address> $NODE

*You will need the code_id from the output.

  • Download the wasm file:
fetchd query wasm code <code_id> <code_id>_code.wasm $NODE
  • Compare the two files or their hashes:
diff artifacts/mobix_staking.wasm <code_id>_code.wasm
You might also like...
zink! is a library for developing ink! smart contracts with useful Rust macros that extend functionality and reduce boilerplate code.
zink! is a library for developing ink! smart contracts with useful Rust macros that extend functionality and reduce boilerplate code.

zink! Smart Contract Macros This is a helper library for developing ink! smart contracts. It contains useful Rust macros that extend functionality and

This monorepository contains the source code for the smart contracts implementing bAsset Protocol on the Terra blockchain.

Crll bAsset Contracts This monorepository contains the source code for the smart contracts implementing bAsset Protocol on the Terra blockchain. You c

Open Protocol Indexer, OPI, is the best-in-slot open-source indexing client for meta-protocols on Bitcoin.

OPI - Open Protocol Indexer Open Protocol Indexer, OPI, is the best-in-slot open-source indexing client for meta-protocols on Bitcoin. OPI uses a fork

Smart contracts for Ref Finance

Ref Finance Contracts This mono repo contains the source code for the smart contracts of Ref Finance on NEAR. Contracts Contract Reference Description

Skyward Finance smart-contracts

Build and Init ./build.sh near dev-deploy res/skyward.was export CONTRACT_ID=skyward.testnet near call $CONTRACT_ID new --account_id=$CONTRACT_ID Regi

Rust client to Opensea's APIs and Ethereum smart contracts

opensea.rs Rust bindings & CLI to the Opensea API and Contracts CLI Usage Run cargo r -- --help to get the top level help menu: opensea-cli 0.1.0 Choo

NFT & Marketplace Contracts with royalties and fungible token support. Sample React app included.
NFT & Marketplace Contracts with royalties and fungible token support. Sample React app included.

NFT Market Reference Implementation A PoC backbone for NFT Marketplaces on NEAR Protocol. Reference Changelog Changelog Progress: basic purchase of NF

Examples and helpers to build NFT contracts on CosmWasm

CosmWasm NFTS This repo is the official repository to work on all NFT standard and examples in the CosmWasm ecosystem. cw721 and cw721-base were moved

A framework for creating PoC's for Solana Smart Contracts in a painless and intuitive way

Solana PoC Framework DISCLAIMER: any illegal usage of this framework is heavily discouraged. Most projects on Solana offer a more than generous bug bo

Releases(MOBIX-Staking-0.1.1)
  • MOBIX-Staking-0.1.1(Mar 17, 2022)

    This update adds an additional query functionality for all stakers. Specifically it adds an additional endpoint for querying all the stakers info from the contract. This is really useful for monitoring the contract. For the purposes of generating descriptive statistics it is more efficient than taking snapshots of the raw state and then extracting the staker statistics from the raw data a second step.

    Source code(tar.gz)
    Source code(zip)
    staking-main.zip(30.49 KB)
  • MOBIX-Staking-capricorn-0.1.0(Feb 7, 2022)

    This release contains a Contract Verification Guide and code for use by validators when upgrading to the Capricorn mainnet. It allows validators to independently verify the MOBIX staking contract binary provided with the Fetch.ai Capricorn migration documentation.

    Source code(tar.gz)
    Source code(zip)
Owner
MOBIX.ai
MOBIX rewards you to use eco-friendly means of transport (e.g. riding by bike/e-bike, scooter/e-scooter, skate, etc.)
MOBIX.ai
Minimal Substrate node configured for smart contracts via pallet-contracts.

substrate-contracts-node This repository contains Substrate's node-template configured to include Substrate's pallet-contracts ‒ a smart contract modu

Parity Technologies 73 Dec 30, 2022
evm2near compiles Solidity contracts into NEAR WebAssembly contracts.

EVM → NEAR evm2near is a project for compiling EVM bytecode into wasm bytecode, with the particular goal of having that wasm artifact be executable on

Aurora 125 Dec 3, 2022
Ticketed Discreet Log Contracts (DLCs) to enable instant buy-in for wager-like contracts on Bitcoin.

dlctix Ticketed Discreet Log Contracts (DLCs) to enable instant buy-in for wager-like contracts on Bitcoin. This project is part of the Backdrop Build

null 7 Feb 29, 2024
Marinde Anchor-Based, first on mainnet, liquid-staking-program and mSOL->SOL swap pool

marinade-anchor Marinade-finance liquid staking program for the Solana blockchain Audits & Code Review Kudelski Security: https://marinade.finance/Kud

Marinade.Finance 42 Dec 11, 2022
Yi Token by Crate Protocol: the primitive for auto-compounding single token staking pools.

yi Yi Token by Crate Protocol: the primitive for auto-compounding single token staking pools. About Yi is a Solana primitive for building single-sided

Crate Protocol 12 Apr 7, 2022
A reference NFT Staking Program & Client for Solana NFTs

This is a reference NFT Staking Program & Client for Solana NFTs. This program is compatible with both Candy Machine v1 and Candy Machine v2 NFTs.

Tracy Adams 73 Dec 19, 2022
Terra liquid staking derivative

Terra liquid staking derivative. Of the community, by the community, for the community.

null 36 Dec 6, 2022
A re-write of polkadot staking miner using subxt to avoid hard dependency to each runtime version

Staking Miner v2 WARNING this library is under active development DO NOT USE IN PRODUCTION. The library is a re-write of polkadot staking miner using

Parity Technologies 19 Dec 28, 2022
An open source, high performance limit order book for the Seaport smart contracts. Implemented in Rust using ethers-rs, this offers a turnkey option for digital asset marketplaces.

Quay Quay is an open source, high performance backend for the Seaport smart contracts. The project is implemented in Rust, using Postgres as a storage

Valorem Labs Inc. 169 Jun 23, 2023
My code for the terra.academy course on CosmWasm smart contracts

CosmWasm Starter Pack This is a template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it. To understan

Alex Incerti 0 Nov 7, 2021