generated from metaplex-foundation/solana-project-template
-
Notifications
You must be signed in to change notification settings - Fork 31
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
1 parent
c4fb33e
commit e10b87a
Showing
20 changed files
with
462 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* This code was AUTOGENERATED using the kinobi library. | ||
* Please DO NOT EDIT THIS FILE, instead use visitors | ||
* to add features, then rerun kinobi to update it. | ||
* | ||
* @see https://github.com/metaplex-foundation/kinobi | ||
*/ | ||
|
||
import { Serializer, struct, u64 } from '@metaplex-foundation/umi/serializers'; | ||
|
||
export type BaseSolTransferFee = { feeAmount: bigint }; | ||
|
||
export type BaseSolTransferFeeArgs = { feeAmount: number | bigint }; | ||
|
||
export function getBaseSolTransferFeeSerializer(): Serializer< | ||
BaseSolTransferFeeArgs, | ||
BaseSolTransferFee | ||
> { | ||
return struct<BaseSolTransferFee>([['feeAmount', u64()]], { | ||
description: 'BaseSolTransferFee', | ||
}) as Serializer<BaseSolTransferFeeArgs, BaseSolTransferFee>; | ||
} |
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
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,20 @@ | ||
import { lamports, SolAmount } from '@metaplex-foundation/umi'; | ||
import { BaseSolTransferFee } from '../generated'; | ||
|
||
export type SolTransferFee = { | ||
feeAmount: SolAmount; | ||
}; | ||
|
||
export type SolTransferFeeArgs = SolTransferFee; | ||
|
||
export function solTransferFeeToBase(s: SolTransferFee): BaseSolTransferFee { | ||
return { | ||
feeAmount: s.feeAmount.basisPoints, | ||
}; | ||
} | ||
|
||
export function solTransferFeeFromBase(s: BaseSolTransferFee): SolTransferFee { | ||
return { | ||
feeAmount: lamports(s.feeAmount), | ||
}; | ||
} |
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.