-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add licenses * Add remark about LGPL-3.0 licensing by Gnosis
- Loading branch information
1 parent
d0a07a5
commit 45aeeb8
Showing
24 changed files
with
355 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,14 @@ | |
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Zeitgeist. If not, see <https://www.gnu.org/licenses/>. | ||
// | ||
// This file incorporates work licensed under the GNU Lesser General | ||
// Public License 3.0 but published without copyright notice by Gnosis | ||
// (<https://gnosis.io>, [email protected]) in the | ||
// conditional-tokens-contracts repository | ||
// <https://github.com/gnosis/conditional-tokens-contracts>, | ||
// and has been relicensed under GPL-3.0-or-later in this repository. | ||
|
||
|
||
// TODO Refactor so that collection IDs are their own type with an `Fq` field and an `odd` field? | ||
|
||
|
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,5 +1,4 @@ | ||
#[cfg(feature = "parachain")] | ||
use zeitgeist_primitives::types::{Asset, MarketId}; | ||
// Copyright 2024 Forecasting Technologies LTD. | ||
|
||
#[cfg(feature = "parachain")] | ||
pub(crate) const FOREIGN_ASSET: Asset<MarketId> = Asset::ForeignAsset(1); |
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
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
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
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
25 changes: 24 additions & 1 deletion
25
zrml/combinatorial-tokens/src/traits/combinatorial_id_manager.rs
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,4 +1,27 @@ | ||
use alloc::vec::Vec; | ||
// Copyright 2024 Forecasting Technologies LTD. | ||
// | ||
// This file is part of Zeitgeist. | ||
// | ||
// Zeitgeist is free software: you can redistribute it and/or modify it | ||
// under the terms of the GNU General Public License as published by the | ||
// Free Software Foundation, either version 3 of the License, or (at | ||
// your option) any later version. | ||
// | ||
// Zeitgeist is distributed in the hope that it will be useful, but | ||
// WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
// General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Zeitgeist. If not, see <https://www.gnu.org/licenses/>. | ||
// | ||
// This file incorporates work licensed under the GNU Lesser General | ||
// Public License 3.0 but published without copyright notice by Gnosis | ||
// (<https://gnosis.io>, [email protected]) in the | ||
// conditional-tokens-contracts repository | ||
// <https://github.com/gnosis/conditional-tokens-contracts>, | ||
// and has been relicensed under GPL-3.0-or-later in this repository. | ||
|
||
|
||
pub trait CombinatorialIdManager { | ||
type Asset; | ||
|
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,18 @@ | ||
mod combinatorial_id_manager; | ||
// Copyright 2024 Forecasting Technologies LTD. | ||
// | ||
// This file is part of Zeitgeist. | ||
// | ||
// Zeitgeist is free software: you can redistribute it and/or modify it | ||
// under the terms of the GNU General Public License as published by the | ||
// Free Software Foundation, either version 3 of the License, or (at | ||
// your option) any later version. | ||
// | ||
// Zeitgeist is distributed in the hope that it will be useful, but | ||
// WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
// General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Zeitgeist. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
pub use combinatorial_id_manager::CombinatorialIdManager; |
25 changes: 23 additions & 2 deletions
25
zrml/combinatorial-tokens/src/types/cryptographic_id_manager/decompressor/mod.rs
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,5 +1,26 @@ | ||
/// Highest/lowest bit always refers to the big endian representation of each bit sequence. | ||
mod tests; | ||
// Copyright 2024 Forecasting Technologies LTD. | ||
// | ||
// This file is part of Zeitgeist. | ||
// | ||
// Zeitgeist is free software: you can redistribute it and/or modify it | ||
// under the terms of the GNU General Public License as published by the | ||
// Free Software Foundation, either version 3 of the License, or (at | ||
// your option) any later version. | ||
// | ||
// Zeitgeist is distributed in the hope that it will be useful, but | ||
// WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
// General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Zeitgeist. If not, see <https://www.gnu.org/licenses/>. | ||
// | ||
// This file incorporates work licensed under the GNU Lesser General | ||
// Public License 3.0 but published without copyright notice by Gnosis | ||
// (<https://gnosis.io>, [email protected]) in the | ||
// conditional-tokens-contracts repository | ||
// <https://github.com/gnosis/conditional-tokens-contracts>, | ||
// and has been relicensed under GPL-3.0-or-later in this repository. | ||
|
||
use ark_bn254::{g1::G1Affine, Fq}; | ||
use ark_ff::{BigInteger, PrimeField}; | ||
|
18 changes: 16 additions & 2 deletions
18
...-tokens/src/types/cryptographic_id_manager/decompressor/tests/decompress_collection_id.rs
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
18 changes: 16 additions & 2 deletions
18
...inatorial-tokens/src/types/cryptographic_id_manager/decompressor/tests/decompress_hash.rs
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
18 changes: 16 additions & 2 deletions
18
...atorial-tokens/src/types/cryptographic_id_manager/decompressor/tests/get_collection_id.rs
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
18 changes: 16 additions & 2 deletions
18
...ial-tokens/src/types/cryptographic_id_manager/decompressor/tests/matching_y_coordinate.rs
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
17 changes: 16 additions & 1 deletion
17
zrml/combinatorial-tokens/src/types/cryptographic_id_manager/decompressor/tests/mod.rs
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
18 changes: 16 additions & 2 deletions
18
...natorial-tokens/src/types/cryptographic_id_manager/decompressor/tests/pow_magic_number.rs
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
Oops, something went wrong.