Skip to content

Commit

Permalink
Merge pull request #4 from discoverdefiteam/v0.3.0-mainnet
Browse files Browse the repository at this point in the history
v0.3.0 mainnet prep
  • Loading branch information
discoverdefiteam authored Dec 4, 2023
2 parents 2cc333d + c099234 commit f059f79
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 61 deletions.
103 changes: 52 additions & 51 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.2.1"
version = "0.3.0"
edition = "2021"
homepage = "https://terp.network"
repository = "https://github.com/terpnetwork/headstash-patch"
Expand All @@ -29,7 +29,7 @@ thiserror = "1.0.31"
url = "2.2.2"
sha2 = { version = "0.10.2", default-features = false }
ethereum-verify = "3.3.0"
headstash-contract = { version = "0.2.0", path = "contracts/headstash-contract" }
headstash-contract = { version = "0.3.0", path = "contracts/headstash-contract" }
semver = "1"
cw-ownable = "0.5.1"

Expand Down
2 changes: 1 addition & 1 deletion contracts/headstash-contract/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "headstash-contract"
version = { workspace = true }
authors = ["Cosmorama <cosmorama@proton.me>", "Orkun Kulce <orkunkl@users.noreply.github.com>", "Terraform Labs, PTE."]
authors = ["A Hardnett <returniflost@skiff.com>"]
edition = { workspace = true }
description = "An Airdrop contract for allowing users to claim rewards with Merkle Tree based proof"
license = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions contracts/headstash-contract/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::state::{
};

// Version info, for migration info
const CONTRACT_NAME: &str = "crates.io:cw20-vesting-airdrop";
const CONTRACT_NAME: &str = "crates.io:headstash-contract";
const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");

#[cfg_attr(not(feature = "library"), entry_point)]
Expand Down Expand Up @@ -68,7 +68,7 @@ pub fn execute(
msg: ExecuteMsg,
) -> Result<Response, ContractError> {
match msg {
ExecuteMsg::Claim { amount, proof, eth_pubkey, eth_sig } => execute_claim(deps, env, info, eth_pubkey, eth_sig, amount, proof ),
ExecuteMsg::Claim { amount, eth_pubkey, eth_sig , proof } => execute_claim(deps, env, info, amount, eth_pubkey, eth_sig, proof ),
ExecuteMsg::ClawBack { recipient } => {execute_clawback(deps, env, info, Some(recipient))},
ExecuteMsg::Pause {} => execute_pause(deps, env, info),
ExecuteMsg::Resume {} => execute_resume(deps,env,info)
Expand All @@ -79,9 +79,9 @@ pub fn execute_claim(
deps: DepsMut,
_env: Env,
info: MessageInfo,
amount: Uint128,
eth_pubkey: String,
eth_sig: String,
amount: Uint128,
proof: Vec<String>,
) -> Result<Response, ContractError> {

Expand Down
4 changes: 2 additions & 2 deletions contracts/headstash-contract/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ pub enum ExecuteMsg {
/// Claim does not check if contract has enough funds, owner must ensure it.
Claim {
amount: Uint128,
/// Proof is hex-encoded merkle proof.
proof: Vec<String>,
/// pubkey (0x...)
eth_pubkey: String,
/// signed by pubkey
eth_sig: String,
/// Proof is hex-encoded merkle proof.
proof: Vec<String>,
},
/// Recycle the remaining tokens to specified address after expire time (only owner).
/// Don't use Option<String> to avoid typo turning ClawBack into Burn
Expand Down
4 changes: 2 additions & 2 deletions contracts/headstash-contract/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub struct Config {
}
pub const CONFIG: Item<Config> = Item::new("config");

pub const NATIVE_FEE_DENOM: &str = "uterpx";
pub const NATIVE_BOND_DENOM: &str = "uthiolx";
pub const NATIVE_FEE_DENOM: &str = "uterp";
pub const NATIVE_BOND_DENOM: &str = "uthiol";

// saves external network airdrop accounts
pub const ACCOUNT_MAP_KEY: &str = "account_map";
Expand Down

0 comments on commit f059f79

Please sign in to comment.