Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ silent: true

vars:
COSMWASM_CHECK_VERSION: 3.0.1
TOOLCHAIN: +1.82.0
TOOLCHAIN: +1.88.0

tasks:

Expand All @@ -26,10 +26,10 @@ tasks:
desc: Installs cosmwasm-check tool (released version and currently developed version)
cmds:
# Install recently released cosmwasm-check and rename it to cosmwasm-check-release
- cmd: cargo +1.88.0 install cosmwasm-check@{{.COSMWASM_CHECK_VERSION}} --locked --force
- cmd: cargo {{.TOOLCHAIN}} install cosmwasm-check@{{.COSMWASM_CHECK_VERSION}} --locked --force
- cmd: mv ~/.cargo/bin/cosmwasm-check ~/.cargo/bin/cosmwasm-check-release
# Install currently developed version of cosmwasm-check
- cmd: cargo +1.88.0 install --path ./packages/check --locked --force
- cmd: cargo {{.TOOLCHAIN}} install --path ./packages/check --locked --force

check-contracts:
desc: Performs checks for all contracts
Expand Down Expand Up @@ -58,3 +58,13 @@ tasks:
cmds:
- cmd: cargo clean
- cmd: ./devtools/clean-contracts.sh

test:
desc: Runs all tests
cmds:
- task: test-cosmwasm-core

test-cosmwasm-core:
desc: Runs tests for cosmwasm-core
cmds:
- cmd: cargo {{.TOOLCHAIN}} test -p cosmwasm-core
31 changes: 31 additions & 0 deletions packages/core/tests/test_bls12_381.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
use cosmwasm_core::{
BLS12_381_G1_GENERATOR, BLS12_381_G1_POINT_LEN, BLS12_381_G2_GENERATOR, BLS12_381_G2_POINT_LEN,
};

#[test]
fn ensure_lengths() {
assert_eq!(BLS12_381_G1_POINT_LEN, 48);
assert_eq!(BLS12_381_G2_POINT_LEN, 96);
}

#[test]
fn ensure_generators() {
assert_eq!(
BLS12_381_G1_GENERATOR,
[
151, 241, 211, 167, 49, 151, 215, 148, 38, 149, 99, 140, 79, 169, 172, 15, 195, 104,
140, 79, 151, 116, 185, 5, 161, 78, 58, 63, 23, 27, 172, 88, 108, 85, 232, 63, 249,
122, 26, 239, 251, 58, 240, 10, 219, 34, 198, 187,
]
);
assert_eq!(
BLS12_381_G2_GENERATOR,
[
147, 224, 43, 96, 82, 113, 159, 96, 125, 172, 211, 160, 136, 39, 79, 101, 89, 107, 208,
208, 153, 32, 182, 26, 181, 218, 97, 187, 220, 127, 80, 73, 51, 76, 241, 18, 19, 148,
93, 87, 229, 172, 125, 5, 93, 4, 43, 126, 2, 74, 162, 178, 240, 143, 10, 145, 38, 8, 5,
39, 45, 197, 16, 81, 198, 228, 122, 212, 250, 64, 59, 2, 180, 81, 11, 100, 122, 227,
209, 119, 11, 172, 3, 38, 168, 5, 187, 239, 212, 128, 86, 200, 193, 33, 189, 184,
]
);
}