-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delete username builtin function & tests
- Loading branch information
1 parent
96f2af6
commit fd66d52
Showing
21 changed files
with
554 additions
and
2 deletions.
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 |
---|---|---|
|
@@ -5,6 +5,9 @@ authors = ["Andrei Marinica <[email protected]>"] | |
edition = "2021" | ||
publish = false | ||
|
||
[dev-dependencies.builtin-func-features] | ||
path = "builtin-func-features" | ||
|
||
[dev-dependencies.forwarder] | ||
path = "forwarder" | ||
|
||
|
22 changes: 22 additions & 0 deletions
22
contracts/feature-tests/composability/builtin-func-features/Cargo.toml
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,22 @@ | ||
[package] | ||
name = "builtin-func-features" | ||
version = "0.0.0" | ||
authors = ["Andrei Marinica <[email protected]>"] | ||
edition = "2021" | ||
publish = false | ||
|
||
[lib] | ||
path = "src/builtin_func_features.rs" | ||
|
||
[dependencies.multiversx-sc] | ||
version = "0.43.2" | ||
path = "../../../../framework/base" | ||
|
||
[dependencies.multiversx-sc-wasm-adapter] | ||
version = "0.43.2" | ||
path = "../../../../framework/wasm-adapter" | ||
optional = true | ||
|
||
[dev-dependencies.multiversx-sc-scenario] | ||
version = "0.43.2" | ||
path = "../../../../framework/scenario" |
12 changes: 12 additions & 0 deletions
12
contracts/feature-tests/composability/builtin-func-features/meta/Cargo.toml
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,12 @@ | ||
[package] | ||
name = "builtin-func-features-meta" | ||
version = "0.0.0" | ||
edition = "2021" | ||
publish = false | ||
|
||
[dependencies.builtin-func-features] | ||
path = ".." | ||
|
||
[dependencies.multiversx-sc-meta] | ||
version = "0.43.2" | ||
path = "../../../../../framework/meta" |
3 changes: 3 additions & 0 deletions
3
contracts/feature-tests/composability/builtin-func-features/meta/src/main.rs
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::<builtin_func_features::AbiProvider>(); | ||
} |
3 changes: 3 additions & 0 deletions
3
contracts/feature-tests/composability/builtin-func-features/multiversx.json
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" | ||
} |
31 changes: 31 additions & 0 deletions
31
contracts/feature-tests/composability/builtin-func-features/src/builtin_func_features.rs
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 @@ | ||
#![no_std] | ||
|
||
pub mod builtin_func_proxy; | ||
|
||
multiversx_sc::imports!(); | ||
|
||
/// Test contract for investigating async calls. | ||
#[multiversx_sc::contract] | ||
pub trait BuiltinFuncFeatures { | ||
#[proxy] | ||
fn builtin_func_proxy(&self, to: ManagedAddress) -> builtin_func_proxy::Proxy<Self::Api>; | ||
|
||
#[init] | ||
fn init(&self) {} | ||
|
||
#[endpoint] | ||
fn call_set_user_name(&self, address: ManagedAddress, name: ManagedBuffer) { | ||
self.builtin_func_proxy(address) | ||
.set_user_name(&name) | ||
.async_call() | ||
.call_and_exit() | ||
} | ||
|
||
#[endpoint] | ||
fn call_delete_user_name(&self, address: ManagedAddress) { | ||
self.builtin_func_proxy(address) | ||
.delete_user_name() | ||
.async_call() | ||
.call_and_exit(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
contracts/feature-tests/composability/builtin-func-features/src/builtin_func_proxy.rs
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,10 @@ | ||
multiversx_sc::imports!(); | ||
|
||
#[multiversx_sc::derive::proxy] | ||
pub trait UserBuiltin { | ||
#[endpoint(SetUserName)] | ||
fn set_user_name(&self, name: &ManagedBuffer); | ||
|
||
#[endpoint(DeleteUserName)] | ||
fn delete_user_name(&self); | ||
} |
209 changes: 209 additions & 0 deletions
209
contracts/feature-tests/composability/builtin-func-features/wasm/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
contracts/feature-tests/composability/builtin-func-features/wasm/Cargo.toml
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,26 @@ | ||
[package] | ||
name = "builtin-func-features-wasm" | ||
version = "0.0.0" | ||
authors = ["Andrei Marinica <[email protected]>"] | ||
edition = "2021" | ||
publish = false | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[profile.release] | ||
codegen-units = 1 | ||
opt-level = "z" | ||
lto = true | ||
debug = false | ||
panic = "abort" | ||
|
||
[dependencies.builtin-func-features] | ||
path = ".." | ||
|
||
[dependencies.multiversx-sc-wasm-adapter] | ||
version = "0.43.2" | ||
path = "../../../../../framework/wasm-adapter" | ||
|
||
[workspace] | ||
members = ["."] |
Oops, something went wrong.