Skip to content

Commit

Permalink
Merge pull request #84 from bnb-chain/develop
Browse files Browse the repository at this point in the history
release: prepare for release v0.2.1-alpha.1
  • Loading branch information
flywukong authored May 26, 2023
2 parents fc72bff + 99c45ae commit 754c785
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
- develop

env:
GreenfieldTag: v0.2.1
GreenfieldStorageProviderTag: v0.2.1-test
GreenfieldTag: v0.2.1-alpha.1
GreenfieldStorageProviderTag: release-refactor-v0.2.1-e2etest
GOPRIVATE: github.com/bnb-chain
GH_ACCESS_TOKEN: ${{ secrets.GH_TOKEN }}
MYSQL_USER: root
Expand Down
2 changes: 1 addition & 1 deletion client/api_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (c *client) GetCreateBucketApproval(ctx context.Context, createBucketMsg *s
// fetch primary signed msg from sp response
signedRawMsg := resp.Header.Get(types.HTTPHeaderSignedMsg)
if signedRawMsg == "" {
return nil, errors.New("fail to fetch pre createObject signature")
return nil, errors.New("fail to fetch pre createBucket signature")
}

signedMsgBytes, err := hex.DecodeString(signedRawMsg)
Expand Down
20 changes: 10 additions & 10 deletions client/api_crosschain.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ type CrossChain interface {
GetInturnRelayer(ctx context.Context, req *oracletypes.QueryInturnRelayerRequest) (*oracletypes.QueryInturnRelayerResponse, error)
GetCrossChainPackage(ctx context.Context, channelId uint32, sequence uint64) ([]byte, error)

MirrorGroup(ctx context.Context, id math.Uint, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error)
MirrorBucket(ctx context.Context, id math.Uint, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error)
MirrorObject(ctx context.Context, id math.Uint, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error)
MirrorGroup(ctx context.Context, groupId math.Uint, groupName string, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error)
MirrorBucket(ctx context.Context, bucketId math.Uint, bucketName string, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error)
MirrorObject(ctx context.Context, objectId math.Uint, bucketName, objectName string, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error)
}

// TransferOut makes a transfer from Greenfield to BSC
Expand Down Expand Up @@ -99,8 +99,8 @@ func (c *client) GetCrossChainPackage(ctx context.Context, channelId uint32, seq
}

// MirrorGroup mirrors the group to BSC as NFT
func (c *client) MirrorGroup(ctx context.Context, groupId math.Uint, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error) {
msgMirrorGroup := storagetypes.NewMsgMirrorGroup(c.MustGetDefaultAccount().GetAddress(), groupId)
func (c *client) MirrorGroup(ctx context.Context, groupId math.Uint, groupName string, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error) {
msgMirrorGroup := storagetypes.NewMsgMirrorGroup(c.MustGetDefaultAccount().GetAddress(), groupId, groupName)
txResp, err := c.chainClient.BroadcastTx(ctx, []sdk.Msg{msgMirrorGroup}, &txOption)
if err != nil {
return nil, err
Expand All @@ -109,8 +109,8 @@ func (c *client) MirrorGroup(ctx context.Context, groupId math.Uint, txOption gn
}

// MirrorBucket mirrors the bucket to BSC as NFT
func (c *client) MirrorBucket(ctx context.Context, bucketId math.Uint, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error) {
msgMirrorBucket := storagetypes.NewMsgMirrorBucket(c.MustGetDefaultAccount().GetAddress(), bucketId)
func (c *client) MirrorBucket(ctx context.Context, bucketId math.Uint, bucketName string, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error) {
msgMirrorBucket := storagetypes.NewMsgMirrorBucket(c.MustGetDefaultAccount().GetAddress(), bucketId, bucketName)
txResp, err := c.chainClient.BroadcastTx(ctx, []sdk.Msg{msgMirrorBucket}, &txOption)
if err != nil {
return nil, err
Expand All @@ -119,9 +119,9 @@ func (c *client) MirrorBucket(ctx context.Context, bucketId math.Uint, txOption
}

// MirrorObject mirrors the object to BSC as NFT
func (c *client) MirrorObject(ctx context.Context, objectId math.Uint, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error) {
msgMirrorBucket := storagetypes.NewMsgMirrorBucket(c.MustGetDefaultAccount().GetAddress(), objectId)
txResp, err := c.chainClient.BroadcastTx(ctx, []sdk.Msg{msgMirrorBucket}, &txOption)
func (c *client) MirrorObject(ctx context.Context, objectId math.Uint, bucketName, objectName string, txOption gnfdSdkTypes.TxOption) (*sdk.TxResponse, error) {
msgMirrorObject := storagetypes.NewMsgMirrorObject(c.MustGetDefaultAccount().GetAddress(), objectId, bucketName, objectName)
txResp, err := c.chainClient.BroadcastTx(ctx, []sdk.Msg{msgMirrorObject}, &txOption)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion client/api_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type Group interface {

// CreateGroup create a new group on greenfield chain, the group members can be initialized or not
func (c *client) CreateGroup(ctx context.Context, groupName string, opt types.CreateGroupOptions) (string, error) {
createGroupMsg := storageTypes.NewMsgCreateGroup(c.MustGetDefaultAccount().GetAddress(), groupName, opt.InitGroupMember)
createGroupMsg := storageTypes.NewMsgCreateGroup(c.MustGetDefaultAccount().GetAddress(), groupName, opt.InitGroupMember, opt.Extra)
return c.sendTxn(ctx, createGroupMsg, opt.TxOpts)
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
cosmossdk.io/errors v1.0.0-beta.7
cosmossdk.io/math v1.0.0
github.com/bnb-chain/greenfield v0.2.1
github.com/bnb-chain/greenfield v0.2.1-alpha.1
github.com/bnb-chain/greenfield-common/go v0.0.0-20230512062756-5d7790d0ccbf
github.com/cometbft/cometbft v0.37.1
github.com/cosmos/cosmos-sdk v0.47.0-rc2.0.20230220103612-f094a0c33410
Expand Down Expand Up @@ -145,5 +145,5 @@ replace (
github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.23.0
github.com/cometbft/cometbft => github.com/bnb-chain/greenfield-cometbft v0.0.1
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0
github.com/cosmos/cosmos-sdk => github.com/bnb-chain/greenfield-cosmos-sdk v0.2.1
github.com/cosmos/cosmos-sdk => github.com/bnb-chain/greenfield-cosmos-sdk v0.2.1-alpha.2
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s=
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c=
github.com/bnb-chain/greenfield v0.2.1 h1:a2/sgAruexJjvy1UNTZ2twKnreXQRESuSAdOyWmJhRU=
github.com/bnb-chain/greenfield v0.2.1/go.mod h1:K6Vk0OgZypVOjWbqGM27RTc7rbOHopy25slfiup9r00=
github.com/bnb-chain/greenfield v0.2.1-alpha.1 h1:0WASaBcUy/thiwu28m6i3vh8klOgaX7vPHD2bLZsBcI=
github.com/bnb-chain/greenfield v0.2.1-alpha.1/go.mod h1:FK+Vg+IfLYlA+o9q81qrLufQaQKm4Vz9G0/u4fG7bO8=
github.com/bnb-chain/greenfield-cometbft v0.0.1 h1:pX8S9oZKjWJCrxH07l6rbU3zee9txZ11+UwO9stsNMQ=
github.com/bnb-chain/greenfield-cometbft v0.0.1/go.mod h1:9q11eHNRY9FDwFH+4pompzPNGv//Z3VcfvkELaHJPMs=
github.com/bnb-chain/greenfield-common/go v0.0.0-20230512062756-5d7790d0ccbf h1:5HxLNqgYHNV7Cfaepws3vejeI49aWry7ON2k+a23K10=
github.com/bnb-chain/greenfield-common/go v0.0.0-20230512062756-5d7790d0ccbf/go.mod h1:mDgMyrO4J019EsGm96DLg78GlcVW8RVzJLzHzppOaOk=
github.com/bnb-chain/greenfield-cosmos-sdk v0.2.1 h1:icJpJetpb1zs2kCRkD+rXI55uzGFroPMFDNT0NDPNL4=
github.com/bnb-chain/greenfield-cosmos-sdk v0.2.1/go.mod h1:6pVENKv7drpk0k46nuyvAeD1SMnQUuXD9WY0tyc060A=
github.com/bnb-chain/greenfield-cosmos-sdk v0.2.1-alpha.2 h1:l3BqDPv6EdpWM4d/3gPdZNPU2gWzsAM8Z1hJeyhiXgk=
github.com/bnb-chain/greenfield-cosmos-sdk v0.2.1-alpha.2/go.mod h1:6pVENKv7drpk0k46nuyvAeD1SMnQUuXD9WY0tyc060A=
github.com/bnb-chain/greenfield-cosmos-sdk/api v0.0.0-20230425074444-eb5869b05fe9 h1:6fLpmmI0EZvDTfPvI0zy5dBaaTUboHnEkoC5/p/w8TQ=
github.com/bnb-chain/greenfield-cosmos-sdk/api v0.0.0-20230425074444-eb5869b05fe9/go.mod h1:rbc4o84RSEvhf09o2+4Qiazsv0snRJLiEZdk17HeIDw=
github.com/bnb-chain/greenfield-cosmos-sdk/math v0.0.0-20230425074444-eb5869b05fe9 h1:1ZdK+iR1Up02bOa2YTZCml7PBpP//kcdamOcK6aWO/s=
Expand Down
1 change: 1 addition & 0 deletions types/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ type CreateObjectOptions struct {
// CreateGroupOptions indicates the meta to construct createGroup msg
type CreateGroupOptions struct {
InitGroupMember []sdk.AccAddress
Extra string
TxOpts *gnfdsdktypes.TxOption
}

Expand Down

0 comments on commit 754c785

Please sign in to comment.