Astar Network is an interoperable blockchain based the Substrate framework and the hub for dApps within the Polkadot Ecosystem

Overview

astar-cover

Integration Action GitHub tag (latest by date) Substrate version License
Twitter URL Twitter URL YouTube Docker Discord Telegram Medium

Astar Network is an interoperable blockchain based the Substrate framework and the hub for dApps within the Polkadot Ecosystem. With Astar Network and Shiden Network, people can stake their tokens to a Smart Contract for rewarding projects that provide value to the network.

This repository only contains custom frame modules, for runtimes and node code please check here.

For contributing to this project, please read our Contribution Guideline.

Versioning Schema

Repository doesn't have a dedicated master branch, instead the main branch is assigned to the branch of active polkadot version, e.g. polkadot-v0.9.13. All deliveries should be made to the default branch unless they are intended for another temporary branch.

When a pallet has been modified (version in .toml is updated), a new release tag must be created. Naming format for the tag is: pallet-name-toml-version/polkadot-version

E.g. pallet-dapps-staking-1.1.2/polkadot-0.9.13.

Further Reading

Comments
  • fixed era length: feature, test, OnRuntimeUpgrade

    fixed era length: feature, test, OnRuntimeUpgrade

    This contains bugfix for fixing era length, related tests, and OnRuntimeUpgrade hooks. Documentation for configuring it for each network is included

    Check list

    • [x] modifies existing feature (bug fix or improvements)
    • [x] tests
    opened by jakehemmerle 8
  • Feature/dapps staking root only registration

    Feature/dapps staking root only registration

    Pull Request Summary Dapps staking root-only contract registration.

    Right now, when devs register a dapp for dapps-staking, they first need to be whitelisted. But only their account is whitelisted, we don’t know exactly which dapp they will deploy. If we make the entire process atomic without developer_pre_approval process, whoever wants to register can specify exactly what the dev account is and which contract will be used. Also, this is required for governance over dapps registration, because RootOrigin call will be scheduled to pallet-scheduler by pallet-democracy once referendums passed.

    Check list

    • [x] added unit tests
    • [ ] updated documentation

    Logs of try-runtime against Shibuya Screen Shot 2022-07-10 at 1 28 20

    opened by shunsukew 7
  • what's the address of the precompiled contract SR25519.sol?

    what's the address of the precompiled contract SR25519.sol?

    Description

    I'm trying to utilize the SR25519.sol interface to verify a sr25519 encrypted message

    I have tried on Shiden at 0x0000000000000000000000000000000000005001 but it threw a VM exception: revert

    bug 
    opened by LaceLetho 6
  • Preparation for staking festival end on Astar

    Preparation for staking festival end on Astar

    Pull Request Summary

    This PR isn't a kill switch :) The purpose is to provide call to disable pallet - this means that users won't be able to stake or claim rewards anymore. Therefore, it is important that all rewards have been claimed prior to putting the pallet into maintenance mode.

    The flow for ending the staking festival is as follows:

    • uprgrade Astar with new runtime (maintenance mode support)
    • claim all pending rewards
    • enable maintenance mode for the pallet
    • unregister all dapps (this will unlock the entire TVL)
    • purge all dapps-staking pallet related DB entries
    • upgrade Astar with new runtime that contains individual claim

    Check list

    • [ ] contains breaking changes
    • [ ] adds new feature
    • [x] modifies existing feature (bug fix or improvements)
    • [ ] relies on other tasks
    • [ ] documentation changes
    • [ ] tests and/or benchmarks are included
    • [ ] changed API client type definition or chain metadata
    opened by Dinonard 5
  • Feature/compound reward

    Feature/compound reward

    Pull Request Summary

    Adds automatic restaking of reward to claim_staker extrinsic by checking the ledger.reward_handling property and staking the claimed amount right after claim.

    Check list

    • [ ] contains breaking changes
    • [X] adds new feature
    • [X] modifies existing feature (bug fix or improvements)
    • [ ] relies on other tasks
    • [ ] documentation changes
    • [X] tests and/or benchmarks are included
    • [ ] changed API client type definition or chain metadata

    This pull request makes the following changes:

    Adds

    • ledger.reward_handling check to claim_staker
    • RewardAndRestake, RewardHandlingChange events
    • enable_compound_staking extrinsic
    • update_staking_values helper function
    • tests to check claiming after unstake or manually switching reward_handling

    Fixes

    • fix assert_claim_staker test utility function to take into account reward_handling state

    Changes

    • claim_staker now checks for reward_handling state, and restakes the claimed value if needed
    • bond_and_stake uses update_staking_values helper function

    To-dos

    • [ ] update docs
    opened by codespool 5
  • Add workaround to reserve transfer native assets

    Add workaround to reserve transfer native assets

    Currently we identify assets being transferred by specifying an H160 style address (XC20), so this prevents us from sending native token since there's no representation for it.

    This PR adds a workaround to interpret address 0x0 as native token to be sent (parents: 0, interior: Here), it can be used to pay for transaction.

    opened by 0x7CFE 4
  • Remove preapproval remnants

    Remove preapproval remnants

    Pull Request Summary

    Removed deprecated pre-approval items from dapps-staking pallet and removed storage cleanup code.

    Once Astar has been upgraded, we should ensure we update to latest astar-frame dependencies.

    opened by Dinonard 4
  • Remove unused storage items

    Remove unused storage items

    Pull Request Summary

    Removes unused storage items from pallet-dapps-staking. We don't need to bring these to Astar chain.

    Migration code was kept for future reference. We can remove it later if needed.

    Check list

    • [ ] contains breaking changes
    • [ ] adds new feature
    • [x] modifies existing feature (bug fix or improvements)
    • [ ] relies on other tasks
    • [ ] documentation changes
    • [ ] tests and/or benchmarks are included
    • [ ] changed API client type definition or chain metadata
    opened by Dinonard 4
  • Fix for incorrect era when compounding

    Fix for incorrect era when compounding

    Pull Request Summary

    Reproduced and fixed issue where incorrect contract era stake is overwritten.

    Check list

    • [ ] contains breaking changes
    • [ ] adds new feature
    • [ ] modifies existing feature (bug fix or improvements)
    • [ ] relies on other tasks
    • [ ] documentation changes
    • [ ] tests and/or benchmarks are included
    • [ ] changed API client type definition or chain metadata

    This pull request makes the following changes:

    opened by Dinonard 3
  • rename plasm and fix links

    rename plasm and fix links

    Pull Request Summary

    Rename plasm to Astar and fix links

    Check list

    • [ ] contains breaking changes
    • [ ] adds new feature
    • [ ] modifies existing feature (bug fix or improvements)
    • [ ] relies on other tasks
    • [x] documentation changes
    • [ ] tests and/or benchmarks are included
    • [ ] changed API client type definition or chain metadata

    This pull request makes the following changes:

    Adds

    • (ex: Add feature A)

    Fixes

    • (ex: Fix validation function)

    Changes

    • (ex: Change document B)

    To-dos

    *Feel free to remove this section if it's not applicable

    • [ ] (ex: add user list)
    opened by Maar-io 3
  • Added Sr25519Precompile

    Added Sr25519Precompile

    Pull Request Summary

    This precompile helps to verify Sr25519 signatures in EVM smart contracts.

    Proposed interface:

    interface SR25519 {
        /**
         * @dev Verify signed message using SR25519 crypto.
         * @return A boolean confirming whether the public key is signer for the message. 
         */
        function verify(
            bytes32 public,
            bytes signature,
            bytes message
        ) external view returns (bool);
    }
    

    Check list

    • [ ] contains breaking changes
    • [x] adds new feature
    • [ ] modifies existing feature (bug fix or improvements)
    • [ ] relies on other tasks
    • [ ] documentation changes
    • [ ] tests and/or benchmarks are included
    • [ ] changed API client type definition or chain metadata

    This pull request makes the following changes:

    Adds

    • (ex: Add feature A)

    Fixes

    • (ex: Fix validation function)

    Changes

    • (ex: Change document B)

    To-dos

    *Feel free to remove this section if it's not applicable

    • [ ] (ex: add user list)
    opened by akru 3
  • update custom pallets' weights

    update custom pallets' weights

    Pull Request Summary Optimize custom pallets' weights by using benchmark machine as is already done for DappsStaking pallets https://github.com/AstarNetwork/astar-frame/pull/122

    Target pallets

    • block_rewards
    • xc_asset_config
    • collator_selection

    Machine spec used

    Hardware
    CPU
    Intel Xeon-E 2136 - 6c/12t - 3.3 GHz/4.5 GHz
    RAM
    32 GB ECC 2666 MHz
    
    Data disks
    2×500 GB SSD NVMe
    
    Expansion cards
    Soft RAID
    

    machine bench result

    2022-12-19 07:35:38 Running machine benchmarks...    
    2022-12-19 07:36:04 
    +----------+----------------+--------------+--------------+-------------------+
    | Category | Function       | Score        | Minimum      | Result            |
    +=============================================================================+
    | CPU      | BLAKE2-256     | 1.01 GiB/s   | 1.00 GiB/s   | ✅ Pass (100.1 %) |
    |----------+----------------+--------------+--------------+-------------------|
    | CPU      | SR25519-Verify | 658.82 KiB/s | 666.00 KiB/s | ✅ Pass ( 98.9 %) |
    |----------+----------------+--------------+--------------+-------------------|
    | Memory   | Copy           | 14.51 GiB/s  | 14.32 GiB/s  | ✅ Pass (101.3 %) |
    |----------+----------------+--------------+--------------+-------------------|
    | Disk     | Seq Write      | 1.36 GiB/s   | 450.00 MiB/s | ✅ Pass (310.4 %) |
    |----------+----------------+--------------+--------------+-------------------|
    | Disk     | Rnd Write      | 497.77 MiB/s | 200.00 MiB/s | ✅ Pass (248.9 %) |
    +----------+----------------+--------------+--------------+-------------------+
    From 5 benchmarks in total, 5 passed and 0 failed (10% fault tolerance).    
    2022-12-19 07:36:04 The hardware meets the requirements
    
    opened by shunsukew 2
  • EVM tracing modules

    EVM tracing modules

    Pull Request Summary

    This PR implements following EVM tracing RPC methods:

    • debug_traceTransaction
    • debug_traceBlockByHash
    • trace_filter

    Check list

    • [ ] added unit tests
    • [ ] updated documentation
    opened by akru 0
  • FreeBalance as default reward destination

    FreeBalance as default reward destination

    Pull Request Summary

    Prevents a potential scenario where user would make reward claiming impossible without first having something staked.

    Check list

    • [x] added unit tests
    opened by Dinonard 1
  • XVM - WASM - estimated gas too high

    XVM - WASM - estimated gas too high

    Description

    When I want to do an XVM call using XVM chain-extension in a wasm contract. the estimated gas is too high (and execute button is grayed - thus impossible to execute the tx). When I edit this estimated gas and reduce it from 500% to 50% the call works. so it is an estimated gas issue only.

    Screenshot from 2022-11-02 10-59-11

    bug 
    opened by PierreOssun 1
  • Extend the `api.query.assets.metadata` provided on-chain

    Extend the `api.query.assets.metadata` provided on-chain

    By adding the extra metadata needed, we are:

    • making it simpler to add assets to our XCM bridge UI dapp, by removing the extra step of also making a PR to add to a config
    • providing all on-chain information needed for a 3rd party to facilitate the creation of their own UI

    Currently exposed metadata: image

    Fields needed by the current dapp: image

    opened by gluneau 0
  • `RmrkCore::change_collection_issuer` unable to be applied to ink! contracts

    `RmrkCore::change_collection_issuer` unable to be applied to ink! contracts

    RmrkCore::change_collection_issuer requires permission in order to accept ownership - set_accept_ownership via the Uniques pallet.

    A chain-extension exposing Uniques::set_accept_ownership is required in order for an ink! contract to be able to call this function.

    opened by boyswan 1
