-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/tx history restore bump #945
Merged
aristidesstaffieri
merged 11 commits into
release/5.5.0
from
bugfix/tx-history-restore-bump
Aug 18, 2023
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
60ba6e7
adds the bump footprint expiration op type to tx history
aristidesstaffieri 1976f25
WIP, refactors history item to build async rows
aristidesstaffieri 73b39c8
clean up and organize soroban related helpers
aristidesstaffieri 4bf2718
Added translations
aristidesstaffieri 30b4c0a
remove unwanted files from translations commit
aristidesstaffieri 1ba0450
removes helper shim and fixes import pattern
aristidesstaffieri 05fa8fe
use sdk base fee, add restore footprint header title, use more direct…
aristidesstaffieri b52103c
fixes soroban tx submission error handling, bumps soroban-client
aristidesstaffieri bb75977
fix use of source account in SorobanContext newTxBuilder
aristidesstaffieri 40de096
split transfer and mint history items
aristidesstaffieri 8a265ce
Added translations
aristidesstaffieri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
// https://github.com/stellar/soroban-examples/blob/main/token/src/contract.rs | ||
export enum SorobanTokenInterface { | ||
transfer = "transfer", | ||
mint = "mint", | ||
} | ||
|
||
// TODO: can we generate this at build time using the cli TS generator? Also should we? | ||
export interface SorobanToken { | ||
// only currently holds fields we care about | ||
transfer: (from: string, to: string, amount: number) => void; | ||
mint: (to: string, amount: number) => void; | ||
// values below are in storage | ||
name: string; | ||
balance: number; | ||
symbol: string; | ||
decimals: number; | ||
} |
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,23 @@ | ||
import { | ||
Transaction, | ||
Memo, | ||
MemoType, | ||
Operation, | ||
Server, | ||
xdr, | ||
scValToNative, | ||
} from "soroban-client"; | ||
|
||
export const simulateTx = async <ArgType>( | ||
tx: Transaction<Memo<MemoType>, Operation[]>, | ||
server: Server, | ||
): Promise<ArgType> => { | ||
const { results } = await server.simulateTransaction(tx); | ||
if (!results || results.length !== 1) { | ||
throw new Error("Invalid response from simulateTransaction"); | ||
} | ||
const result = results[0]; | ||
const scVal = xdr.ScVal.fromXDR(result.xdr, "base64"); | ||
|
||
return scValToNative(scVal); | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice - I find this pattern a lot more straightforward!