[wip] nitrobank module
Some checks failed
Unit Tests / test-unit (pull_request) Failing after 22s
SDK Tests / sdk_tests_authority_auctions (pull_request) Failing after 1m58s
SDK Tests / sdk_tests_nameservice_expiry (pull_request) Failing after 1m51s
SDK Tests / sdk_tests (pull_request) Failing after 1m52s
Protobuf / lint (pull_request) Failing after 7s
Integration Tests / test-integration (pull_request) Failing after 26s
Build / build (pull_request) Failing after 28s
E2E Tests / test-e2e (pull_request) Failing after 27s
Some checks failed
Unit Tests / test-unit (pull_request) Failing after 22s
SDK Tests / sdk_tests_authority_auctions (pull_request) Failing after 1m58s
SDK Tests / sdk_tests_nameservice_expiry (pull_request) Failing after 1m51s
SDK Tests / sdk_tests (pull_request) Failing after 1m52s
Protobuf / lint (pull_request) Failing after 7s
Integration Tests / test-integration (pull_request) Failing after 26s
Build / build (pull_request) Failing after 28s
E2E Tests / test-e2e (pull_request) Failing after 27s
This commit is contained in:
parent
61a6b406f7
commit
8d76dc0f2a
@ -3,12 +3,10 @@ package nitrobank
|
||||
import (
|
||||
"context"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
"cosmossdk.io/x/accounts/accountstd"
|
||||
|
||||
// "github.com/ethereum/go-ethereum/common"
|
||||
|
||||
"git.vdb.to/cerc-io/laconicd/server/nitro"
|
||||
"cosmossdk.io/collections"
|
||||
"cosmossdk.io/x/accounts/accountstd"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -25,7 +23,7 @@ type Account struct {
|
||||
// Name is the name of the module account
|
||||
// Name collections.Item[string]
|
||||
|
||||
nitroService nitro.Service
|
||||
// nitroService nitro.Service
|
||||
}
|
||||
|
||||
// NewAccount creates an empty ModuleAccount
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
"cosmossdk.io/collections"
|
||||
"cosmossdk.io/core/address"
|
||||
appmodule "cosmossdk.io/core/appmodule/v2"
|
||||
"cosmossdk.io/log"
|
||||
banktypes "cosmossdk.io/x/bank/types"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
@ -20,7 +21,7 @@ import (
|
||||
type Keeper struct {
|
||||
appmodule.Environment
|
||||
addressCodec address.Codec
|
||||
// logger log.Logger
|
||||
logger log.Logger
|
||||
|
||||
// use interface from bank module
|
||||
accountKeeper banktypes.AccountKeeper
|
||||
@ -30,11 +31,12 @@ type Keeper struct {
|
||||
}
|
||||
|
||||
func NewKeeper(
|
||||
cdc codec.BinaryCodec,
|
||||
env appmodule.Environment,
|
||||
cdc codec.BinaryCodec,
|
||||
addressCodec address.Codec,
|
||||
accountKeeper banktypes.AccountKeeper,
|
||||
distsigManager *distsig.Manager,
|
||||
logger log.Logger,
|
||||
) Keeper {
|
||||
sb := collections.NewSchemaBuilder(env.KVStoreService)
|
||||
return Keeper{
|
||||
|
63
x/nitrobank/module/depinject.go
Normal file
63
x/nitrobank/module/depinject.go
Normal file
@ -0,0 +1,63 @@
|
||||
package module
|
||||
|
||||
import (
|
||||
"cosmossdk.io/core/address"
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/depinject"
|
||||
"cosmossdk.io/depinject/appconfig"
|
||||
"cosmossdk.io/log"
|
||||
govtypes "cosmossdk.io/x/gov/types"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
||||
|
||||
modulev1 "git.vdb.to/cerc-io/laconicd/api/cerc/bond/module/v1"
|
||||
"git.vdb.to/cerc-io/laconicd/server/distsig"
|
||||
"git.vdb.to/cerc-io/laconicd/utils"
|
||||
"git.vdb.to/cerc-io/laconicd/x/nitrobank/keeper"
|
||||
)
|
||||
|
||||
var _ appmodule.AppModule = AppModule{}
|
||||
|
||||
// IsOnePerModuleType implements the depinject.OnePerModuleType interface.
|
||||
func (am AppModule) IsOnePerModuleType() {}
|
||||
|
||||
// IsAppModule implements the appmodule.AppModule interface.
|
||||
func (am AppModule) IsAppModule() {}
|
||||
|
||||
func init() {
|
||||
appconfig.RegisterModule(
|
||||
&modulev1.Module{},
|
||||
appconfig.Provide(ProvideModule),
|
||||
)
|
||||
}
|
||||
|
||||
type ModuleInputs struct {
|
||||
depinject.In
|
||||
|
||||
Env appmodule.Environment
|
||||
Config *modulev1.Module
|
||||
Cdc codec.Codec
|
||||
AddressCodec address.Codec
|
||||
|
||||
AccountKeeper auth.AccountKeeper
|
||||
// BankKeeper bank.Keeper
|
||||
DistsigManager *distsig.Manager
|
||||
|
||||
Logger log.Logger
|
||||
}
|
||||
|
||||
type ModuleOutputs struct {
|
||||
depinject.Out
|
||||
|
||||
Keeper keeper.Keeper
|
||||
Module appmodule.AppModule
|
||||
}
|
||||
|
||||
func ProvideModule(in ModuleInputs) ModuleOutputs {
|
||||
// default to governance authority if not provided
|
||||
authority := utils.AddressOrModuleAddress(in.Config.Authority, govtypes.ModuleName)
|
||||
k := keeper.NewKeeper(in.Env, in.Cdc, in.AddressCodec, in.AccountKeeper, in.DistsigManager, in.Logger)
|
||||
m := NewAppModule(in.Cdc, k)
|
||||
|
||||
return ModuleOutputs{Module: m, Keeper: k}
|
||||
}
|
@ -32,23 +32,26 @@ var _ = math.Inf
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// MsgInitAccount initializes a nitro-based account
|
||||
type MsgInitAccount struct {
|
||||
NitroAddress string `protobuf:"bytes,1,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"`
|
||||
type MsgProposeChannel struct {
|
||||
// Nitro address of sending party (payer)
|
||||
FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"`
|
||||
// Simplified outcome just includes the funding amount from payer
|
||||
// TODO: review use of coins to represent ETH/ERC20
|
||||
Funds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=funds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds"`
|
||||
}
|
||||
|
||||
func (m *MsgInitAccount) Reset() { *m = MsgInitAccount{} }
|
||||
func (m *MsgInitAccount) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgInitAccount) ProtoMessage() {}
|
||||
func (*MsgInitAccount) Descriptor() ([]byte, []int) {
|
||||
func (m *MsgProposeChannel) Reset() { *m = MsgProposeChannel{} }
|
||||
func (m *MsgProposeChannel) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgProposeChannel) ProtoMessage() {}
|
||||
func (*MsgProposeChannel) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7647fae54567b5bd, []int{0}
|
||||
}
|
||||
func (m *MsgInitAccount) XXX_Unmarshal(b []byte) error {
|
||||
func (m *MsgProposeChannel) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgInitAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
func (m *MsgProposeChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgInitAccount.Marshal(b, m, deterministic)
|
||||
return xxx_messageInfo_MsgProposeChannel.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
@ -58,40 +61,47 @@ func (m *MsgInitAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *MsgInitAccount) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgInitAccount.Merge(m, src)
|
||||
func (m *MsgProposeChannel) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgProposeChannel.Merge(m, src)
|
||||
}
|
||||
func (m *MsgInitAccount) XXX_Size() int {
|
||||
func (m *MsgProposeChannel) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgInitAccount) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgInitAccount.DiscardUnknown(m)
|
||||
func (m *MsgProposeChannel) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgProposeChannel.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgInitAccount proto.InternalMessageInfo
|
||||
var xxx_messageInfo_MsgProposeChannel proto.InternalMessageInfo
|
||||
|
||||
func (m *MsgInitAccount) GetNitroAddress() string {
|
||||
func (m *MsgProposeChannel) GetFromAddress() string {
|
||||
if m != nil {
|
||||
return m.NitroAddress
|
||||
return m.FromAddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type MsgInitAccountResponse struct {
|
||||
func (m *MsgProposeChannel) GetFunds() github_com_cosmos_cosmos_sdk_types.Coins {
|
||||
if m != nil {
|
||||
return m.Funds
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MsgInitAccountResponse) Reset() { *m = MsgInitAccountResponse{} }
|
||||
func (m *MsgInitAccountResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgInitAccountResponse) ProtoMessage() {}
|
||||
func (*MsgInitAccountResponse) Descriptor() ([]byte, []int) {
|
||||
type MsgProposeChannelResponse struct {
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannelResponse) Reset() { *m = MsgProposeChannelResponse{} }
|
||||
func (m *MsgProposeChannelResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgProposeChannelResponse) ProtoMessage() {}
|
||||
func (*MsgProposeChannelResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7647fae54567b5bd, []int{1}
|
||||
}
|
||||
func (m *MsgInitAccountResponse) XXX_Unmarshal(b []byte) error {
|
||||
func (m *MsgProposeChannelResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgInitAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
func (m *MsgProposeChannelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgInitAccountResponse.Marshal(b, m, deterministic)
|
||||
return xxx_messageInfo_MsgProposeChannelResponse.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
@ -101,17 +111,17 @@ func (m *MsgInitAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]by
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *MsgInitAccountResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgInitAccountResponse.Merge(m, src)
|
||||
func (m *MsgProposeChannelResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgProposeChannelResponse.Merge(m, src)
|
||||
}
|
||||
func (m *MsgInitAccountResponse) XXX_Size() int {
|
||||
func (m *MsgProposeChannelResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgInitAccountResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgInitAccountResponse.DiscardUnknown(m)
|
||||
func (m *MsgProposeChannelResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgProposeChannelResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgInitAccountResponse proto.InternalMessageInfo
|
||||
var xxx_messageInfo_MsgProposeChannelResponse proto.InternalMessageInfo
|
||||
|
||||
// MsgOpenChannel opens a ledger channel with the sending account as a participant
|
||||
type MsgOpenChannel struct {
|
||||
@ -214,26 +224,23 @@ func (m *MsgOpenChannelResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_MsgOpenChannelResponse proto.InternalMessageInfo
|
||||
|
||||
type MsgProposeChannel struct {
|
||||
// Nitro address of sending party (payer)
|
||||
FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"`
|
||||
// Simplified outcome just includes the funding amount from payer
|
||||
// TODO: review use of coins to represent ETH/ERC20
|
||||
Funds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=funds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds"`
|
||||
// MsgInitAccount initializes a nitro-based account
|
||||
type MsgInitAccount struct {
|
||||
NitroAddress string `protobuf:"bytes,1,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannel) Reset() { *m = MsgProposeChannel{} }
|
||||
func (m *MsgProposeChannel) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgProposeChannel) ProtoMessage() {}
|
||||
func (*MsgProposeChannel) Descriptor() ([]byte, []int) {
|
||||
func (m *MsgInitAccount) Reset() { *m = MsgInitAccount{} }
|
||||
func (m *MsgInitAccount) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgInitAccount) ProtoMessage() {}
|
||||
func (*MsgInitAccount) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7647fae54567b5bd, []int{4}
|
||||
}
|
||||
func (m *MsgProposeChannel) XXX_Unmarshal(b []byte) error {
|
||||
func (m *MsgInitAccount) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgProposeChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
func (m *MsgInitAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgProposeChannel.Marshal(b, m, deterministic)
|
||||
return xxx_messageInfo_MsgInitAccount.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
@ -243,47 +250,40 @@ func (m *MsgProposeChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, e
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *MsgProposeChannel) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgProposeChannel.Merge(m, src)
|
||||
func (m *MsgInitAccount) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgInitAccount.Merge(m, src)
|
||||
}
|
||||
func (m *MsgProposeChannel) XXX_Size() int {
|
||||
func (m *MsgInitAccount) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgProposeChannel) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgProposeChannel.DiscardUnknown(m)
|
||||
func (m *MsgInitAccount) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgInitAccount.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgProposeChannel proto.InternalMessageInfo
|
||||
var xxx_messageInfo_MsgInitAccount proto.InternalMessageInfo
|
||||
|
||||
func (m *MsgProposeChannel) GetFromAddress() string {
|
||||
func (m *MsgInitAccount) GetNitroAddress() string {
|
||||
if m != nil {
|
||||
return m.FromAddress
|
||||
return m.NitroAddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannel) GetFunds() github_com_cosmos_cosmos_sdk_types.Coins {
|
||||
if m != nil {
|
||||
return m.Funds
|
||||
}
|
||||
return nil
|
||||
type MsgInitAccountResponse struct {
|
||||
}
|
||||
|
||||
type MsgProposeChannelResponse struct {
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannelResponse) Reset() { *m = MsgProposeChannelResponse{} }
|
||||
func (m *MsgProposeChannelResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgProposeChannelResponse) ProtoMessage() {}
|
||||
func (*MsgProposeChannelResponse) Descriptor() ([]byte, []int) {
|
||||
func (m *MsgInitAccountResponse) Reset() { *m = MsgInitAccountResponse{} }
|
||||
func (m *MsgInitAccountResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgInitAccountResponse) ProtoMessage() {}
|
||||
func (*MsgInitAccountResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7647fae54567b5bd, []int{5}
|
||||
}
|
||||
func (m *MsgProposeChannelResponse) XXX_Unmarshal(b []byte) error {
|
||||
func (m *MsgInitAccountResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgProposeChannelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
func (m *MsgInitAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgProposeChannelResponse.Marshal(b, m, deterministic)
|
||||
return xxx_messageInfo_MsgInitAccountResponse.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
@ -293,62 +293,62 @@ func (m *MsgProposeChannelResponse) XXX_Marshal(b []byte, deterministic bool) ([
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *MsgProposeChannelResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgProposeChannelResponse.Merge(m, src)
|
||||
func (m *MsgInitAccountResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgInitAccountResponse.Merge(m, src)
|
||||
}
|
||||
func (m *MsgProposeChannelResponse) XXX_Size() int {
|
||||
func (m *MsgInitAccountResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgProposeChannelResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgProposeChannelResponse.DiscardUnknown(m)
|
||||
func (m *MsgInitAccountResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgInitAccountResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgProposeChannelResponse proto.InternalMessageInfo
|
||||
var xxx_messageInfo_MsgInitAccountResponse proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*MsgInitAccount)(nil), "cerc.nitrobank.v1.MsgInitAccount")
|
||||
proto.RegisterType((*MsgInitAccountResponse)(nil), "cerc.nitrobank.v1.MsgInitAccountResponse")
|
||||
proto.RegisterType((*MsgOpenChannel)(nil), "cerc.nitrobank.v1.MsgOpenChannel")
|
||||
proto.RegisterType((*MsgOpenChannelResponse)(nil), "cerc.nitrobank.v1.MsgOpenChannelResponse")
|
||||
proto.RegisterType((*MsgProposeChannel)(nil), "cerc.nitrobank.v1.MsgProposeChannel")
|
||||
proto.RegisterType((*MsgProposeChannelResponse)(nil), "cerc.nitrobank.v1.MsgProposeChannelResponse")
|
||||
proto.RegisterType((*MsgOpenChannel)(nil), "cerc.nitrobank.v1.MsgOpenChannel")
|
||||
proto.RegisterType((*MsgOpenChannelResponse)(nil), "cerc.nitrobank.v1.MsgOpenChannelResponse")
|
||||
proto.RegisterType((*MsgInitAccount)(nil), "cerc.nitrobank.v1.MsgInitAccount")
|
||||
proto.RegisterType((*MsgInitAccountResponse)(nil), "cerc.nitrobank.v1.MsgInitAccountResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("cerc/nitrobank/v1/tx.proto", fileDescriptor_7647fae54567b5bd) }
|
||||
|
||||
var fileDescriptor_7647fae54567b5bd = []byte{
|
||||
// 481 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x4f, 0x4f, 0x13, 0x41,
|
||||
0x14, 0xef, 0xd0, 0x40, 0xc2, 0x80, 0x24, 0xdd, 0x18, 0x2c, 0x55, 0x17, 0x59, 0x49, 0x6c, 0x1a,
|
||||
0x99, 0xb1, 0x18, 0x2f, 0xde, 0x0a, 0x27, 0x0f, 0x8d, 0xa6, 0x47, 0x2f, 0x64, 0x76, 0x76, 0x18,
|
||||
0x26, 0x74, 0xe7, 0x6d, 0x76, 0xa6, 0x0d, 0x1e, 0x4c, 0x0c, 0x9f, 0x80, 0xc4, 0x0f, 0xe0, 0xdd,
|
||||
0x78, 0xe0,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8b, 0x1f, 0xae, 0xce,
|
||||
0x3b, 0x68, 0xaf, 0x77, 0x31, 0x09, 0xd1, 0xe5, 0x24, 0x44, 0x3f, 0x27, 0x21, 0x3a, 0x9b, 0x86,
|
||||
0xb5, 0xcb, 0x69, 0x58, 0xfb, 0x36, 0x0d, 0x6b, 0x6f, 0x9f, 0x48, 0x65, 0xc9, 0x38, 0x89, 0x89,
|
||||
0x05, 0x47, 0xb7, 0xa3, 0x80, 0x0e, 0x19, 0x07, 0xad, 0x78, 0x42, 0x4f, 0xe6, 0xe4, 0xf1, 0x92,
|
||||
0xbb, 0xd0, 0xe7, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x95, 0xea, 0x36, 0x46, 0x62, 0x03, 0x00,
|
||||
0x00,
|
||||
// 482 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x41, 0x4f, 0x13, 0x41,
|
||||
0x14, 0xc7, 0xbb, 0x6d, 0x20, 0x61, 0x40, 0x92, 0x36, 0x06, 0x4b, 0xd5, 0x05, 0x56, 0x12, 0x9b,
|
||||
0x46, 0x66, 0x2c, 0xc6, 0x8b, 0xb7, 0xc2, 0xc9, 0x43, 0xa3, 0xe9, 0xd1, 0x0b, 0x99, 0x9d, 0x1d,
|
||||
0x86, 0x09, 0xdd, 0x79, 0x9b, 0x7d, 0xd3, 0x06, 0x0f, 0x26, 0x86, 0x4f, 0x40, 0xe2, 0x07, 0xf0,
|
||||
0x6e, 0x3c, 0xf0, 0x31, 0x38, 0x92, 0x78, 0xf1, 0xa4, 0xa6, 0x35, 0xe1, 0x6b, 0x98, 0x9d, 0x5d,
|
||||
0x8a, 0x65, 0x3d, 0xc8, 0x69, 0x67, 0xdf, 0xff, 0xfd, 0xff, 0xf3, 0xdb, 0x7d, 0x8f, 0xb4, 0x84,
|
||||
0x4c, 0x05, 0x33, 0xda, 0xa6, 0x10, 0x72,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xe2, 0x76, 0x34, 0xb0, 0x21, 0x17, 0x60, 0xb4, 0x88, 0xd8, 0xc9, 0x4d, 0x78, 0xb8,
|
||||
0xe8, 0x36, 0xf4, 0xc5, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xbd, 0x62, 0xaf, 0x62, 0x03,
|
||||
0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -432,7 +432,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "cerc/nitrobank/v1/tx.proto",
|
||||
}
|
||||
|
||||
func (m *MsgInitAccount) Marshal() (dAtA []byte, err error) {
|
||||
func (m *MsgProposeChannel) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
@ -442,27 +442,41 @@ func (m *MsgInitAccount) Marshal() (dAtA []byte, err error) {
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *MsgInitAccount) MarshalTo(dAtA []byte) (int, error) {
|
||||
func (m *MsgProposeChannel) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgInitAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
func (m *MsgProposeChannel) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.NitroAddress) > 0 {
|
||||
i -= len(m.NitroAddress)
|
||||
copy(dAtA[i:], m.NitroAddress)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.NitroAddress)))
|
||||
if len(m.Funds) > 0 {
|
||||
for iNdEx := len(m.Funds) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.Funds[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
}
|
||||
if len(m.FromAddress) > 0 {
|
||||
i -= len(m.FromAddress)
|
||||
copy(dAtA[i:], m.FromAddress)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.FromAddress)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgInitAccountResponse) Marshal() (dAtA []byte, err error) {
|
||||
func (m *MsgProposeChannelResponse) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
@ -472,12 +486,12 @@ func (m *MsgInitAccountResponse) Marshal() (dAtA []byte, err error) {
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *MsgInitAccountResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
func (m *MsgProposeChannelResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgInitAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
func (m *MsgProposeChannelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
@ -552,7 +566,7 @@ func (m *MsgOpenChannelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannel) Marshal() (dAtA []byte, err error) {
|
||||
func (m *MsgInitAccount) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
@ -562,41 +576,27 @@ func (m *MsgProposeChannel) Marshal() (dAtA []byte, err error) {
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannel) MarshalTo(dAtA []byte) (int, error) {
|
||||
func (m *MsgInitAccount) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannel) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
func (m *MsgInitAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Funds) > 0 {
|
||||
for iNdEx := len(m.Funds) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.Funds[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
}
|
||||
if len(m.FromAddress) > 0 {
|
||||
i -= len(m.FromAddress)
|
||||
copy(dAtA[i:], m.FromAddress)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.FromAddress)))
|
||||
if len(m.NitroAddress) > 0 {
|
||||
i -= len(m.NitroAddress)
|
||||
copy(dAtA[i:], m.NitroAddress)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.NitroAddress)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannelResponse) Marshal() (dAtA []byte, err error) {
|
||||
func (m *MsgInitAccountResponse) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
@ -606,12 +606,12 @@ func (m *MsgProposeChannelResponse) Marshal() (dAtA []byte, err error) {
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannelResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
func (m *MsgInitAccountResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
func (m *MsgInitAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
@ -630,20 +630,26 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *MsgInitAccount) Size() (n int) {
|
||||
func (m *MsgProposeChannel) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.NitroAddress)
|
||||
l = len(m.FromAddress)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
if len(m.Funds) > 0 {
|
||||
for _, e := range m.Funds {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgInitAccountResponse) Size() (n int) {
|
||||
func (m *MsgProposeChannelResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
@ -682,26 +688,20 @@ func (m *MsgOpenChannelResponse) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannel) Size() (n int) {
|
||||
func (m *MsgInitAccount) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.FromAddress)
|
||||
l = len(m.NitroAddress)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
if len(m.Funds) > 0 {
|
||||
for _, e := range m.Funds {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgProposeChannelResponse) Size() (n int) {
|
||||
func (m *MsgInitAccountResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
@ -716,7 +716,7 @@ func sovTx(x uint64) (n int) {
|
||||
func sozTx(x uint64) (n int) {
|
||||
return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *MsgInitAccount) Unmarshal(dAtA []byte) error {
|
||||
func (m *MsgProposeChannel) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@ -739,15 +739,15 @@ func (m *MsgInitAccount) Unmarshal(dAtA []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: MsgInitAccount: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: MsgProposeChannel: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgInitAccount: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: MsgProposeChannel: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field NitroAddress", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@ -775,7 +775,41 @@ func (m *MsgInitAccount) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.NitroAddress = string(dAtA[iNdEx:postIndex])
|
||||
m.FromAddress = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Funds = append(m.Funds, types.Coin{})
|
||||
if err := m.Funds[len(m.Funds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@ -798,7 +832,7 @@ func (m *MsgInitAccount) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgInitAccountResponse) Unmarshal(dAtA []byte) error {
|
||||
func (m *MsgProposeChannelResponse) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@ -821,10 +855,10 @@ func (m *MsgInitAccountResponse) Unmarshal(dAtA []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: MsgInitAccountResponse: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: MsgProposeChannelResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgInitAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: MsgProposeChannelResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
@ -1044,7 +1078,7 @@ func (m *MsgOpenChannelResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgProposeChannel) Unmarshal(dAtA []byte) error {
|
||||
func (m *MsgInitAccount) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@ -1067,15 +1101,15 @@ func (m *MsgProposeChannel) Unmarshal(dAtA []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: MsgProposeChannel: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: MsgInitAccount: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgProposeChannel: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: MsgInitAccount: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field NitroAddress", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@ -1103,41 +1137,7 @@ func (m *MsgProposeChannel) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.FromAddress = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Funds = append(m.Funds, types.Coin{})
|
||||
if err := m.Funds[len(m.Funds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
m.NitroAddress = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@ -1160,7 +1160,7 @@ func (m *MsgProposeChannel) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgProposeChannelResponse) Unmarshal(dAtA []byte) error {
|
||||
func (m *MsgInitAccountResponse) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@ -1183,10 +1183,10 @@ func (m *MsgProposeChannelResponse) Unmarshal(dAtA []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: MsgProposeChannelResponse: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: MsgInitAccountResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgProposeChannelResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: MsgInitAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user