Skip to content

Commit

Permalink
ping pong interactor - add tests for chain simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
BiancaIalangi committed Oct 23, 2024
1 parent a521a9a commit 5b4d37b
Show file tree
Hide file tree
Showing 15 changed files with 1,066 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ members = [
"contracts/examples/proxy-pause/meta",
"contracts/examples/ping-pong-egld",
"contracts/examples/ping-pong-egld/meta",
"contracts/examples/ping-pong-egld/interactor",
"contracts/examples/ping-pong-egld/dapp",
"contracts/examples/rewards-distribution",
"contracts/examples/rewards-distribution/meta",
Expand Down
10 changes: 10 additions & 0 deletions contracts/examples/ping-pong-egld/interactor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Pem files are used for interactions, but shouldn't be committed
*.pem
*.json
!ping-pong-owner.pem

# Temporary storage of deployed contract address, so we can preserve the context between executions.
state.toml

# Trace file of interactor tooling
interactor_trace.scen.json
29 changes: 29 additions & 0 deletions contracts/examples/ping-pong-egld/interactor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[package]
name = "ping-pong-egld-interact"
version = "0.0.0"
authors = ["Ovidiu Stinga <ovidiu.stinga@multiversx.com>"]
edition = "2021"
publish = false

[[bin]]
name = "ping-pong-egld-interact"
path = "src/interact_main.rs"

[lib]
path = "src/interact.rs"

[dependencies]
clap = { version = "4.4.7", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
toml = "0.8.6"
tokio = { version = "1.24" }

[dependencies.ping-pong-egld]
path = ".."

[dependencies.multiversx-sc-snippets]
version = "0.53.2"
path = "../../../../framework/snippets"

[features]
chain-simulator-tests = []
5 changes: 5 additions & 0 deletions contracts/examples/ping-pong-egld/interactor/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
chain_type = 'simulator'
gateway_uri = 'http://localhost:8085'

# chain_type = 'real'
# gateway_uri = 'https://devnet-gateway.multiversx.com'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN PRIVATE KEY for erd1wm9awlfz4ntp07e4402fd5vd8c69qahxl9ru205n8jq84hme384sda26ca-----
MDdhNTNlOGRiYzQ4N2RhNjIyYjQ1YTgwMzcxODQ1MGE3NWYyNDY3NTQ5MWY4OWM3
ZmNiYmU4NGRmYmRlYWFiZTc2Y2JkNzdkMjJhY2Q2MTdmYjM1YWJkNDk2ZDE4ZDNl
MzQ1MDc2ZTZmOTQ3YzUzZTkzM2M4MDdhZGY3OTg5ZWI=
-----END PRIVATE KEY for erd1wm9awlfz4ntp07e4402fd5vd8c69qahxl9ru205n8jq84hme384sda26ca-----
Loading

0 comments on commit 5b4d37b

Please sign in to comment.