-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from multiversx/added-test-caller
Added test-caller contract used in relayer tests
- Loading branch information
Showing
11 changed files
with
344 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,7 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
/target/ | ||
*/target/ | ||
|
||
# The mxpy output | ||
/output*/ |
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,21 @@ | ||
[package] | ||
name = "test-caller" | ||
version = "0.0.0" | ||
authors = ["Iulian Pascalau <[email protected]>"] | ||
edition = "2018" | ||
publish = false | ||
|
||
[lib] | ||
path = "src/test-caller.rs" | ||
|
||
[dependencies.multiversx-sc] | ||
version = "=0.47.5" | ||
|
||
[dependencies.multiversx-sc-modules] | ||
version = "0.47.5" | ||
|
||
[dev-dependencies] | ||
num-bigint = "0.4.2" | ||
|
||
[dev-dependencies.multiversx-sc-scenario] | ||
version = "=0.47.5" |
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,14 @@ | ||
[package] | ||
name = "test-caller-meta" | ||
version = "0.0.0" | ||
edition = "2018" | ||
publish = false | ||
authors = ["you"] | ||
|
||
[dev-dependencies] | ||
|
||
[dependencies.test-caller] | ||
path = ".." | ||
|
||
[dependencies.multiversx-sc-meta] | ||
version = "=0.47.5" |
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,3 @@ | ||
fn main() { | ||
multiversx_sc_meta::cli_main::<test_caller::AbiProvider>(); | ||
} |
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,3 @@ | ||
{ | ||
"language": "rust" | ||
} |
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,25 @@ | ||
#![no_std] | ||
|
||
multiversx_sc::imports!(); | ||
multiversx_sc::derive_imports!(); | ||
|
||
#[multiversx_sc::contract] | ||
pub trait TestCallerContract: | ||
{ | ||
#[init] | ||
fn init(&self) { | ||
} | ||
|
||
#[upgrade] | ||
fn upgrade(&self) { | ||
} | ||
|
||
#[payable("*")] | ||
#[endpoint(callPayable)] | ||
fn call_payable(&self) { | ||
} | ||
|
||
#[endpoint(callNonPayable)] | ||
fn call_non_payable(&self) { | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,31 @@ | ||
# Code generated by the multiversx-sc build system. DO NOT EDIT. | ||
|
||
# ########################################## | ||
# ############## AUTO-GENERATED ############# | ||
# ########################################## | ||
|
||
[package] | ||
name = "test-caller-wasm" | ||
version = "0.0.0" | ||
edition = "2018" | ||
publish = false | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[profile.release] | ||
codegen-units = 1 | ||
opt-level = "z" | ||
lto = true | ||
debug = false | ||
panic = "abort" | ||
overflow-checks = false | ||
|
||
[dependencies.test-caller] | ||
path = ".." | ||
|
||
[dependencies.multiversx-sc-wasm-adapter] | ||
version = "=0.47.5" | ||
|
||
[workspace] | ||
members = ["."] |
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,29 @@ | ||
// Code generated by the multiversx-sc build system. DO NOT EDIT. | ||
|
||
//////////////////////////////////////////////////// | ||
////////////////// AUTO-GENERATED ////////////////// | ||
//////////////////////////////////////////////////// | ||
|
||
// Init: 1 | ||
// Endpoints: 3 | ||
// Async Callback (empty): 1 | ||
// Total number of exported functions: 5 | ||
|
||
#![no_std] | ||
#![allow(internal_features)] | ||
#![feature(lang_items)] | ||
|
||
multiversx_sc_wasm_adapter::allocator!(); | ||
multiversx_sc_wasm_adapter::panic_handler!(); | ||
|
||
multiversx_sc_wasm_adapter::endpoints! { | ||
test_caller | ||
( | ||
init => init | ||
upgrade => upgrade | ||
callPayable => call_payable | ||
callNonPayable => call_non_payable | ||
) | ||
} | ||
|
||
multiversx_sc_wasm_adapter::async_callback_empty! {} |