generated from uinb/barnacle
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bump v0.9.30-mainnet.203
- Loading branch information
Showing
16 changed files
with
1,709 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# v0.9.30-mainnet.203 | ||
|
||
- enable abyssworld betting | ||
|
||
# v0.9.30-mainnet.202 | ||
|
||
- hot fix tournament | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
[package] | ||
name = "pallet-abyss-mall" | ||
version = "4.0.2" | ||
authors = ["UINB Tech"] | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
homepage = "https://www.fusotao.org" | ||
repository = "https://github.com/uinb/fusotao" | ||
description = "abyssworld mall pallet" | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
||
[dependencies] | ||
codec = { default-features = false, features = ['derive'], package = 'parity-scale-codec', version = '3.0.0' } | ||
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } | ||
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.30" } | ||
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.30" } | ||
frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.30"} | ||
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.30" } | ||
ascii = { version = "1.0", default-features = false } | ||
log = { version = "0.4.14", default-features = false } | ||
serde = { default-features = false, version = "1.0.126" } | ||
base64 = {version = "0.13.1", default-features = false } | ||
chrono = {version = "0.4.26", default-features = false } | ||
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.30" } | ||
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.30" } | ||
pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.30" } | ||
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.30" } | ||
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.30" } | ||
fuso-support = { path = "../fuso-support", default-features = false } | ||
pallet-chainbridge = { path = "../chainbridge", default-features = false } | ||
|
||
[dev-dependencies] | ||
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.30" } | ||
pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.30" } | ||
pallet-fuso-verifier = {path = "../verifier", default-features = false } | ||
pallet-fuso-token = {path = "../token", default-features = false } | ||
pallet-fuso-indicator = {path = "../indicator", default-features = false } | ||
hex = "0.4.3" | ||
[features] | ||
default = ['std'] | ||
std = [ | ||
'codec/std', | ||
'frame-support/std', | ||
'frame-system/std', | ||
'frame-benchmarking/std', | ||
'sp-std/std', | ||
'sp-core/std', | ||
'sp-io/std', | ||
'sp-runtime/std', | ||
'pallet-fuso-token/std', | ||
'pallet-fuso-verifier/std', | ||
'chrono/std' | ||
] | ||
runtime-benchmarks = [ | ||
'frame-benchmarking', | ||
'frame-support/runtime-benchmarks', | ||
'frame-system/runtime-benchmarks', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// Copyright 2021-2023 UINB Technologies Pte. Ltd. | ||
|
||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#![cfg_attr(not(feature = "std"), no_std)] | ||
pub use pallet::*; | ||
|
||
#[frame_support::pallet] | ||
pub mod pallet { | ||
use ascii::AsciiStr; | ||
use chrono::NaiveDateTime; | ||
use frame_support::traits::fungibles::Mutate; | ||
use frame_support::traits::{tokens::BalanceConversion, Time}; | ||
use frame_support::{pallet_prelude::*, transactional}; | ||
use frame_system::pallet_prelude::*; | ||
use fuso_support::chainbridge::*; | ||
use fuso_support::traits::{DecimalsTransformer, PriceOracle, ReservableToken, Token}; | ||
use pallet_chainbridge as bridge; | ||
use sp_core::bounded::BoundedBTreeMap; | ||
use sp_runtime::traits::{TrailingZeroInput, Zero}; | ||
use sp_runtime::Perquintill; | ||
use sp_std::vec; | ||
use sp_std::vec::Vec; | ||
|
||
type BalanceOf<T> = <<T as bridge::Config>::Fungibles as Token< | ||
<T as frame_system::Config>::AccountId, | ||
>>::Balance; | ||
|
||
type AssetId<T> = <<T as bridge::Config>::Fungibles as Token< | ||
<T as frame_system::Config>::AccountId, | ||
>>::TokenId; | ||
|
||
#[pallet::config] | ||
pub trait Config: frame_system::Config + bridge::Config { | ||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; | ||
|
||
type Assets: ReservableToken<Self::AccountId>; | ||
|
||
type BalanceConversion: BalanceConversion<BalanceOf<Self>, AssetId<Self>, BalanceOf<Self>>; | ||
|
||
#[pallet::constant] | ||
type AwtTokenId: Get<AssetId<Self>>; | ||
} | ||
|
||
#[pallet::event] | ||
#[pallet::generate_deposit(pub (super) fn deposit_event)] | ||
pub enum Event<T: Config> {} | ||
|
||
#[pallet::error] | ||
pub enum Error<T> {} | ||
|
||
#[pallet::pallet] | ||
#[pallet::without_storage_info] | ||
#[pallet::generate_store(pub (super) trait Store)] | ||
pub struct Pallet<T>(_); | ||
|
||
#[pallet::hooks] | ||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {} | ||
|
||
#[pallet::call] | ||
impl<T: Config> Pallet<T> { | ||
#[transactional] | ||
#[pallet::weight(195_000_000)] | ||
pub fn stake_awt( | ||
origin: OriginFor<T>, | ||
awt_amount: BalanceOf<T>, | ||
days: u16, | ||
) -> DispatchResultWithPostInfo { | ||
let who = ensure_signed(origin)?; | ||
Ok(().into()) | ||
} | ||
} | ||
} |
Oops, something went wrong.