Skip to content
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

Merge feat/next(v9) into main #351

Merged
merged 83 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
a5b0c84
install rust globally
popenta Sep 13, 2023
7250ffa
try fix env
popenta Sep 13, 2023
69fba5e
code cleanup
popenta Sep 13, 2023
0bb5667
update version
popenta Sep 15, 2023
5295378
remove code related to old rust env
popenta Sep 15, 2023
2845d07
install rust for tests
popenta Sep 15, 2023
6906afa
remove explicit rust installation for workflow
popenta Sep 18, 2023
cad2cbd
Merge branch 'main' into globally-install-rust
popenta Sep 18, 2023
47c897e
add pytest flag for showing logs
popenta Sep 18, 2023
7ef887f
set flag for pytest logs
popenta Sep 18, 2023
6c22bac
remove pytest for testing purposes
popenta Sep 21, 2023
e9542fe
debugging
popenta Sep 21, 2023
67defe7
Merge branch 'main' into globally-install-rust
popenta Sep 21, 2023
45e9698
remove python 3.8 from GH action
popenta Sep 21, 2023
362cb9b
install sc-meta on GH action
popenta Sep 21, 2023
edb1c59
set rust toolchain to nightly
popenta Sep 21, 2023
0c9aaa9
remove default sc-meta installation when installing rust
popenta Sep 21, 2023
d7681dd
fix typo
popenta Sep 21, 2023
87df9d4
add new pytest marker
popenta Sep 22, 2023
84ce195
install sc-meta in GH workflow
popenta Sep 22, 2023
b3c6a0c
remove unnecessary prints
popenta Sep 22, 2023
3cbff95
bump version
popenta Sep 22, 2023
c597e34
started refactoring
popenta Sep 22, 2023
485bfaf
Install sc-meta when installing rust
popenta Sep 25, 2023
d5999e9
skip some tests on windows
popenta Sep 25, 2023
837b794
skip test on windows
popenta Sep 25, 2023
39f1b77
install wasm-opt and twiggy using cargo
popenta Sep 26, 2023
177d263
fix resolution
popenta Sep 27, 2023
648cb4c
Merge pull request #340 from multiversx/cargo-install-wasm-opt
popenta Sep 27, 2023
51a7318
Merge pull request #341 from multiversx/merge-main-in-feat-next-27-09
popenta Sep 27, 2023
340e5e1
remove clang installation
popenta Sep 27, 2023
fc8609a
fix localnet and unit tests
popenta Sep 27, 2023
8eea743
fix workflow
popenta Sep 27, 2023
ad585ea
run GH actions using newer python version & wasm-opt fixes
popenta Sep 28, 2023
851bd30
fix test assert
popenta Sep 28, 2023
d2af8f5
fixes after review
popenta Sep 28, 2023
d8bb7a4
add link to mxpy cookbook
popenta Sep 28, 2023
15d4f6a
use sc-meta for contract templates and contract new from template
popenta Sep 29, 2023
4cfcf50
Merge pull request #331 from multiversx/globally-install-rust
popenta Oct 2, 2023
dc95f24
start wallet sign-message command
popenta Oct 2, 2023
4dbf018
remove file
popenta Oct 2, 2023
88fc3d9
add new command: mxpy wallet sign-message
popenta Oct 2, 2023
68abe21
fixes after review
popenta Oct 2, 2023
8f7fb6a
Merge branch 'contract-template' into message-signing
popenta Oct 2, 2023
8cf6e06
implement sign and verify message
popenta Oct 3, 2023
c3caf06
Merge pull request #342 from multiversx/contract-template
popenta Oct 3, 2023
8c35561
fix unit tests
popenta Oct 3, 2023
96d21cf
remove --tag argument from mxpy deps
popenta Oct 3, 2023
c0b710c
fixes after review
popenta Oct 5, 2023
cd2b0cd
rename file
popenta Oct 5, 2023
6963397
fix typo
popenta Oct 10, 2023
71a006e
Merge pull request #343 from multiversx/message-signing
popenta Oct 10, 2023
2abf809
Merge branch 'message-signing' into remove-tag-argument
popenta Oct 10, 2023
7ed05f5
re-generate CLI.md
popenta Oct 10, 2023
215af92
Merge pull request #344 from multiversx/remove-tag-argument
popenta Oct 12, 2023
227b4d7
fix type of pem index parameter
popenta Oct 13, 2023
c0db6ed
fix test
popenta Oct 13, 2023
3f40d78
Merge pull request #346 from multiversx/fix-pem-index-type
popenta Oct 16, 2023
226de84
smart contract projects cleanup
popenta Oct 16, 2023
3ebee1a
Merge pull request #348 from multiversx/cpp-cleanup
popenta Oct 17, 2023
4bf62ec
bump version
popenta Oct 27, 2023
1d11b67
bump version for beta release
popenta Oct 27, 2023
cf848c4
Merge pull request #352 from multiversx/bump-version-v9.0.0
popenta Oct 27, 2023
e31d00b
Merge branch 'main' into use-latest-wallet-package
popenta Oct 31, 2023
fecb99d
use wallet v0.8.0
popenta Oct 31, 2023
345229a
set upper bound for requirements
popenta Oct 31, 2023
1942161
fix
popenta Oct 31, 2023
5fc04d7
fix typo
popenta Oct 31, 2023
bb229d4
Merge pull request #354 from multiversx/use-latest-wallet-package
popenta Nov 1, 2023
4488788
Merge branch 'main' into merge-main-2-11
popenta Nov 2, 2023
138107f
Merge pull request #356 from multiversx/merge-main-2-11
popenta Nov 2, 2023
e10f758
fix unit tests
popenta Nov 2, 2023
da31c3d
Merge pull request #357 from multiversx/fix-unittests
popenta Nov 2, 2023
09fe536
reference latest packages & start fixes
popenta Nov 6, 2023
cb6734b
fixes
popenta Nov 7, 2023
b75e727
reference latest network provider package
popenta Nov 7, 2023
3c6e850
fix relayed tx & add unit test
popenta Nov 8, 2023
61177f5
fix transaction serialization when cosignin with tcs
popenta Nov 8, 2023
473291e
fixes after review
popenta Nov 8, 2023
c63f0d8
Merge pull request #359 from multiversx/integrate-latest-packages
popenta Nov 9, 2023
273ce54
Merge branch 'main' into merge-main-into-feat-next-22-11
popenta Nov 22, 2023
8c2e178
bump version and update dependencies
popenta Nov 22, 2023
53f4ae4
Merge pull request #362 from multiversx/merge-main-into-feat-next-22-11
popenta Nov 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 39 additions & 39 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,54 @@ name: build

