Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update submodule #23

Merged
merged 2 commits into from
Jul 31, 2024
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
2 changes: 1 addition & 1 deletion haqq-node
Submodule haqq-node updated 42 files
+1 −1 Makefile
+31 −15 app/app.go
+1 −1 app/upgrades/v1.7.6/handler.go
+1 −1 app/upgrades/v1.7.6/upgrades.go
+6 −0 app/upgrades/v1.7.7/constants.go
+20 −0 app/upgrades/v1.7.7/upgrades.go
+1 −1 proto/haqq/dao/module/v1/module.proto
+3 −3 proto/haqq/dao/v1/dao.proto
+1 −1 proto/haqq/dao/v1/genesis.proto
+1 −1 proto/haqq/dao/v1/query.proto
+22 −1 proto/haqq/dao/v1/tx.proto
+0 −293 x/dao/keeper/integration_test.go
+3 −3 x/ucdao/client/cli/query.go
+45 −3 x/ucdao/client/cli/tx.go
+0 −0 x/ucdao/exported/exported.go
+12 −1 x/ucdao/keeper/account_balances.go
+1 −1 x/ucdao/keeper/genesis.go
+1 −1 x/ucdao/keeper/grpc_query.go
+617 −0 x/ucdao/keeper/integration_test.go
+29 −1 x/ucdao/keeper/keeper.go
+21 −1 x/ucdao/keeper/msg_server.go
+1 −1 x/ucdao/keeper/params.go
+1 −1 x/ucdao/keeper/setup_test.go
+1 −1 x/ucdao/keeper/store.go
+1 −1 x/ucdao/keeper/total_balance.go
+0 −0 x/ucdao/keeper/utils.go
+5 −5 x/ucdao/module.go
+0 −0 x/ucdao/spec/README.md
+1 −1 x/ucdao/types/balance.go
+2 −2 x/ucdao/types/codec.go
+0 −0 x/ucdao/types/dao.pb.go
+1 −0 x/ucdao/types/errors.go
+0 −0 x/ucdao/types/expected_keepers.go
+0 −0 x/ucdao/types/genesis.go
+0 −0 x/ucdao/types/genesis.pb.go
+4 −1 x/ucdao/types/keys.go
+42 −1 x/ucdao/types/msg.go
+0 −0 x/ucdao/types/params.go
+0 −0 x/ucdao/types/querier.go
+0 −0 x/ucdao/types/query.pb.go
+0 −0 x/ucdao/types/query.pb.gw.go
+400 −26 x/ucdao/types/tx.pb.go
18 changes: 18 additions & 0 deletions src/gen/haqq.dao.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,24 @@ pub struct MsgFund {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgFundResponse {
}
/// MsgTransferOwnership allows an account transfer the ownership of shares to another account.
#[derive(::derive_builder::Builder)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgTransferOwnership {
/// owner is a current owner of the shares in dao.
#[prost(string, tag="1")]
pub owner: ::prost::alloc::string::String,
/// new_owner is a new owner of the shares in dao.
#[prost(string, tag="2")]
pub new_owner: ::prost::alloc::string::String,
}
/// MsgTransferOwnershipResponse defines the Msg/TransferOwnership response type.
#[derive(::derive_builder::Builder)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgTransferOwnershipResponse {
}
include!("haqq.dao.v1.serde.rs");
include!("haqq.dao.v1.tonic.rs");
// @@protoc_insertion_point(module)
180 changes: 180 additions & 0 deletions src/gen/haqq.dao.v1.serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,186 @@ impl<'de> serde::Deserialize<'de> for MsgFundResponse {
deserializer.deserialize_struct("haqq.dao.v1.MsgFundResponse", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for MsgTransferOwnership {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if !self.owner.is_empty() {
len += 1;
}
if !self.new_owner.is_empty() {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("haqq.dao.v1.MsgTransferOwnership", len)?;
if !self.owner.is_empty() {
struct_ser.serialize_field("owner", &self.owner)?;
}
if !self.new_owner.is_empty() {
struct_ser.serialize_field("newOwner", &self.new_owner)?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for MsgTransferOwnership {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"owner",
"new_owner",
"newOwner",
];

#[allow(clippy::enum_variant_names)]
enum GeneratedField {
Owner,
NewOwner,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;

impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}

#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"owner" => Ok(GeneratedField::Owner),
"newOwner" | "new_owner" => Ok(GeneratedField::NewOwner),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = MsgTransferOwnership;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct haqq.dao.v1.MsgTransferOwnership")
}

fn visit_map<V>(self, mut map_: V) -> std::result::Result<MsgTransferOwnership, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut owner__ = None;
let mut new_owner__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Owner => {
if owner__.is_some() {
return Err(serde::de::Error::duplicate_field("owner"));
}
owner__ = Some(map_.next_value()?);
}
GeneratedField::NewOwner => {
if new_owner__.is_some() {
return Err(serde::de::Error::duplicate_field("newOwner"));
}
new_owner__ = Some(map_.next_value()?);
}
}
}
Ok(MsgTransferOwnership {
owner: owner__.unwrap_or_default(),
new_owner: new_owner__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct("haqq.dao.v1.MsgTransferOwnership", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for MsgTransferOwnershipResponse {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let len = 0;
let struct_ser = serializer.serialize_struct("haqq.dao.v1.MsgTransferOwnershipResponse", len)?;
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for MsgTransferOwnershipResponse {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
];

#[allow(clippy::enum_variant_names)]
enum GeneratedField {
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;

impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}

#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
Err(serde::de::Error::unknown_field(value, FIELDS))
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = MsgTransferOwnershipResponse;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct haqq.dao.v1.MsgTransferOwnershipResponse")
}

fn visit_map<V>(self, mut map_: V) -> std::result::Result<MsgTransferOwnershipResponse, V::Error>
where
V: serde::de::MapAccess<'de>,
{
while map_.next_key::<GeneratedField>()?.is_some() {
let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
Ok(MsgTransferOwnershipResponse {
})
}
}
deserializer.deserialize_struct("haqq.dao.v1.MsgTransferOwnershipResponse", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for Params {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
Expand Down
25 changes: 25 additions & 0 deletions src/gen/haqq.dao.v1.tonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,5 +291,30 @@ pub mod msg_client {
req.extensions_mut().insert(GrpcMethod::new("haqq.dao.v1.Msg", "Fund"));
self.inner.unary(req, path, codec).await
}
pub async fn transfer_ownership(
&mut self,
request: impl tonic::IntoRequest<super::MsgTransferOwnership>,
) -> std::result::Result<
tonic::Response<super::MsgTransferOwnershipResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/haqq.dao.v1.Msg/TransferOwnership",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("haqq.dao.v1.Msg", "TransferOwnership"));
self.inner.unary(req, path, codec).await
}
}
}
13 changes: 12 additions & 1 deletion web/gen/proto/connect-web/haqq/dao/v1/tx_connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* eslint-disable */
// @ts-nocheck

import { MsgFund, MsgFundResponse } from "./tx_pb.js";
import { MsgFund, MsgFundResponse, MsgTransferOwnership, MsgTransferOwnershipResponse } from "./tx_pb.js";
import { MethodKind } from "@bufbuild/protobuf";

/**
Expand All @@ -25,6 +25,17 @@ export const Msg = {
O: MsgFundResponse,
kind: MethodKind.Unary,
},
/**
* TransferOwnership defines a method to allow an account to transfer the ownership of shares to another account.
*
* @generated from rpc haqq.dao.v1.Msg.TransferOwnership
*/
transferOwnership: {
name: "TransferOwnership",
I: MsgTransferOwnership,
O: MsgTransferOwnershipResponse,
kind: MethodKind.Unary,
},
}
} as const;

82 changes: 82 additions & 0 deletions web/gen/proto/connect-web/haqq/dao/v1/tx_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,85 @@ export class MsgFundResponse extends Message<MsgFundResponse> {
}
}

/**
* MsgTransferOwnership allows an account transfer the ownership of shares to another account.
*
* @generated from message haqq.dao.v1.MsgTransferOwnership
*/
export class MsgTransferOwnership extends Message<MsgTransferOwnership> {
/**
* owner is a current owner of the shares in dao.
*
* @generated from field: string owner = 1;
*/
owner = "";

/**
* new_owner is a new owner of the shares in dao.
*
* @generated from field: string new_owner = 2;
*/
newOwner = "";

constructor(data?: PartialMessage<MsgTransferOwnership>) {
super();
proto3.util.initPartial(data, this);
}

static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "haqq.dao.v1.MsgTransferOwnership";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "owner", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "new_owner", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MsgTransferOwnership {
return new MsgTransferOwnership().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MsgTransferOwnership {
return new MsgTransferOwnership().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MsgTransferOwnership {
return new MsgTransferOwnership().fromJsonString(jsonString, options);
}

static equals(a: MsgTransferOwnership | PlainMessage<MsgTransferOwnership> | undefined, b: MsgTransferOwnership | PlainMessage<MsgTransferOwnership> | undefined): boolean {
return proto3.util.equals(MsgTransferOwnership, a, b);
}
}

/**
* MsgTransferOwnershipResponse defines the Msg/TransferOwnership response type.
*
* @generated from message haqq.dao.v1.MsgTransferOwnershipResponse
*/
export class MsgTransferOwnershipResponse extends Message<MsgTransferOwnershipResponse> {
constructor(data?: PartialMessage<MsgTransferOwnershipResponse>) {
super();
proto3.util.initPartial(data, this);
}

static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "haqq.dao.v1.MsgTransferOwnershipResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MsgTransferOwnershipResponse {
return new MsgTransferOwnershipResponse().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MsgTransferOwnershipResponse {
return new MsgTransferOwnershipResponse().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MsgTransferOwnershipResponse {
return new MsgTransferOwnershipResponse().fromJsonString(jsonString, options);
}

static equals(a: MsgTransferOwnershipResponse | PlainMessage<MsgTransferOwnershipResponse> | undefined, b: MsgTransferOwnershipResponse | PlainMessage<MsgTransferOwnershipResponse> | undefined): boolean {
return proto3.util.equals(MsgTransferOwnershipResponse, a, b);
}
}