Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot publish openzeppelin-stylus to crates.io #291

Open
3 of 4 tasks
bidzyyys opened this issue Sep 18, 2024 · 0 comments
Open
3 of 4 tasks

[Bug]: Cannot publish openzeppelin-stylus to crates.io #291

bidzyyys opened this issue Sep 18, 2024 · 0 comments
Assignees
Labels
effort: high Large or difficult task. priority: 3 We will resolve this first before everything else. type: bug Something is not working as intended.

Comments

@bidzyyys
Copy link
Collaborator

bidzyyys commented Sep 18, 2024

What happened?

cargo publish -p openzeppelin-stylus --target wasm32-unknown-unknown  --dry-run
...
error[E0407]: method `stv_abi_packed_encoded_size` is not a member of trait `alloy_sol_types::private::SolTypeValue`
  --> src/utils/cryptography/ecdsa.rs:65:1
   |
65 | / sol! {
66 | |     /// Struct with callable data to the `ecrecover` precompile.
67 | |     #[allow(missing_docs)]
68 | |     struct EcRecoverData {
...  |
77 | |     }
78 | | }
   | | ^
   | | |
   | |_not a member of trait `alloy_sol_types::private::SolTypeValue`
   |   help: there is an associated function with a similar name: `stv_abi_encoded_size`
   |
   = note: this error originates in the macro `sol` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0438]: const `PACKED_ENCODED_SIZE` is not a member of trait `alloy_sol_types::SolType`
  --> src/utils/cryptography/ecdsa.rs:65:1
   |
65 | / sol! {
66 | |     /// Struct with callable data to the `ecrecover` precompile.
67 | |     #[allow(missing_docs)]
68 | |     struct EcRecoverData {
...  |
77 | |     }
78 | | }
   | |_^ not a member of trait `alloy_sol_types::SolType`
   |
   = note: this error originates in the macro `sol` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0405]: cannot find trait `IntoLogData` in module `alloy_sol_types::private`
  --> src/access/control.rs:51:1
   |
51 | / sol! {
52 | |     /// Emitted when `new_admin_role` is set as `role`'s admin role, replacing
53 | |     /// `previous_admin_role`.
54 | |     ///
...  |
73 | |     event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
74 | | }
   | |_^ not found in `alloy_sol_types::private`
   |
   = note: this error originates in the macro `sol` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0405]: cannot find trait `IntoLogData` in module `alloy_sol_types::private`
  --> src/access/ownable.rs:19:1
   |
19 | / sol! {
20 | |     /// Emitted when ownership gets transferred between accounts.
21 | |     #[allow(missing_docs)]
22 | |     event OwnershipTransferred(address indexed previous_owner, address indexed new_owner);
23 | | }
   | |_^ not found in `alloy_sol_types::private`
   |
   = note: this error originates in the macro `sol` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0405]: cannot find trait `IntoLogData` in module `alloy_sol_types::private`
  --> src/token/erc20/mod.rs:18:1
   |
18 | / sol! {
19 | |     /// Emitted when `value` tokens are moved from one account (`from`) to
20 | |     /// another (`to`).
21 | |     ///
...  |
28 | |     event Approval(address indexed owner, address indexed spender, uint256 value);
29 | | }
   | |_^ not found in `alloy_sol_types::private`
   |
   = note: this error originates in the macro `sol` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0405]: cannot find trait `IntoLogData` in module `alloy_sol_types::private`
  --> src/token/erc721/extensions/consecutive.rs:71:1
   |
71 | / sol! {
72 | |     /// Emitted when the tokens from `from_token_id` to `to_token_id` are transferred from `from_address` to `to_address`.
73 | |     ///
74 | |     /// * `from_token_id` - First token being transferred.
...  |
84 | |     );
85 | | }
   | |_^ not found in `alloy_sol_types::private`
   |
   = note: this error originates in the macro `sol` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0405]: cannot find trait `IntoLogData` in module `alloy_sol_types::private`
  --> src/token/erc721/extensions/uri_storage.rs:11:1
   |
11 | / sol! {
12 | |     /// This event gets emitted when the metadata of a token is changed.
13 | |     ///
14 | |     /// The event comes from IERC4096.
...  |
23 | |     event BatchMetadataUpdate(uint256 from_token_id, uint256 to_token_id);
24 | | }
   | |_^ not found in `alloy_sol_types::private`
   |
   = note: this error originates in the macro `sol` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0405]: cannot find trait `IntoLogData` in module `alloy_sol_types::private`
  --> src/token/erc721/mod.rs:17:1
   |
17 | / sol! {
18 | |     /// Emitted when the `token_id` token is transferred from `from` to `to`.
19 | |     ///
20 | |     /// * `from` - Address from which the token will be transferred.
...  |
51 | |     event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
52 | | }
   | |_^ not found in `alloy_sol_types::private`
   |
   = note: this error originates in the macro `sol` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0576]: cannot find method or associated constant `PACKED_ENCODED_SIZE` in trait `alloy_sol_types::SolType`
  --> src/utils/cryptography/ecdsa.rs:65:1
   |
65 | / sol! {
66 | |     /// Struct with callable data to the `ecrecover` precompile.
67 | |     #[allow(missing_docs)]
68 | |     struct EcRecoverData {
...  |
77 | |     }
78 | | }
   | |_^ not found in `alloy_sol_types::SolType`
   |
   = note: this error originates in the macro `sol` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0576]: cannot find method or associated constant `abi_packed_encoded_size` in trait `alloy_sol_types::SolType`
   --> src/utils/cryptography/ecdsa.rs:65:1
    |
65  | / sol! {
66  | |     /// Struct with callable data to the `ecrecover` precompile.
67  | |     #[allow(missing_docs)]
68  | |     struct EcRecoverData {
...   |
77  | |     }
78  | | }
    | |_^ help: an associated function with a similar name exists: `abi_encoded_size`
    |
   ::: /Users/bidzyyys/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alloy-sol-types-0.7.6/src/types/ty.rs:130:5
    |
130 |       fn abi_encoded_size<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> usize {
    |       ---------------------------------------------------------------------- similarly named associated function `abi_encoded_size` defined here
    |
    = note: this error originates in the macro `sol` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0405]: cannot find trait `IntoLogData` in module `alloy_sol_types::private`
  --> src/utils/pausable.rs:17:1
   |
17 | / sol! {
18 | |     /// Emitted when pause is triggered by `account`.
19 | |     #[allow(missing_docs)]
20 | |     event Paused(address account);
...  |
24 | |     event Unpaused(address account);
25 | | }
   | |_^ not found in `alloy_sol_types::private`
   |
   = note: this error originates in the macro `sol` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0405, E0407, E0438, E0576.
For more information about an error, try `rustc --explain E0405`.
error: could not compile `openzeppelin-stylus` (lib) due to 11 previous errors

platform

  • linux
  • windows
  • macos

Expected behavior

openzeppelin-stylus should be published to crates.io

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines
@bidzyyys bidzyyys added type: bug Something is not working as intended. needs triage Needs to be assigned the appropriate labels labels Sep 18, 2024
@bidzyyys bidzyyys self-assigned this Sep 18, 2024
@bidzyyys bidzyyys added priority: 3 We will resolve this first before everything else. effort: high Large or difficult task. and removed needs triage Needs to be assigned the appropriate labels labels Sep 18, 2024
@bidzyyys bidzyyys changed the title [Bug]: [Bug]: Cannot publish openzeppelin-stylus to crates.io Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: high Large or difficult task. priority: 3 We will resolve this first before everything else. type: bug Something is not working as intended.
Projects
None yet
Development

No branches or pull requests

1 participant