on:
pull_request:
branches: [ main, feat/* ]
branches: [main, feat/*]
workflow_dispatch:

jobs:
build:
name: Build and Test mxpy for ${{ matrix.os }}, python ${{ matrix.python-version }}

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [windows-2019]
python-version: [3.8]
python-version: [3.11]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
pip3 install pytest
- name: Set github_api_token
shell: bash
run: |
mkdir ~/multiversx-sdk
export PYTHONPATH=.
python3 -m multiversx_sdk_cli.cli config new test
python3 -m multiversx_sdk_cli.cli config set github_api_token ${{ secrets.GITHUB_TOKEN }}
- name: Setup test dependencies
shell: bash
run: |
python3 -m multiversx_sdk_cli.cli deps install testwallets
- name: Run unit tests
shell: bash
run: |
export PYTHONPATH=.
pytest -m "not skip_on_windows" .
- name: Run CLI tests
shell: bash
run: |
export PROXY=https://testnet-gateway.multiversx.com
export CHAIN_ID=T
cd ./multiversx_sdk_cli/tests
source ./test_cli_tx.sh && testAll || return 1
source ./test_cli_dns.sh && testOffline || return 1
source ./test_cli_validators.sh && testAll || return 1
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
pip3 install pytest
- name: Set github_api_token
shell: bash
run: |
mkdir ~/multiversx-sdk
export PYTHONPATH=.
python3 -m multiversx_sdk_cli.cli config new test
python3 -m multiversx_sdk_cli.cli config set github_api_token ${{ secrets.GITHUB_TOKEN }}
- name: Setup test dependencies
shell: bash
run: |
python3 -m multiversx_sdk_cli.cli deps install testwallets
- name: Run unit tests
shell: bash
run: |
export PYTHONPATH=.
pytest -m "not skip_on_windows" .
- name: Run CLI tests
shell: bash
run: |
export PROXY=https://testnet-gateway.multiversx.com
export CHAIN_ID=T
cd ./multiversx_sdk_cli/tests
source ./test_cli_tx.sh && testAll || return 1
source ./test_cli_dns.sh && testOffline || return 1
source ./test_cli_validators.sh && testAll || return 1
75 changes: 37 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,52 @@ name: build

on:
pull_request:
branches: [ main, feat/* ]
branches: [main, feat/*]
workflow_dispatch:

jobs:
build:
name: Build and Test mxpy for ${{ matrix.os }}, python ${{ matrix.python-version }}

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.8, 3.11]
python-version: [3.11]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
pip3 install pytest
- name: Install libtinfo5
if: ${{ matrix.os != 'macos-latest' }}
run: |
sudo apt update
sudo apt install -y libtinfo5
- name: Set github_api_token
run: |
mkdir ~/multiversx-sdk
export PYTHONPATH=.
python3 -m multiversx_sdk_cli.cli config new test
python3 -m multiversx_sdk_cli.cli config set github_api_token ${{ secrets.GITHUB_TOKEN }}
- name: Setup test dependencies
run: |
python3 -m multiversx_sdk_cli.cli deps install testwallets
python3 -m multiversx_sdk_cli.cli deps install wasm-opt
- name: Run unit tests
run: |
export PYTHONPATH=.
pytest .
- name: Run CLI tests
run: |
python3 -m multiversx_sdk_cli.cli config set dependencies.vmtools.tag v1.4.60
cd ./multiversx_sdk_cli/tests
source ./test_cli_contracts.sh && testAll || return 1
source ./test_cli_dns.sh && testOffline || return 1
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
pip3 install pytest
- name: Install libtinfo5
if: ${{ matrix.os != 'macos-latest' }}
run: |
sudo apt update
sudo apt install -y libtinfo5
- name: Set github_api_token
run: |
mkdir ~/multiversx-sdk
export PYTHONPATH=.
python3 -m multiversx_sdk_cli.cli config new test
python3 -m multiversx_sdk_cli.cli config set github_api_token ${{ secrets.GITHUB_TOKEN }}
- name: Setup test dependencies
run: |
python3 -m multiversx_sdk_cli.cli deps install testwallets
- name: Run unit tests
run: |
export PYTHONPATH=.
pytest .
- name: Run CLI tests
run: |
python3 -m multiversx_sdk_cli.cli config set dependencies.vmtools.tag v1.4.60
cd ./multiversx_sdk_cli/tests
source ./test_cli_contracts.sh && testAll || return 1
source ./test_cli_dns.sh && testOffline || return 1
4 changes: 2 additions & 2 deletions .github/workflows/install-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
workflow_dispatch:

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
install:
runs-on: macos-latest

strategy:
matrix:
python-version: [3.8]
python-version: [3.11]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/install-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
workflow_dispatch:

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
install:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.8]
python-version: [3.11]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/install-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
workflow_dispatch:

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
install:
runs-on: windows-2019

strategy:
matrix:
python-version: [3.8]
python-version: [3.11]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ venv.bak/

# Typings
typings

multiversx_sdk_cli/tests/testdata-out
74 changes: 55 additions & 19 deletions CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ COMMANDS summary
----------------
new Create a new Smart Contract project based on a template.
templates List the available Smart Contract templates.
build Build a Smart Contract project using the appropriate buildchain.
build Build a Smart Contract project.
clean Clean a Smart Contract project.
test Run scenarios (tests).
report Print a detailed report of the smart contracts.
Expand All @@ -85,13 +85,12 @@ usage: mxpy contract new [-h] ...

Create a new Smart Contract project based on a template.

positional arguments:
name

options:
-h, --help show this help message and exit
--template TEMPLATE the template to use
--directory DIRECTORY 🗀 the parent directory of the project (default: current directory)
-h, --help show this help message and exit
--name NAME The name of the contract. If missing, the name of the template will be used.
--template TEMPLATE the template to use
--tag TAG the framework version on which the contract should be created
--path PATH the parent directory of the project (default: current directory)

```
### Contract.Templates
Expand All @@ -105,6 +104,7 @@ List the available Smart Contract templates.

options:
-h, --help show this help message and exit
--tag TAG the sc-meta framework version referred to

```
### Contract.Build
Expand All @@ -114,7 +114,7 @@ options:
$ mxpy contract build --help
usage: mxpy contract build [-h] ...

Build a Smart Contract project using the appropriate buildchain.
Build a Smart Contract project.

options:
-h, --help show this help message and exit
Expand Down Expand Up @@ -994,7 +994,7 @@ usage: mxpy wallet COMMAND [-h] ...
Create wallet, derive secret key from mnemonic, bech32 address helpers etc.

COMMANDS:
{new,convert,bech32}
{new,convert,bech32,sign-message,verify-message}

OPTIONS:
-h, --help show this help message and exit
Expand All @@ -1005,6 +1005,8 @@ COMMANDS summary
new Create a new wallet and print its mnemonic; optionally save as password-protected JSON (recommended) or PEM (not recommended)
convert Convert a wallet from one format to another
bech32 Helper for encoding and decoding bech32 addresses
sign-message Sign a message
verify-message Verify a previously signed message

```
### Wallet.New
Expand Down Expand Up @@ -1041,7 +1043,7 @@ options:
--outfile OUTFILE path to the output file
--in-format {raw-mnemonic,keystore-mnemonic,keystore-secret-key,pem}
the format of the input file
--out-format {raw-mnemonic,keystore-mnemonic,keystore-secret-key,pem}
--out-format {raw-mnemonic,keystore-mnemonic,keystore-secret-key,pem,address-bech32,address-hex}
the format of the output file
--address-index ADDRESS_INDEX the address index, if input format is raw-mnemonic, keystore-mnemonic
or pem (with multiple entries) and the output format is keystore-
Expand All @@ -1067,6 +1069,44 @@ options:
--encode whether to encode
--decode whether to decode

```
### Wallet.SignMessage


```
$ mxpy wallet sign-message --help
usage: mxpy wallet sign-message [-h] ...

Sign a message

options:
-h, --help show this help message and exit
--message MESSAGE the message you want to sign
--pem PEM 🔑 the PEM file, if keyfile not provided
--pem-index PEM_INDEX 🔑 the index in the PEM file (default: 0)
--keyfile KEYFILE 🔑 a JSON keyfile, if PEM not provided
--passfile PASSFILE 🔑 a file containing keyfile's password, if keyfile provided
--ledger 🔐 bool flag for signing transaction using ledger
--ledger-account-index LEDGER_ACCOUNT_INDEX 🔐 the index of the account when using Ledger
--ledger-address-index LEDGER_ADDRESS_INDEX 🔐 the index of the address when using Ledger
--sender-username SENDER_USERNAME 🖄 the username of the sender

```
### Wallet.VerifyMessage


```
$ mxpy wallet verify-message --help
usage: mxpy wallet verify-message [-h] ...

Verify a previously signed message

options:
-h, --help show this help message and exit
--address ADDRESS the bech32 address of the signer
--message MESSAGE the previously signed message(readable text, as it was signed)
--signature SIGNATURE the signature in hex format

```
## Group **Localnet**

Expand Down Expand Up @@ -1217,13 +1257,11 @@ usage: mxpy deps install [-h] ...
Install dependencies or multiversx-sdk modules.

positional arguments:
{all,llvm,clang,cpp,rust,golang,vmtools,mx_chain_go,mx_chain_proxy_go,wasm-opt,twiggy,testwallets}
the dependency to install
{all,rust,golang,vmtools,testwallets} the dependency to install

options:
-h, --help show this help message and exit
--overwrite whether to overwrite an existing installation
--tag TAG the tag or version to install
-h, --help show this help message and exit
--overwrite whether to overwrite an existing installation

```
### Dependencies.Check
Expand All @@ -1236,12 +1274,10 @@ usage: mxpy deps check [-h] ...
Check whether a dependency is installed.

positional arguments:
{all,llvm,clang,cpp,rust,golang,vmtools,mx_chain_go,mx_chain_proxy_go,wasm-opt,twiggy,testwallets}
the dependency to check
{all,rust,golang,vmtools,testwallets} the dependency to check

options:
-h, --help show this help message and exit
--tag TAG the tag or version to check
-h, --help show this help message and exit

```
## Group **Configuration**
Expand Down
Loading
Loading