Releases(pallet-dapps-staking-2.0.0/polkadot-0.9.13)
Owner
Astar Network (Plasm)
Astar is the Polkadot-native dApp hub supporting Ethereum, WebAssembly, dApp Staking, and Layer2 solutions. This is the old org page
Astar Network (Plasm)
Shade Protocol is an array of connected privacy-preserving dApps built on Secret Network

Shade Protocol Core Contracts Contract Reference Description mint doc Handles asset burning and silk minting oracle doc Handles asset price queries tr

Secure Secrets 58 Nov 15, 2022
The Graph is a protocol for building decentralized applications (dApps) quickly on Ethereum and IPFS using GraphQL.

Graph Node The Graph is a protocol for building decentralized applications (dApps) quickly on Ethereum and IPFS using GraphQL. Graph Node is an open s

Mindy.wang 2 Jun 18, 2022
Computational Component of Polkadot Network

Gear is a new Polkadot/Kusama parachain and most advanced L2 smart-contract engine allowing anyone to launch any dApp for networks with untrusted code.

null 145 Dec 19, 2022
Examples of interacting with a Polkadot node using Rust

Examples of interacting with a Polkadot node Some examples of using JSON RPC to interact with a Polkadot node, working up to manually building and sub

Parity Technologies 15 Dec 21, 2022
Docker containers on a synthetic network. Run applications in a context that lets you manipulate their network conditions.

