-
Notifications
You must be signed in to change notification settings - Fork 97
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
59 changed files
with
662 additions
and
142 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 |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
required: true | ||
type: string | ||
pre_release_version: | ||
description: "Pre-Release version, e.g. 'beta.1', will be added behind the release_version as the tag." | ||
description: "(Optional) Pre-Release version, e.g. 'beta.1'. Used mainly to support consensus release on betanet." | ||
required: false | ||
type: string | ||
|
||
|
@@ -43,7 +43,7 @@ jobs: | |
fi | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v3.5.3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
|
@@ -78,60 +78,33 @@ jobs: | |
fi | ||
- name: Build Changelog | ||
uses: mikepenz/[email protected] | ||
id: build-changelog | ||
env: | ||
PREVIOUS_VERSION: ${{ steps.get-release.outputs.latest-tag }} | ||
with: | ||
fromTag: ${{ env.PREVIOUS_VERSION }} | ||
toTag: ${{ env.RELEASE_BRANCH }} | ||
failOnError: true | ||
configurationJson: | | ||
{ | ||
"categories": [ | ||
{ | ||
"title": "## New Features", | ||
"labels": [ | ||
"New Feature" | ||
] | ||
}, | ||
{ | ||
"title": "## Enhancements", | ||
"labels": [ | ||
"Enhancement" | ||
] | ||
}, | ||
{ | ||
"title": "## Bug Fixes", | ||
"labels": [ | ||
"Bug-Fix" | ||
] | ||
}, | ||
{ | ||
"title": "## Not Yet Enabled", | ||
"labels": [ | ||
"Not-Yet-Enabled" | ||
] | ||
} | ||
], | ||
"ignore_labels": [ | ||
"Skip-Release-Notes" | ||
], | ||
"sort": { | ||
"order": "ASC", | ||
"on_property": "mergedAt" | ||
}, | ||
"template": "#{{CHANGELOG}}", | ||
"pr_template": "- #{{TITLE}} by @#{{AUTHOR}} in ##{{NUMBER}}" | ||
} | ||
run: | | ||
CHANGELOG=$(curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ github.token }}"\ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/${{ github.repository }}/releases/generate-notes \ | ||
-d '{"tag_name":"${{ env.RELEASE_VERSION }}","target_commitish":"${{ env.RELEASE_BRANCH }}","previous_tag_name":"${{ env.PREVIOUS_VERSION }}","configuration_file_path":".github/release.yml"}' \ | ||
| jq -r '.body') | ||
# The EOF steps are used to save multiline string in github: | ||
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-a-multiline-string | ||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | ||
echo "changelog<<$EOF" >> $GITHUB_OUTPUT | ||
echo -e "${CHANGELOG}" >> $GITHUB_OUTPUT | ||
echo "$EOF" >> $GITHUB_OUTPUT | ||
- name: Update Changelog | ||
if: ${{ env.PRE_RELEASE_VERSION == '' }} | ||
env: | ||
CHANGELOG_CONTENT: ${{ steps.build-changelog.outputs.changelog }} | ||
PREVIOUS_VERSION: ${{ steps.get-release.outputs.latest-tag }} | ||
run: | | ||
echo -e "# ${RELEASE_VERSION}\n\n${CHANGELOG_CONTENT}**Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREVIOUS_VERSION}...${RELEASE_VERSION}\n" | cat - CHANGELOG.md > temp && mv temp CHANGELOG.md | ||
echo -e "# ${RELEASE_VERSION}\n\n${CHANGELOG_CONTENT}\n" | cat - CHANGELOG.md > temp && mv temp CHANGELOG.md | ||
- name: Commit Changes | ||
uses: EndBug/[email protected] | ||
|
@@ -147,15 +120,12 @@ jobs: | |
GH_TOKEN: ${{ github.token }} | ||
RELEASE_TAG: ${{ steps.set-release.outputs.release-tag }} | ||
run: | | ||
echo -e "# What's Changed\n\n${CHANGELOG_CONTENT}**Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREVIOUS_VERSION}...${RELEASE_TAG}" > tmp_msg_body.txt | ||
export msg_body=$(cat tmp_msg_body.txt) | ||
rm tmp_msg_body.txt | ||
# Note: There's an issue adding teams as reviewers, see https://github.com/cli/cli/issues/6395 | ||
PULL_REQUEST_URL=$(gh pr create --base "master" \ | ||
--title "FOR REVIEW ONLY: ${{ github.event.repository.name }} $RELEASE_TAG" \ | ||
--label "Skip-Release-Notes" \ | ||
--label "Team Hyper Flow" \ | ||
--body "$msg_body" | tail -n 1) | ||
--body "${CHANGELOG_CONTENT}" | tail -n 1) | ||
if [[ $PULL_REQUEST_URL =~ ^https://github.com/${{ github.repository }}/pull/[0-9]+$ ]]; then | ||
PULL_REQUEST_NUM=$(echo $PULL_REQUEST_URL | sed 's:.*/::') | ||
echo "pull-request-master=$PULL_REQUEST_URL" >> $GITHUB_ENV | ||
|
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,23 @@ | ||
package algod | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/algorand/go-algorand-sdk/v2/client/v2/common" | ||
"github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" | ||
) | ||
|
||
// GetBlockTxids get the top level transaction IDs for the block on the given | ||
// round. | ||
type GetBlockTxids struct { | ||
c *Client | ||
|
||
round uint64 | ||
} | ||
|
||
// Do performs the HTTP request | ||
func (s *GetBlockTxids) Do(ctx context.Context, headers ...*common.Header) (response models.BlockTxidsResponse, err error) { | ||
err = s.c.get(ctx, &response, fmt.Sprintf("/v2/blocks/%s/txids", common.EscapeParams(s.round)...), nil, headers) | ||
return | ||
} |
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 @@ | ||
package models | ||
|
||
// ApplicationInitialStates an application's initial global/local/box states that | ||
// were accessed during simulation. | ||
type ApplicationInitialStates struct { | ||
// AppBoxes an application's global/local/box state. | ||
AppBoxes ApplicationKVStorage `json:"app-boxes,omitempty"` | ||
|
||
// AppGlobals an application's global/local/box state. | ||
AppGlobals ApplicationKVStorage `json:"app-globals,omitempty"` | ||
|
||
// AppLocals an application's initial local states tied to different accounts. | ||
AppLocals []ApplicationKVStorage `json:"app-locals,omitempty"` | ||
|
||
// Id application index. | ||
Id uint64 `json:"id"` | ||
} |
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,10 @@ | ||
package models | ||
|
||
// ApplicationKVStorage an application's global/local/box state. | ||
type ApplicationKVStorage struct { | ||
// Account the address of the account associated with the local state. | ||
Account string `json:"account,omitempty"` | ||
|
||
// Kvs key-Value pairs representing application states. | ||
Kvs []AvmKeyValue `json:"kvs"` | ||
} |
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 @@ | ||
package models | ||
|
||
// ApplicationLocalReference references an account's local state for an | ||
// application. | ||
type ApplicationLocalReference struct { | ||
// Account address of the account with the local state. | ||
Account string `json:"account"` | ||
|
||
// App application ID of the local state application. | ||
App uint64 `json:"app"` | ||
} |
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 @@ | ||
package models | ||
|
||
// ApplicationStateOperation an operation against an application's global/local/box | ||
// state. | ||
type ApplicationStateOperation struct { | ||
// Account for local state changes, the address of the account associated with the | ||
// local state. | ||
Account string `json:"account,omitempty"` | ||
|
||
// AppStateType type of application state. Value `g` is **global state**, `l` is | ||
// **local state**, `b` is **boxes**. | ||
AppStateType string `json:"app-state-type"` | ||
|
||
// Key the key (name) of the global/local/box state. | ||
Key []byte `json:"key"` | ||
|
||
// NewValue represents an AVM value. | ||
NewValue AvmValue `json:"new-value,omitempty"` | ||
|
||
// Operation operation type. Value `w` is **write**, `d` is **delete**. | ||
Operation string `json:"operation"` | ||
} |
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,10 @@ | ||
package models | ||
|
||
// AssetHoldingReference references an asset held by an account. | ||
type AssetHoldingReference struct { | ||
// Account address of the account holding the asset. | ||
Account string `json:"account"` | ||
|
||
// Asset asset ID of the holding. | ||
Asset uint64 `json:"asset"` | ||
} |
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,10 @@ | ||
package models | ||
|
||
// AvmKeyValue represents an AVM key-value pair in an application store. | ||
type AvmKeyValue struct { | ||
// Key | ||
Key []byte `json:"key"` | ||
|
||
// Value represents an AVM value. | ||
Value AvmValue `json:"value"` | ||
} |
Oops, something went wrong.