Skip to content

Commit efdd880

Browse files
authored
Merge pull request #674 from multiversx/fix-parse-esdt-token-identifier-contract-type
Parse EsdtTokenIdentifier contract type
2 parents 341b734 + 2b5f914 commit efdd880

File tree

5 files changed

+32
-6
lines changed

5 files changed

+32
-6
lines changed

.github/workflows/test-localnet.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,21 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17+
# Install system dependencies
18+
- name: Install system dependencies
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y libusb-1.0-0-dev libudev-dev pkg-config
22+
1723
# Step 1: Checkout the repository
1824
- name: Checkout code
1925
uses: actions/checkout@v3
2026

2127
# Step 2: Set up Python environment
22-
- name: Set up Python 3.x
28+
- name: Set up Python 3.11
2329
uses: actions/setup-python@v4
2430
with:
25-
python-version: '3.x'
31+
python-version: '3.11'
2632

2733
# Step 3: Install pipx (to manage Python tools)
2834
- name: Install pipx
@@ -44,8 +50,26 @@ jobs:
4450
# Start the local testnet with mxpy
4551
mkdir -p ~/localnet && cd ~/localnet
4652
mxpy localnet setup --configfile=${GITHUB_WORKSPACE}/localnet.toml
53+
echo "Localnet setup completed."
54+
echo "Starting localnet..."
4755
nohup mxpy localnet start --configfile=${GITHUB_WORKSPACE}/localnet.toml > localnet.log 2>&1 & echo $! > localnet.pid
48-
sleep 120 # Allow time for the testnet to fully start
56+
echo "Localnet started, waiting for it to be fully operational..."
57+
58+
# Allow time for the testnet to fully start
59+
timeout=300
60+
elapsed=0
61+
while ! curl -s http://127.0.0.1:7950/network/config > /dev/null; do
62+
if [ $elapsed -ge $timeout ]; then
63+
echo "Timeout waiting for localnet to start"
64+
cat ~/localnet/localnet.log
65+
exit 1
66+
fi
67+
echo "Waiting for localnet... ($elapsed/$timeout seconds)"
68+
sleep 10
69+
elapsed=$((elapsed + 10))
70+
done
71+
72+
echo "Localnet is ready!"
4973
5074
# Step 6: Install Node.js and dependencies
5175
- name: Set up Node.js environment

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@multiversx/sdk-core",
3-
"version": "15.3.0",
3+
"version": "15.3.1",
44
"description": "MultiversX SDK for JavaScript and TypeScript",
55
"author": "MultiversX",
66
"homepage": "https://multiversx.com",

src/abi/typesystem/typeMapper.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ describe("test mapper", () => {
2424
testMapping("u64", new U64Type());
2525
testMapping("BigUint", new BigUIntType());
2626
testMapping("TokenIdentifier", new TokenIdentifierType());
27+
testMapping("EsdtTokenIdentifier", new TokenIdentifierType());
2728
});
2829

2930
it("should map generic types", () => {

src/abi/typesystem/typeMapper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export class TypeMapper {
104104
["utf-8 string", new StringType()],
105105
["TokenIdentifier", new TokenIdentifierType()],
106106
["EgldOrEsdtTokenIdentifier", new TokenIdentifierType()],
107+
["EsdtTokenIdentifier", new TokenIdentifierType()],
107108
["CodeMetadata", new CodeMetadataType()],
108109
["nothing", new NothingType()],
109110
["AsyncCall", new NothingType()],

0 commit comments

Comments
 (0)