opensea-creatures
opensea-creatures copied to clipboard
Expected parameter 'from' not passed to function.
Issue
Can't deploy to rinkeby network. My command:
export ALCHEMY_KEY="<your_alchemy_project_id>"
export MNEMONIC="<metmask_mnemonic>"
DEPLOY_CREATURES_SALE=1 yarn truffle deploy --network rinkeby
Error log
Compiling your contracts...
===========================
✔ Fetching solc version list from solc-bin. Attempt #1
> Everything is up to date, there is nothing to compile.
Error: Expected parameter 'from' not passed to function.
at has (~/opensea-creatures/node_modules/truffle/build/webpack:/packages/expect/dist/src/index.js:10:1)
at Object.options (~/opensea-creatures/node_modules/truffle/build/webpack:/packages/expect/dist/src/index.js:19:1)
at Object.fork (~/opensea-creatures/node_modules/truffle/build/webpack:/packages/environment/environment.js:30:1)
at setupDryRunEnvironmentThenRunMigrations (~/opensea-creatures/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:227:1)
at Object.run (~/opensea-creatures/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:215:1)
at Command.run (~/opensea-creatures/node_modules/truffle/build/webpack:/packages/core/lib/command.js:167:1)
Truffle v5.3.13 (core: 5.3.13)
Node v12.18.4
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Setup
ubuntu 20.04 node 12.18.4 Provider: Alchemy
I'm getting this same error
> Compilation warnings encountered:
Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> project:/contracts/CreatureFactory.sol:137:9:
|
137 | address _from,
| ^^^^^^^^^^^^^
,Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> project:/contracts/CreatureFactory.sol:172:22:
|
172 | function ownerOf(uint256 _tokenId) public view returns (address _owner) {
| ^^^^^^^^^^^^^^^^
> Artifacts written to /home/nathan/personal/opensea/nft/openseaNftTutorial/opensea-creatures/build/contracts
> Compiled successfully using:
- solc: 0.8.6+commit.11564f7e.Emscripten.clang
> Duplicate contract names found for OwnableDelegateProxy.
> This can cause errors and unknown behavior. Please rename one of your contracts.
> Duplicate contract names found for ProxyRegistry.
> This can cause errors and unknown behavior. Please rename one of your contracts.
Error: Expected parameter 'from' not passed to function.
at has (/mnt/c/Users/natha/AppData/Roaming/npm/node_modules/truffle/build/webpack:/packages/expect/dist/src/index.js:10:1)
at Object.options (/mnt/c/Users/natha/AppData/Roaming/npm/node_modules/truffle/build/webpack:/packages/expect/dist/src/index.js:19:1)
at Object.fork (/mnt/c/Users/natha/AppData/Roaming/npm/node_modules/truffle/build/webpack:/packages/environment/environment.js:30:1)
at setupDryRunEnvironmentThenRunMigrations (/mnt/c/Users/natha/AppData/Roaming/npm/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:227:1)
at Object.run (/mnt/c/Users/natha/AppData/Roaming/npm/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:215:1)
at Command.run (/mnt/c/Users/natha/AppData/Roaming/npm/node_modules/truffle/build/webpack:/packages/core/lib/command.js:167:1)
Truffle v5.3.14 (core: 5.3.14)
Node v12.18.0
@Rafellus Try configuring your network like this:
@nathanbowley98 search for OwnableDelegateProxy & ProxyRegistry in code you will find 2 contracts for that try renaming one or other.
Any other ideas? I tried @chahakshah111's idea and process.env.OWNER_ADDRESS
is an empty string.