Synthetic Network Docker containers on a synthetic network. Run applications in a context that lets you manipulate their network conditions. Dependenc

Daily 58 Dec 15, 2022
A simple configuration-based module for inter-network RPC in Holochain hApps.

DNA Auth Resolver A simple configuration-based module for inter-network RPC in Holochain hApps. About Usage In the origin zome In the destination DNA

Shadman Baig 0 Feb 4, 2022
The Stacks 2.0 blockchain implementation

Stacks 2.0 Reference implementation of the Stacks blockchain in Rust. Stacks 2.0 is a layer-1 blockchain that connects to Bitcoin for security and ena

Stacks 2.7k Dec 31, 2022
A simple message based networking library for the bevy framework

Spicy Networking for Bevy bevy_spicy_networking is a solution to the "How do I connect multiple clients to a single server" problem in your bevy games

Cabbit Studios 67 Jan 1, 2023
The Safe Network Core. API message definitions, routing and nodes, client core api.

safe_network The Safe Network Core. API message definitions, routing and nodes, client core api. License This Safe Network repository is licensed unde

MaidSafe 101 Dec 19, 2022
Network Block Storage server, written in Rust. Supports pluggable and chainable underlying storage

nbd-rs Disclaimer DO NEVER USE THIS FOR PRODUCTION Do not use this for any data that you cannot afford to lose any moment. Expect data loss, corruptio

