-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
223 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package utils | ||
|
||
import ( | ||
transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" | ||
) | ||
|
||
const ( | ||
ibcPort = "transfer" | ||
) | ||
|
||
func GetForeignIBCDenom(channelId string, denom string) string { | ||
return GetForeignDenomTrace(channelId, denom).IBCDenom() | ||
} | ||
|
||
func GetForeignDenomTrace(channelId string, denom string) transfertypes.DenomTrace { | ||
sourcePrefix := transfertypes.GetDenomPrefix(ibcPort, channelId) | ||
// NOTE: sourcePrefix contains the trailing "/" | ||
prefixedDenom := sourcePrefix + denom | ||
// construct the denomination trace from the full raw denomination | ||
return transfertypes.ParseDenomTrace(prefixedDenom) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package bridging_fee | ||
|
||
const ( | ||
EventTypeBridgingFee = "bridging_fee" | ||
AttributeKeyFee = "fee" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.