This repository has been archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from PureStake/master
Release 1.1.0
- Loading branch information
Showing
103 changed files
with
4,524 additions
and
1,050 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [develop, master, release] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [develop] | ||
schedule: | ||
- cron: '0 16 * * 1' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Override automatic language detection by changing the below list | ||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] | ||
language: ['javascript'] | ||
# Learn more... | ||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
# We must fetch at least the immediate parents so that if this is | ||
# a pull request then we can checkout the head. | ||
fetch-depth: 2 | ||
|
||
# If this run was triggered by a pull request event, then checkout | ||
# the head of the pull request instead of the merge commit. | ||
- run: git checkout HEAD^2 | ||
if: ${{ github.event_name == 'pull_request' }} | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
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
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,19 @@ | ||
import { IBaseTx } from "./baseTx"; | ||
|
||
/// | ||
// Mapping interface of allowable fields for acfg create transactions. | ||
/// | ||
export interface IAssetCreateTx extends IBaseTx { | ||
type: string, //"acfg" | ||
assetTotal: number, //uint64 "t" The total number of base units of the asset to create. This number cannot be changed. | ||
assetDecimals: number, //uint32 "dc" The number of digits to use after the decimal point when displaying the asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths. If 2, the base unit of the asset is in hundredths. | ||
assetDefaultFrozen?: boolean, //bool "df" True to freeze holdings for this asset by default. | ||
assetUnitName?: string, //string "un" The name of a unit of this asset. Supplied on creation. Example: USDT | ||
assetName?: string, //string "an" The name of the asset. Supplied on creation. Example: Tether | ||
assetURL?: string, //string "au" Specifies a URL where more information about the asset can be retrieved. Max size is 32 bytes. | ||
assetMetadataHash?: any, //[]byte "am" This field is intended to be a 32-byte hash of some metadata that is relevant to your asset and/or asset holders. The format of this metadata is up to the application. This field can only be specified upon creation. An example might be the hash of some certificate that acknowledges the digitized asset as the official representation of a particular real-world asset. | ||
assetManager?: string, //Address "m" The address of the account that can manage the configuration of the asset and destroy it. | ||
assetReserve?: string, //Address "r" The address of the account that holds the reserve (non-minted) units of the asset. This address has no specific authority in the protocol itself. It is used in the case where you want to signal to holders of your asset that the non-minted units of the asset reside in an account that is different from the default creator account (the sender). | ||
assetFreeze?: string, //Address "f" The address of the account used to freeze holdings of this asset. If empty, freezing is not permitted. | ||
assetClawback?: string, //Address "c" The address of the account that can clawback holdings of this asset. If empty, clawback is not permitted. | ||
} |
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,9 @@ | ||
import { IBaseTx } from "./baseTx"; | ||
|
||
/// | ||
// Mapping interface of allowable fields for acfg destroy transactions. | ||
/// | ||
export interface IAssetDestroyTx extends IBaseTx { | ||
type: string, //"acfg" | ||
assetIndex: number, //uint64 "caid" For re-configure or destroy transactions, this is the unique asset ID. On asset creation, the ID is set to zero. | ||
} |
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 |
---|---|---|
@@ -1,4 +1,40 @@ | ||
import { IBaseTx } from "./baseTx"; | ||
/// | ||
// Mapping interface of allowable fields for appl transactions. | ||
/// | ||
export interface IAppl {} | ||
export interface IApplTx extends IBaseTx { | ||
// NOTE: Most fields are remapped in the algosdk - The comments indicate where they will be mapped too. | ||
type: string, //"appl" | ||
|
||
//apid: number, //uint64 "apid" ID of the application being configured or empty if creating. | ||
appIndex?: any, | ||
|
||
//apan: number, //uint64 "apan" Defines what additional actions occur with the transaction. See the OnComplete section of the TEAL spec for details. | ||
appOnComplete?: any, | ||
|
||
//apat?: string, //Address "apat" List of accounts in addition to the sender that may be accessed from the application's approval-program and clear-state-program. | ||
appAccounts?: any, //Expects Array[Addresses] | ||
|
||
//apap?: string, //Address "apap" Logic executed for every application transaction, except when on-completion is set to "clear". It can read and write global state for the application, as well as account-specific local state. Approval programs may reject the transaction. | ||
appApprovalProgram?: any, | ||
|
||
//apaa?: any, //byte[] "apaa" Transaction specific arguments accessed from the application's approval-program and clear-state-program. | ||
appArgs?: any, //Array: Performs a Buffer.from() for each element | ||
|
||
//apsu?: string, //Address "apsu" Logic executed for application transactions with on-completion set to "clear". It can read and write global state for the application, as well as account-specific local state. Clear state programs cannot reject the transaction. | ||
appClearProgram?: any, | ||
|
||
//apfa?: string, //Address "apfa" Lists the applications in addition to the application-id whose global states may be accessed by this application's approval-program and clear-state-program. The access is read-only. | ||
appForeignApps?: any, | ||
|
||
//apas?: string, //Address "apas" Lists the assets whose AssetParams may be accessed by this application's approval-program and clear-state-program. The access is read-only. | ||
appForeignAssets?: any | ||
|
||
//apgs?: any, //StateSchema "apgs" Holds the maximum number of global state values defined within a StateSchema object. | ||
appGlobalInts?: any, | ||
appGlobalByteSlices?: any, | ||
|
||
//apls?: any, //StateSchema "apls" Holds the maximum number of local state values defined within a StateSchema object. | ||
appLocalInts?: any, | ||
appLocalByteSlices?: any, | ||
} |
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,11 @@ | ||
import { IBaseTx } from "./baseTx"; | ||
|
||
/// | ||
// Mapping interface of allowable fields for axfer accept transactions. | ||
/// | ||
export interface IAssetAcceptTx extends IBaseTx { | ||
type: string, //"axfer" | ||
assetIndex: number, //uint64 "xaid" The unique ID of the asset to be transferred. | ||
amount?: number, //uint64 "aamt" The amount of the asset to be transferred. A zero amount transferred to self allocates that asset in the account's Asset map. | ||
to: string, //Address "arcv" The recipient of the asset transfer. Must be self for Asset Accept. | ||
} |
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,13 @@ | ||
import { IBaseTx } from "./baseTx"; | ||
|
||
/// | ||
// Mapping interface of allowable fields for axfer transactions. | ||
/// | ||
export interface IAssetClawbackTx extends IBaseTx { | ||
type: string, //"axfer" | ||
assetIndex: number, //uint64 "xaid" The unique ID of the asset to be transferred. | ||
amount: number, //uint64 "aamt" The amount of the asset to be transferred. A zero amount transferred to self allocates that asset in the account's Asset map. | ||
closeRemainderTo?: string, //Address "aclose" Specify this field to remove the asset holding from the sender account and reduce the account's minimum balance. | ||
assetRevocationTarget: string, //Address "asnd" The address from which the funds will be withdrawn. | ||
to: string, //Address | ||
} |
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.