Skip to content

Commit

Permalink
remove unncessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Vritra4 committed Aug 6, 2024
1 parent 677a31d commit 9ec7911
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
3 changes: 0 additions & 3 deletions submodules/evm-nft/types/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ func ParseERC721TransferLog(ac address.Codec, attributeValue string) (parsed *Pa
}

from, err := sdk.AccAddressFromHexUnsafe(strings.TrimPrefix(strings.TrimPrefix(tl.Topics[1], "0x"), "000000000000000000000000"))
//from, err := sdk.AccAddressFromHexUnsafe(strings.TrimPrefix(tl.Topics[1], "0x"))
if err != nil {
return nil, errors.Wrap(err, "invalid from address")
}
to, err := sdk.AccAddressFromHexUnsafe(strings.TrimPrefix(strings.TrimPrefix(tl.Topics[2], "0x"), "000000000000000000000000"))
//to, err := sdk.AccAddressFromHexUnsafe(strings.TrimPrefix(tl.Topics[2], "0x"))
if err != nil {
return nil, errors.Wrap(err, "invalid to address")
}
Expand All @@ -75,7 +73,6 @@ func ParseERC721TransferLog(ac address.Codec, attributeValue string) (parsed *Pa

func (pt ParsedTransfer) GetAction() NftAction {
emptyAddr, _ := sdk.AccAddressFromHexUnsafe("0000000000000000000000000000000000000000")
//emptyAddr, _ := sdk.AccAddressFromHexUnsafe("0000000000000000000000000000000000000000000000000000000000000000")
if pt.From.Equals(emptyAddr) && !pt.To.Equals(emptyAddr) {
return NftActionMint
}
Expand Down
23 changes: 0 additions & 23 deletions submodules/evm-nft/vm_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ func encode(req []byte) []byte {
return res
}

// unavailable in evm - remove this function later
func (sm EvmNFTSubmodule) getCollectionMinter(ctx context.Context, classId string) (*types.Minter, error) {
return nil, errors.New("not supported")
}

// unavailable in evm - remove this function later
func (sm EvmNFTSubmodule) getCollectionNumTokens(ctx context.Context, colAddr sdk.AccAddress) (*types.NumTokens, error) {
return nil, errors.New("not supported")
}

func (sm EvmNFTSubmodule) getCollectionFromVMStore(ctx context.Context, classId string) (*types.CollectionResource, error) {
resource := types.CollectionResource{}

Expand All @@ -47,19 +37,6 @@ func (sm EvmNFTSubmodule) getCollectionFromVMStore(ctx context.Context, classId
resource.Collection.Uri = classUri
resource.Collection.Description = classData

/* unavailable in evm - remove this block later
minter, err := sm.getCollectionMinter(ctx, classId)
if err != nil {
return nil, err
}
resource.Collection.Creator = minter.Minter
numTokens, err := sm.getCollectionNumTokens(ctx, classId)
if err != nil {
return nil, err
}
resource.Collection.Nfts = &nfttypes.TokenHandle{Length: strconv.FormatInt(numTokens.Count, 10)}
*/

return &resource, nil
}

Expand Down

0 comments on commit 9ec7911

Please sign in to comment.