Skip to content

feat(test): unit test external call mock POC #1655

feat(test): unit test external call mock POC

feat(test): unit test external call mock POC #1655

Triggered via pull request November 29, 2024 06:06
Status Failure
Total duration 1m 7s
Artifacts

check.yml

on: pull_request
nightly / fmt
22s
nightly / fmt
nightly / doc
56s
nightly / doc
ubuntu / stable / features
35s
ubuntu / stable / features
ubuntu / stable / typos
3s
ubuntu / stable / typos
Matrix: clippy
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 58 warnings
ubuntu / stable / features
the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
ubuntu / stable / features
failed to resolve: use of undeclared crate or module `imp`
ubuntu / stable / features
Process completed with exit code 1.
[clippy] lib/motsu/src/lib.rs#L52: lib/motsu/src/lib.rs#L52
warning: unneeded sub `cfg` when there is only one condition --> lib/motsu/src/lib.rs:52:7 | 52 | #[cfg(all(test))] | ^^^^^^^^^ help: try: `test` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg = note: `-W clippy::non-minimal-cfg` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::non_minimal_cfg)]`
[clippy] lib/motsu/src/context.rs#L81: lib/motsu/src/context.rs#L81
warning: this method could have a `#[must_use]` attribute --> lib/motsu/src/context.rs:81:5 | 81 | pub fn get_msg_sender(&self) -> Option<Address> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn get_msg_sender(&self) -> Option<Address>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate = note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::must_use_candidate)]`
[clippy] lib/motsu/src/context.rs#L360: lib/motsu/src/context.rs#L360
warning: this method could have a `#[must_use]` attribute --> lib/motsu/src/context.rs:360:5 | 360 | pub fn new(address: Address) -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new(address: Address) -> Self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
[clippy] lib/motsu/src/context.rs#L368: lib/motsu/src/context.rs#L368
warning: this method could have a `#[must_use]` attribute --> lib/motsu/src/context.rs:368:5 | 368 | pub fn random() -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn random() -> Self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
[clippy] lib/motsu/src/context.rs#L372: lib/motsu/src/context.rs#L372
warning: this method could have a `#[must_use]` attribute --> lib/motsu/src/context.rs:372:5 | 372 | pub fn address(&self) -> Address { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn address(&self) -> Address` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
[clippy] lib/motsu/src/context.rs#L376: lib/motsu/src/context.rs#L376
warning: this method could have a `#[must_use]` attribute --> lib/motsu/src/context.rs:376:5 | 376 | pub fn sender(&self, account: Account) -> ContractCall<ST> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn sender(&self, account: Account) -> ContractCall<ST>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
[clippy] lib/motsu/src/shims.rs#L257: lib/motsu/src/shims.rs#L257
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:257:45 | 257 | Context::current().read_return_data_raw(_dest, _size) | ^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:253:5 | 253 | _dest: *mut u8, | ^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding = note: `-W clippy::used-underscore-binding` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::used_underscore_binding)]`
[clippy] lib/motsu/src/shims.rs#L257: lib/motsu/src/shims.rs#L257
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:257:52 | 257 | Context::current().read_return_data_raw(_dest, _size) | ^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:255:5 | 255 | _size: usize, | ^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
[clippy] lib/motsu/src/shims.rs#L284: lib/motsu/src/shims.rs#L284
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:284:9 | 284 | _contract, | ^^^^^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:276:5 | 276 | _contract: *const u8, | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
[clippy] lib/motsu/src/shims.rs#L285: lib/motsu/src/shims.rs#L285
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:285:9 | 285 | _calldata, | ^^^^^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:277:5 | 277 | _calldata: *const u8, | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
[clippy] lib/motsu/src/shims.rs#L286: lib/motsu/src/shims.rs#L286
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:286:9 | 286 | _calldata_len, | ^^^^^^^^^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:278:5 | 278 | _calldata_len: usize, | ^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
[clippy] lib/motsu/src/shims.rs#L287: lib/motsu/src/shims.rs#L287
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:287:9 | 287 | _return_data_len, | ^^^^^^^^^^^^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:281:5 | 281 | _return_data_len: *mut usize, | ^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
[clippy] lib/motsu/src/context.rs#L322: lib/motsu/src/context.rs#L322
warning: missing documentation for a struct --> lib/motsu/src/context.rs:322:1 | 322 | pub struct ContractCall<ST: StorageType> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: requested on the command line with `-W missing-docs`
[clippy] lib/motsu/src/context.rs#L329: lib/motsu/src/context.rs#L329
warning: missing documentation for a method --> lib/motsu/src/context.rs:329:5 | 329 | pub fn address(&self) -> Address { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L354: lib/motsu/src/context.rs#L354
warning: missing documentation for a struct --> lib/motsu/src/context.rs:354:1 | 354 | pub struct Contract<ST: StorageType> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L360: lib/motsu/src/context.rs#L360
warning: missing documentation for an associated function --> lib/motsu/src/context.rs:360:5 | 360 | pub fn new(address: Address) -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L368: lib/motsu/src/context.rs#L368
warning: missing documentation for an associated function --> lib/motsu/src/context.rs:368:5 | 368 | pub fn random() -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L372: lib/motsu/src/context.rs#L372
warning: missing documentation for a method --> lib/motsu/src/context.rs:372:5 | 372 | pub fn address(&self) -> Address { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L376: lib/motsu/src/context.rs#L376
warning: missing documentation for a method --> lib/motsu/src/context.rs:376:5 | 376 | pub fn sender(&self, account: Account) -> ContractCall<ST> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L386: lib/motsu/src/context.rs#L386
warning: missing documentation for a struct --> lib/motsu/src/context.rs:386:1 | 386 | pub struct Account { | ^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L392: lib/motsu/src/context.rs#L392
warning: missing documentation for an associated function --> lib/motsu/src/context.rs:392:5 | 392 | pub const fn new(address: Address) -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L397: lib/motsu/src/context.rs#L397
warning: missing documentation for an associated function --> lib/motsu/src/context.rs:397:5 | 397 | pub fn random() -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L402: lib/motsu/src/context.rs#L402
warning: missing documentation for a method --> lib/motsu/src/context.rs:402:5 | 402 | pub fn address(&self) -> Address { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] contracts/src/utils/context.rs#L15: contracts/src/utils/context.rs#L15
warning: this function could have a `#[must_use]` attribute --> contracts/src/utils/context.rs:15:1 | 15 | pub fn msg_sender() -> Address { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn msg_sender() -> Address` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate = note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::must_use_candidate)]`
[clippy] lib/motsu/src/lib.rs#L52: lib/motsu/src/lib.rs#L52
warning: unneeded sub `cfg` when there is only one condition --> lib/motsu/src/lib.rs:52:7 | 52 | #[cfg(all(test))] | ^^^^^^^^^ help: try: `test` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg = note: `-W clippy::non-minimal-cfg` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::non_minimal_cfg)]`
[clippy] lib/motsu/src/context.rs#L81: lib/motsu/src/context.rs#L81
warning: this method could have a `#[must_use]` attribute --> lib/motsu/src/context.rs:81:5 | 81 | pub fn get_msg_sender(&self) -> Option<Address> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn get_msg_sender(&self) -> Option<Address>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate = note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::must_use_candidate)]`
[clippy] lib/motsu/src/context.rs#L360: lib/motsu/src/context.rs#L360
warning: this method could have a `#[must_use]` attribute --> lib/motsu/src/context.rs:360:5 | 360 | pub fn new(address: Address) -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new(address: Address) -> Self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
[clippy] lib/motsu/src/context.rs#L368: lib/motsu/src/context.rs#L368
warning: this method could have a `#[must_use]` attribute --> lib/motsu/src/context.rs:368:5 | 368 | pub fn random() -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn random() -> Self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
[clippy] lib/motsu/src/context.rs#L372: lib/motsu/src/context.rs#L372
warning: this method could have a `#[must_use]` attribute --> lib/motsu/src/context.rs:372:5 | 372 | pub fn address(&self) -> Address { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn address(&self) -> Address` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
[clippy] lib/motsu/src/context.rs#L376: lib/motsu/src/context.rs#L376
warning: this method could have a `#[must_use]` attribute --> lib/motsu/src/context.rs:376:5 | 376 | pub fn sender(&self, account: Account) -> ContractCall<ST> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn sender(&self, account: Account) -> ContractCall<ST>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
[clippy] lib/motsu/src/shims.rs#L257: lib/motsu/src/shims.rs#L257
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:257:45 | 257 | Context::current().read_return_data_raw(_dest, _size) | ^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:253:5 | 253 | _dest: *mut u8, | ^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding = note: `-W clippy::used-underscore-binding` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::used_underscore_binding)]`
[clippy] lib/motsu/src/shims.rs#L257: lib/motsu/src/shims.rs#L257
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:257:52 | 257 | Context::current().read_return_data_raw(_dest, _size) | ^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:255:5 | 255 | _size: usize, | ^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
[clippy] lib/motsu/src/shims.rs#L284: lib/motsu/src/shims.rs#L284
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:284:9 | 284 | _contract, | ^^^^^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:276:5 | 276 | _contract: *const u8, | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
[clippy] lib/motsu/src/shims.rs#L285: lib/motsu/src/shims.rs#L285
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:285:9 | 285 | _calldata, | ^^^^^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:277:5 | 277 | _calldata: *const u8, | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
[clippy] lib/motsu/src/shims.rs#L286: lib/motsu/src/shims.rs#L286
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:286:9 | 286 | _calldata_len, | ^^^^^^^^^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:278:5 | 278 | _calldata_len: usize, | ^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
[clippy] lib/motsu/src/shims.rs#L287: lib/motsu/src/shims.rs#L287
warning: used underscore-prefixed binding --> lib/motsu/src/shims.rs:287:9 | 287 | _return_data_len, | ^^^^^^^^^^^^^^^^ | note: binding is defined here --> lib/motsu/src/shims.rs:281:5 | 281 | _return_data_len: *mut usize, | ^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
[clippy] lib/motsu/src/context.rs#L322: lib/motsu/src/context.rs#L322
warning: missing documentation for a struct --> lib/motsu/src/context.rs:322:1 | 322 | pub struct ContractCall<ST: StorageType> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: requested on the command line with `-W missing-docs`
[clippy] lib/motsu/src/context.rs#L329: lib/motsu/src/context.rs#L329
warning: missing documentation for a method --> lib/motsu/src/context.rs:329:5 | 329 | pub fn address(&self) -> Address { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L354: lib/motsu/src/context.rs#L354
warning: missing documentation for a struct --> lib/motsu/src/context.rs:354:1 | 354 | pub struct Contract<ST: StorageType> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L360: lib/motsu/src/context.rs#L360
warning: missing documentation for an associated function --> lib/motsu/src/context.rs:360:5 | 360 | pub fn new(address: Address) -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L368: lib/motsu/src/context.rs#L368
warning: missing documentation for an associated function --> lib/motsu/src/context.rs:368:5 | 368 | pub fn random() -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L372: lib/motsu/src/context.rs#L372
warning: missing documentation for a method --> lib/motsu/src/context.rs:372:5 | 372 | pub fn address(&self) -> Address { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L376: lib/motsu/src/context.rs#L376
warning: missing documentation for a method --> lib/motsu/src/context.rs:376:5 | 376 | pub fn sender(&self, account: Account) -> ContractCall<ST> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L386: lib/motsu/src/context.rs#L386
warning: missing documentation for a struct --> lib/motsu/src/context.rs:386:1 | 386 | pub struct Account { | ^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L392: lib/motsu/src/context.rs#L392
warning: missing documentation for an associated function --> lib/motsu/src/context.rs:392:5 | 392 | pub const fn new(address: Address) -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L397: lib/motsu/src/context.rs#L397
warning: missing documentation for an associated function --> lib/motsu/src/context.rs:397:5 | 397 | pub fn random() -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^
[clippy] lib/motsu/src/context.rs#L402: lib/motsu/src/context.rs#L402
warning: missing documentation for a method --> lib/motsu/src/context.rs:402:5 | 402 | pub fn address(&self) -> Address { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[clippy] contracts/src/utils/context.rs#L15: contracts/src/utils/context.rs#L15
warning: this function could have a `#[must_use]` attribute --> contracts/src/utils/context.rs:15:1 | 15 | pub fn msg_sender() -> Address { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn msg_sender() -> Address` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate = note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::must_use_candidate)]`
nightly / doc: contracts/src/access/control.rs#L117
unexpected `cfg` condition value: `export-abi`
nightly / doc: contracts/src/access/ownable.rs#L123
unexpected `cfg` condition value: `export-abi`
nightly / doc: contracts/src/access/ownable_two_step.rs#L143
unexpected `cfg` condition value: `export-abi`
nightly / doc: contracts/src/finance/vesting_wallet.rs#L346
unexpected `cfg` condition value: `export-abi`
nightly / doc: contracts/src/token/erc1155/mod.rs#L387
unexpected `cfg` condition value: `export-abi`
nightly / doc: contracts/src/token/erc20/extensions/capped.rs#L46
unexpected `cfg` condition value: `export-abi`
nightly / doc: contracts/src/token/erc20/extensions/metadata.rs#L64
unexpected `cfg` condition value: `export-abi`
nightly / doc: contracts/src/token/erc20/extensions/permit.rs#L84
unexpected `cfg` condition value: `export-abi`
nightly / doc: contracts/src/token/erc20/utils/safe_erc20.rs#L231
unexpected `cfg` condition value: `export-abi`
nightly / doc: contracts/src/token/erc20/mod.rs#L256
unexpected `cfg` condition value: `export-abi`