Skip to content

Commit

Permalink
remove changes to cctx struct
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Mar 18, 2024
1 parent 152a3de commit 69e3f33
Show file tree
Hide file tree
Showing 45 changed files with 1,697 additions and 4,231 deletions.
9 changes: 4 additions & 5 deletions docs/openapi/openapi.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53657,11 +53657,6 @@ definitions:
items:
type: object
$ref: '#/definitions/crosschainOutboundTxParams'
event_index:
type: string
format: uint64
coin_type:
$ref: '#/definitions/commonCoinType'
crosschainGasPrice:
type: object
properties:
Expand Down Expand Up @@ -53720,6 +53715,8 @@ definitions:
tx_origin:
type: string
title: this address is the EOA that signs the inbound tx
coin_type:
$ref: '#/definitions/commonCoinType'
asset:
type: string
title: for ERC20 coin type, the asset is an address of the ERC20 contract
Expand Down Expand Up @@ -53810,6 +53807,8 @@ definitions:
receiver_chainId:
type: string
format: int64
coin_type:
$ref: '#/definitions/commonCoinType'
amount:
type: string
outbound_tx_tss_nonce:
Expand Down
4 changes: 2 additions & 2 deletions proto/crosschain/cross_chain_tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ message InboundTxParams {
string sender = 1; // this address is the immediate contract/EOA that calls the Connector.send()
int64 sender_chain_id = 2;
string tx_origin = 3; // this address is the EOA that signs the inbound tx
common.CoinType coin_type = 4;
string asset = 5; // for ERC20 coin type, the asset is an address of the ERC20 contract
string amount = 6 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint",
Expand All @@ -50,6 +51,7 @@ message ZetaAccounting {
message OutboundTxParams {
string receiver = 1;
int64 receiver_chainId = 2;
common.CoinType coin_type = 3;
string amount = 4 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint",
(gogoproto.nullable) = false
Expand Down Expand Up @@ -91,6 +93,4 @@ message CrossChainTx {
Status cctx_status = 8;
InboundTxParams inbound_tx_params = 9;
repeated OutboundTxParams outbound_tx_params = 10;
uint64 event_index = 11;
common.CoinType coin_type = 12;
}
65 changes: 0 additions & 65 deletions proto/crosschain/cross_chain_tx_v14.proto

This file was deleted.

4 changes: 2 additions & 2 deletions testutil/sample/crosschain.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func InboundTxParams(r *rand.Rand) *types.InboundTxParams {
InboundTxObservedExternalHeight: r.Uint64(),
InboundTxBallotIndex: StringRandom(r, 32),
InboundTxFinalizedZetaHeight: r.Uint64(),
CoinType: common.CoinType(r.Intn(100)),
}
}

Expand Down Expand Up @@ -78,6 +79,7 @@ func OutboundTxParams(r *rand.Rand) *types.OutboundTxParams {
OutboundTxObservedExternalHeight: r.Uint64(),
OutboundTxGasUsed: r.Uint64(),
OutboundTxEffectiveGasPrice: math.NewInt(r.Int63()),
CoinType: common.CoinType(r.Intn(100)),
}
}

Expand Down Expand Up @@ -117,13 +119,11 @@ func CrossChainTx(t *testing.T, index string) *types.CrossChainTx {
return &types.CrossChainTx{
Creator: AccAddress(),
Index: GetCctxIndexFromString(index),
CoinType: common.CoinType(r.Intn(100)),
ZetaFees: math.NewUint(uint64(r.Int63())),
RelayedMessage: StringRandom(r, 32),
CctxStatus: Status(t, index),
InboundTxParams: InboundTxParams(r),
OutboundTxParams: []*types.OutboundTxParams{OutboundTxParams(r), OutboundTxParams(r)},
EventIndex: r.Uint64(),
}
}

Expand Down
56 changes: 0 additions & 56 deletions testutil/sample/crosschain_legacy.go

This file was deleted.

20 changes: 10 additions & 10 deletions typescript/crosschain/cross_chain_tx_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ export declare class InboundTxParams extends Message<InboundTxParams> {
*/
txOrigin: string;

/**
* @generated from field: common.CoinType coin_type = 4;
*/
coinType: CoinType;

/**
* for ERC20 coin type, the asset is an address of the ERC20 contract
*
Expand Down Expand Up @@ -195,6 +200,11 @@ export declare class OutboundTxParams extends Message<OutboundTxParams> {
*/
receiverChainId: bigint;

/**
* @generated from field: common.CoinType coin_type = 3;
*/
coinType: CoinType;

/**
* @generated from field: string amount = 4;
*/
Expand Down Expand Up @@ -353,16 +363,6 @@ export declare class CrossChainTx extends Message<CrossChainTx> {
*/
outboundTxParams: OutboundTxParams[];

/**
* @generated from field: uint64 event_index = 11;
*/
eventIndex: bigint;

/**
* @generated from field: common.CoinType coin_type = 12;
*/
coinType: CoinType;

constructor(data?: PartialMessage<CrossChainTx>);

static readonly runtime: typeof proto3;
Expand Down
Loading

0 comments on commit 69e3f33

Please sign in to comment.