Skip to content

Commit

Permalink
chore: move packages to 1.5.0. removing backtrace feature, and upgrad…
Browse files Browse the repository at this point in the history
…ing to syn2
  • Loading branch information
PFC-developer committed Mar 26, 2024
1 parent eb981bb commit 1b421f5
Show file tree
Hide file tree
Showing 20 changed files with 114 additions and 73 deletions.
23 changes: 13 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ members = [
resolver = "2"

[workspace.package]
version = "1.4.0"
version = "1.5.0"
authors = ["PFC <[email protected]>"]
edition = "2021"
rust-version = "1.73.0"
Expand Down Expand Up @@ -49,26 +49,29 @@ serde_json = "1.0.113"
schemars = { version = "0.8.16" }
proc-macro2 = "1.0.51"
quote = "1.0.23"
syn = "1.0.108"
syn = "2.0.55"
#syn = "1.0.108"
thiserror = "1.0.57"
kujira = "0.8.2"
pfc-whitelist-derive = { version = "1.4.0", path = "packages/pfc-whitelist-derive" }
pfc-whitelist = { version = "1.4.0", path = "packages/pfc-whitelist" }
pfc-fee-split = { version = "1.4.0", path = "packages/pfc-fee-split" }
pfc-dust-collector-derive = { version = "1.4.0", path = "packages/pfc-dust-collector-derive" }
pfc-dust-collector = { version = "1.4.0", path = "packages/pfc-dust-collector" }
kujira = "1.0.1"
pfc-whitelist-derive = { path = "packages/pfc-whitelist-derive" }
pfc-whitelist = { path = "packages/pfc-whitelist" }
pfc-fee-split = { path = "packages/pfc-fee-split" }
pfc-dust-collector-derive = { path = "packages/pfc-dust-collector-derive" }
pfc-dust-collector = { path = "packages/pfc-dust-collector" }
pfc-dust-collector-kujira = { path = "packages/pfc-dust-collector-kujira" }
pfc-dust-collector-migaloo = { path = "packages/pfc-dust-collector-migaloo" }
pfc-treasurechest = { path = "packages/pfc-treasurechest" }
pfc-vault={path="packages/pfc-vault"}

pfc-steak = "3.0.8"
pfc-steak = "3.0.12"
getrandom = { version = "0.2", features = ["js"] }
prost = { version = "0.12.3", default-features = false, features = ["prost-derive"] }
prost-types = { version = "0.12.3", default-features = false }
#osmosis-std-derive = "0.20.1"
osmosis-std-derive = "0.15.3"
#osmosis-std-derive = {version = "0.20.1", features = ["backtraces"]}
protobuf = { version = "3.3.0", features = ["with-bytes"] }
cw-multi-test = { version="0.20.0" , features = ["cosmwasm_1_2"]}
cw-multi-test = { version = "0.20.0", features = ["cosmwasm_1_2"] }
[profile.release]
opt-level = 3
debug = false
Expand Down
8 changes: 4 additions & 4 deletions artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
3d74986751e5ffaee368e2fef48600a2cec7475cf34180bf4416f0bf38f7511b pfc_astroport_generator.wasm
f40384b425a086157d897484ba4848730e2a860304cf09b77b5dc6d6727165e6 pfc_dust_collector_kujira_contract-aarch64.wasm
7403339ec6e0f3b87b4525d9afb529f79f567d427bfaa158fe32a54d7cb8ce31 pfc_dust_collector_kujira_contract-aarch64.wasm
c4a5ace2aa59107cc900b9ed73c470f704d2aad332c42cd12704cbd2b14c8ef3 pfc_dust_collector_kujira_contract.wasm
65054d14e4423b2d4d584056b339951aeb790dea6fbb01a88276140d0f2505e2 pfc_fee_splitter-aarch64.wasm
a45b6337b72148a9f4c15b43ef9a896a1b05ea3f0c7f96c8b26dfcfef5f0551b pfc_fee_splitter-aarch64.wasm
16b8a6c60398f456080519fb7230f8c7ea9eec74da266942ad974de0b6bfff36 pfc_fee_splitter.wasm
d00b5a161862ed6af08bfd3dbf9129619a71cb6ba40afd77d540f69e949922c5 pfc_treasurechest_contract-aarch64.wasm
68ee202f3e5f57ba1fa146b1d51aef6efdc42add64e1051b68a8a48d6735031e pfc_treasurechest_contract-aarch64.wasm
b8009a8b92383848dd4ad6d7df30c03a22811a5f8d98dda8c4ea6847457b6550 pfc_treasurechest_contract.wasm
ee9bfeaa6603379426f493e96f0f8916a6fe4ad7d6bb354e8b649b9d785a4382 pfc_vault_contract-aarch64.wasm
8552572b68e768a1706a99c956c7bc60359d567ca4ed009b19dc5c7ede85450e pfc_vault_contract-aarch64.wasm
6f7a425ef645219f585ff762033f43b47900f33920f56f5827d281da5e1fab19 pfc_vault_contract.wasm
2 changes: 1 addition & 1 deletion contracts/pfc-dust-collector-kujira/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ crate-type = ["cdylib", "rlib"]

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all init/handle/query exports
library=[]

Expand Down
4 changes: 2 additions & 2 deletions contracts/pfc-dust-collector-migaloo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ crate-type = ["cdylib", "rlib"]

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all init/handle/query exports
library=[]

Expand All @@ -34,7 +34,7 @@ cw2 = { workspace = true }

pfc-fee-split = { workspace = true }
cosmwasm-std = { workspace = true }
cw-storage-plus = "1.0.1"
cw-storage-plus ={workspace=true}

cosmwasm-schema = { workspace = true }
schemars = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions contracts/pfc-fee-splitter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ crate-type = ["cdylib", "rlib"]

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all init/handle/query exports
library=[]

Expand All @@ -35,7 +35,7 @@ cw2 = { workspace = true }
cw-item-set ={ workspace = true }
pfc-fee-split ={ workspace = true }
cosmwasm-std = { workspace = true }
cw-storage-plus = "1.0.1"
cw-storage-plus ={ workspace = true }
cw-controllers = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion contracts/pfc-treasurechest-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ crate-type = ["cdylib", "rlib"]
[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-std = { workspace = true, features = ["cosmwasm_1_3"] }
Expand Down
44 changes: 22 additions & 22 deletions contracts/pfc-vault-contract/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[package]
name = "pfc-vault-contract"
version ={ workspace = true }
authors = ["PFC","Valkyrie Protocol"]
version = { workspace = true }
authors = ["PFC", "Valkyrie Protocol"]
edition = { workspace = true }
description = "modified by PFC. Originally A Staking contract for Valkyrie Protocol - distribute rewards to stakers"
license ={ workspace = true }
repository ={ workspace = true }
license = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
documentation = { workspace = true }

exclude = [
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
"contract.wasm",
"hash.txt",
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
"contract.wasm",
"hash.txt",
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -21,26 +21,26 @@ exclude = [
crate-type = ["cdylib", "rlib"]


[features]
#[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-std = { version = "1.0.0" }
cosmwasm-std = { workspace = true }
#getrandom is here so cw-storage-plus can build on wasm.
getrandom = { version = "0.2", features = ["js"] }
cw-storage-plus = { version = "1.0.0", features = ["iterator"] }
cw2 = "1.0.0"
cw20 = "1.0.0"
cw-controllers = "1.0.0"
pfc-vault = { path = "../../packages/pfc-vault" }
schemars = { version = "0.8.10" }
serde = { version = "1.0.147", default-features = false, features = ["derive"] }

getrandom = { workspace = true }
#getrandom = { version = "0.2", features = ["js"] }
cw-storage-plus = { workspace = true }
cw2 = { workspace = true }
cw20 = { workspace = true }
cw-controllers = { workspace = true }
pfc-vault = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
#serde_json = "1.0.89"
thiserror = "1.0.37"
thiserror = { workspace = true }

[dev-dependencies]
cosmwasm-schema = { version = "1.0.0" }
cosmwasm-storage = { version = "1.1.6", features = ["iterator"] }
cosmwasm-schema = { workspace = true }
cosmwasm-storage = { workspace = true }
4 changes: 2 additions & 2 deletions notes/notes_harpoon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
### FEE SPLIT
###
kujirad tx wasm store ./artifacts/pfc_fee_splitter.wasm --from andromeda-pfc-testnet --yes --gas-prices 0.00125ukuji --gas-adjustment 1.7 --gas auto
# feesplit -2528
# feesplit -2528/3248
json=$(cat ./test_files/harpoon_instantiate_feesplit.json)
kujirad tx wasm instantiate 2528 "${json}" --admin kujira1wpayju4jcn2mhv6yewclf6rcq9fyqzvasa2s9m --label pfc-feesplit --from andromeda-pfc-testnet --gas-prices 0.00125ukuji --gas-adjustment 1.7 --gas auto
# kujira1nd3yn5ztn3dl2l7w4h4xelglls08ns5uz6wq8x08t47lh44md7rqvng8h5
kujirad tx wasm migrate kujira1nd3yn5ztn3dl2l7w4h4xelglls08ns5uz6wq8x08t47lh44md7rqvng8h5 2528 '{}' --from andromeda-pfc-testnet --gas-prices 0.00125ukuji --gas-adjustment 1.7 --gas auto
kujirad tx wasm migrate kujira1nd3yn5ztn3dl2l7w4h4xelglls08ns5uz6wq8x08t47lh44md7rqvng8h5 3248 '{}' --from andromeda-pfc-testnet --gas-prices 0.00125ukuji --gas-adjustment 1.7 --gas auto

###
### DUST COLLECTOR
Expand Down
18 changes: 18 additions & 0 deletions notes/notes_osmosis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


osmosisd tx wasm store ./artifacts/pfc_fee_splitter.wasm \
--from osmo1ezgx7dhm2zag0lplje68j47cx9e8nft44k9f07r7qp7m7uc5u8ysn482ps \
--yes --gas-prices 0.025uosmo --gas-adjustment 1.7 --gas auto --generate-only > prepared-tx.json

osmosisd tx authz exec prepared-tx.json --from pfc-alt --gas auto --gas-adjustment 1.3 --gas-prices 0.02uosmo
# code-id 549


json=$(cat test_files/osmosis_instantiate_feesplit.json)

osmosisd tx wasm instantiate 549 "${json}" --admin osmo1lu92zj8q6cmrptu09rp3343x9969r9qr4w9r7h --label bosmo-feesplit-1 --from boneLunaAdmin --gas-prices 0.025uosmo --gas-adjustment 1.7 --gas auto --amount 1000000uosmo

fee_address="osmo1ctrfxgxdjqgd0usaepzdan2razpd3sge7jvckakh036yzm24ymgsnktjf8"


osmosisd query wasm cs smart $fee_address '{"allocations":{}}'
2 changes: 1 addition & 1 deletion packages/pfc-astroport_reward_holder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ homepage = "https://PFC.zone"
[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
serde = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions packages/pfc-dust-collector-derive/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use proc_macro::TokenStream;
use quote::quote;
use syn::{parse_macro_input, AttributeArgs, DataEnum, DeriveInput};
use syn::{parse_macro_input, DataEnum, DeriveInput, Attribute};

/// Merges the variants of two enums.
///
Expand All @@ -10,7 +10,7 @@ use syn::{parse_macro_input, AttributeArgs, DataEnum, DeriveInput};
fn merge_variants(metadata: TokenStream, left: TokenStream, right: TokenStream) -> TokenStream {
use syn::Data::Enum;

let args = parse_macro_input!(metadata as AttributeArgs);
let args = parse_macro_input!(metadata with Attribute::parse_outer);// AttributeArgs);
if let Some(first_arg) = args.first() {
return syn::Error::new_spanned(first_arg, "macro takes no arguments")
.to_compile_error()
Expand Down
2 changes: 1 addition & 1 deletion packages/pfc-dust-collector-kujira/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rust-version = { workspace = true }


[features]
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-std = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion packages/pfc-dust-collector-migaloo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ keywords = { workspace = true }
rust-version = { workspace = true }

[features]
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-std = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion packages/pfc-dust-collector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords = { workspace = true }
rust-version = { workspace = true }

[features]
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-std = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion packages/pfc-fee-split/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rust-version = { workspace = true }


[features]
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-std = { workspace = true }
Expand Down
8 changes: 4 additions & 4 deletions packages/pfc-treasurechest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ rust-version = { workspace = true }
[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
serde = {workspace=true}
schemars = {workspace=true }
serde = { workspace = true }
schemars = { workspace = true }

cosmwasm-std = { workspace = true }
thiserror = { workspace = true }
Expand All @@ -27,6 +27,6 @@ cw-ownable-derive = { workspace = true }
cosmwasm-schema = { workspace = true }
prost = { workspace = true }
prost-types = { workspace = true }
osmosis-std-derive = {workspace=true}
osmosis-std-derive = { workspace = true }
[dev-dependencies]
protobuf = { workspace = true }
28 changes: 14 additions & 14 deletions packages/pfc-vault/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
[package]
name = "pfc-vault"
version = "0.3.0"
authors = ["PFC","Valkyrie Protocol"]
edition = "2021"
version = { workspace = true }
authors = ["PFC", "Valkyrie Protocol"]
edition = { workspace = true }
description = "Definition and types for the Valkyrie"
license = "Apache-2.0"
repository = "https://github.com/PFC-Validator/PFC-fee-split"
homepage = "https://PFC.zone"
license = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
serde = { version = "1.0.147", default-features = false, features = ["derive"] }
schemars = { version = "0.8.10" }
cosmwasm-std = { version = "1.0.0" }
serde = { workspace = true }
schemars = { workspace = true }
cosmwasm-std = { workspace = true }
#cw-storage-plus = { version = "1.0.0", features = ["iterator"] }
cw20 = { version = "1.0.0" }
thiserror = "1.0.37"
cw-controllers = "1.0.0"
cw20 = { workspace = true }
thiserror = { workspace = true }
cw-controllers = { workspace = true }

[dev-dependencies]
cosmwasm-schema = { version = "1.0.0" }
cosmwasm-schema = { workspace = true }
#cosmwasm-storage = { version = "1.0.0", features = ["iterator"] }
4 changes: 2 additions & 2 deletions packages/pfc-whitelist-derive/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use proc_macro::TokenStream;
use quote::quote;
use syn::{parse_macro_input, AttributeArgs, DataEnum, DeriveInput};
use syn::{parse_macro_input, Attribute, DataEnum, DeriveInput};

/// Merges the variants of two enums.
///
Expand All @@ -10,7 +10,7 @@ use syn::{parse_macro_input, AttributeArgs, DataEnum, DeriveInput};
fn merge_variants(metadata: TokenStream, left: TokenStream, right: TokenStream) -> TokenStream {
use syn::Data::Enum;

let args = parse_macro_input!(metadata as AttributeArgs);
let args = parse_macro_input!(metadata with Attribute::parse_outer);
if let Some(first_arg) = args.first() {
return syn::Error::new_spanned(first_arg, "macro takes no arguments")
.to_compile_error()
Expand Down
4 changes: 2 additions & 2 deletions packages/pfc-whitelist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rust-version = { workspace = true }
[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
#backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-std = { workspace = true }
Expand All @@ -23,5 +23,5 @@ serde = { workspace = true }
pfc-whitelist-derive = { workspace = true }
cosmwasm-schema = { workspace = true }
# cw-address-like = "1.0.3"
cw-storage-plus = "1.0.1"
cw-storage-plus = { workspace=true }
thiserror = { workspace = true }
20 changes: 20 additions & 0 deletions test_files/osmosis_instantiate_feesplit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "pfc-fee-split",
"gov_contract": "osmo1lu92zj8q6cmrptu09rp3343x9969r9qr4w9r7h",
"allocation": [
{
"name": "admin",
"allocation": 1,
"send_after": {
"denom": "uosmo",
"amount": "1000000"
},
"send_type": {
"Wallet": {
"receiver": "osmo1lu92zj8q6cmrptu09rp3343x9969r9qr4w9r7h"
}
}
}
]
}

0 comments on commit 1b421f5

Please sign in to comment.