Skip to content

Commit 9f88179

Browse files
Merge pull request #134 from ElrondNetwork/fix-templates
Do not copy wallets into the newly created contract (not necessary anymore)
2 parents 6eb4682 + 68e706c commit 9f88179

9 files changed

Lines changed: 13 additions & 14 deletions

File tree

erdpy/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
77
## [Unreleased]
88
- TBD
99

10+
## [1.3.2]
11+
- [Do not copy test wallets into the newly created contract (not necessary anymore)](https://github.com/ElrondNetwork/elrond-sdk-erdpy/pull/134)
12+
1013
## [1.3.1]
1114
- [Re-add the pattern erdpy/wallet/*.txt in MANIFEST.in. Was removed by mistake in a previous release.](https://github.com/ElrondNetwork/elrond-sdk-erdpy/pull/133)
1215

erdpy/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.3.1"
1+
__version__ = "1.3.2"

erdpy/accounts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class Address(IAddress):
8787
BECH32_LENGTH = 62
8888
_value_hex: str
8989

90-
def __init__(self, value):
90+
def __init__(self, value: Any):
9191
self._value_hex = ''
9292

9393
if not value:

erdpy/projects/templates.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import json
22
import logging
33
import os
4-
from os import path
54
from pathlib import Path
65
import shutil
76
from typing import Any, List, Tuple
@@ -11,7 +10,6 @@
1110
from erdpy.projects.project_rust import CargoFile
1211
from erdpy.projects.templates_config import get_templates_repositories
1312
from erdpy.projects.templates_repository import TemplatesRepository
14-
from erdpy.testnet import wallets
1513

1614
logger = logging.getLogger("projects.templates")
1715
ERDJS_SNIPPETS_FOLDER_NAME = "erdjs-snippets"
@@ -61,10 +59,6 @@ def create_from_template(project_name: str, template_name: str, directory: Path)
6159

6260
logger.info("Project created, template applied.")
6361

64-
wallets.copy_all_to(path.join(project_directory, "wallets"))
65-
66-
logger.info("Test wallets have been copied into the project.")
67-
6862

6963
def _download_templates_repositories():
7064
for repo in get_templates_repositories():

erdpy/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def find_in_dictionary(dictionary, compound_path):
183183

184184

185185
def list_files(folder: Path, suffix: Optional[str] = None) -> List[Path]:
186+
folder = folder.expanduser()
186187
files: List[Path] = [folder / file for file in os.listdir(folder)]
187188
files = [file for file in files if file.is_file()]
188189

examples/airdrop.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
import logging
33
from argparse import ArgumentParser
4+
from pathlib import Path
45
from typing import cast
56

67
from erdpy.accounts import Account, Address
@@ -16,7 +17,7 @@ def main():
1617
export PYTHONPATH=.
1718
python3 ./examples/airdrop.py \
1819
--proxy=https://testnet-gateway.elrond.com \
19-
--accounts=./erdpy/testnet/wallets/users \
20+
--accounts=~/elrondsdk/testwallets/latest/users \
2021
--sender=erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th\
2122
--value=1000000000000000000
2223
"""
@@ -32,7 +33,7 @@ def main():
3233

3334
proxy = ElrondProxy(args.proxy)
3435
network = proxy.get_network_config()
35-
accounts = AccountsRepository.create_from_folder(args.accounts)
36+
accounts = AccountsRepository.create_from_folder(Path(args.accounts))
3637
sender = cast(Account, accounts.get_account(Address(args.sender)))
3738
sender.sync_nonce(proxy)
3839
receivers = [account for account in accounts.get_all() if account.address.bech32() != sender.address.bech32()]

examples/contracts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
export PYTHONPATH=.
1717
python3 ./examples/contracts.py \
1818
--proxy=https://testnet-gateway.elrond.com \
19-
--pem=./erdpy/testnet/wallets/users/alice.pem
19+
--pem=~/elrondsdk/testwallets/latest/users/alice.pem
2020
2121
Sample contracts to be used (at deploy & upgrade):
2222
./examples/bytecode/counter.wasm (functions: increment, decrement, get)

examples/staking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def main():
1717
export PYTHONPATH=.
1818
python3 ./examples/staking.py \
1919
--proxy=https://testnet-gateway.elrond.com \
20-
--keyfile=./erdpy/testnet/wallets/users/alice.json \
21-
--passfile=./erdpy/testnet/wallets/users/password.txt \
20+
--keyfile=~/elrondsdk/testwallets/latest/users/alice.json \
21+
--passfile=~/elrondsdk/testwallets/latest/users/password.txt \
2222
--reward-address="erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th" \
2323
--validators-file=./erdpy/tests/testdata/validators.json \
2424
--value=2500000000000000000000

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
with open("README.md", "r") as fh:
44
long_description = "https://github.com/ElrondNetwork/elrond-sdk-erdpy"
55

6-
VERSION = "1.3.1"
6+
VERSION = "1.3.2"
77

88
try:
99
with open('./erdpy/_version.py', 'wt') as versionfile:

0 commit comments

Comments
 (0)