Rainlab Inc 10 Sep 30, 2022
Fast and easy-to-use event-driven network library.

message-io is a fast and easy-to-use event-driven network library. The library handles the OS socket internally and offers a simple event message API

Luis Enrique Muñoz Martín 830 Jan 3, 2023
A decentralized, censorship-resistant, and incentive-compatible packet-routing overlay network

About Earendil is a decentralized, censorship-resistant packet-routing overlay network designed for performance and censorship resistance. It enables

Eric Tung (Yuhao Dong) 8 Jun 24, 2023
Network simulation in Rust

netsim - A Rust library for network simulation and testing (currently linux-only). netsim is a crate for simulating networks for the sake of testing n

Andrew Cann 115 Dec 15, 2022
A private network system that uses WireGuard under the hood.

innernet A private network system that uses WireGuard under the hood. See the announcement blog post for a longer-winded explanation. innernet is simi

Tonari, Inc 4.1k Dec 29, 2022
A Curve-like AMM for Secret Network

A Curve-like AMM for Secret Network. Supports a varibale number of tokens with the same underlying value.

Enigma 16 Dec 11, 2022
A multi-protocol network relay

A multi-protocol network relay

zephyr 43 Dec 13, 2022
A Rust library for parsing the SOME/IP network protocol (without payload interpretation).

someip_parse A Rust library for parsing the SOME/IP network protocol (without payload interpretation). Usage Add the following to your Cargo.toml: [de

Julian Schmid 18 Oct 31, 2022
Official Implementation of Findora Network.

Findora Platform Wiki Contribution Guide Licensing The primary license for Platform is the Business Source License 1.1 (BUSL-1.1), see LICENSE. Except

Findora Foundation 61 Dec 9, 2022
Simple in-network file transfer with barely any overhead.

fftp fftp is the "Fast File Transport Protocol". It transfers files quickly between computers on a network with low overhead. Motivation FTP uses two

leo 4 May 12, 2022