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

Duplicate definition of Transfer #182

Open
DevYourDreams opened this issue Apr 1, 2024 · 2 comments
Open

Duplicate definition of Transfer #182

DevYourDreams opened this issue Apr 1, 2024 · 2 comments
Assignees

Comments

@DevYourDreams
Copy link

Hello,

I have the following error when I try to transfer amount to my local contract :

npx hardhat test npx hardhat node npx hardhat transfer-link --recipient 0xa16E02E87b7454126E5E10d957A927A7F5B5d2be --amount 1000 --network localhost

Duplicate definition of Transfer (Transfer(address,address,uint256,bytes), Transfer(address,address,uint256))
An unexpected error occurred:

Error: invalid contract address or ENS name (argument="addressOrName", value=undefined, code=INVALID_ARGUMENT, version=contracts/5.7.0)
at Logger.makeError (location/hardhat-starter-kit/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
at Logger.throwError (location/hardhat-starter-kit/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
at Logger.throwArgumentError (location/hardhat-starter-kit/node_modules/@ethersproject/logger/src.ts/index.ts:285:21)
at Contract.BaseContract (location/hardhat-starter-kit/node_modules/@ethersproject/contracts/src.ts/index.ts:712:20)
at new Contract (location/hardhat-starter-kit/node_modules/@ethersproject/contracts/lib/index.js:1053:42)
at Function.ContractFactory.getContract (location/hardhat-starter-kit/node_modules/@ethersproject/contracts/src.ts/index.ts:1297:16)
at ContractFactory.attach (location/hardhat-starter-kit/node_modules/@ethersproject/contracts/src.ts/index.ts:1260:42)
at SimpleTaskDefinition.action (location/hardhat-starter-kit/tasks/transfer-link.js:21:51)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Environment._runTaskDefinition (location/hardhat-starter-kit/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14) {
reason: 'invalid contract address or ENS name',
code: 'INVALID_ARGUMENT',
argument: 'addressOrName',
value: undefined
}

And of course, later there is an error when I try to generate a random number with direct funding. I just add it because I don't know how to extract the error from it

npx hardhat request-random-number-direct-funding --callbackgaslimit 400000 --requestconfirmations 1 --numwords 1 --contract 0xa16E02E87b7454126E5E10d957A927A7F5B5d2be --network localhost
Requesting a random number using VRF consumer contract 0xa16E02E87b7454126E5E10d957A927A7F5B5d2be on network localhost
An unexpected error occurred:

Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="lastRequestId()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)
at Logger.makeError (location/hardhat-starter-kit/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
at Logger.throwError (location/hardhat-starter-kit/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
at Interface.decodeFunctionResult (location/hardhat-starter-kit/node_modules/@ethersproject/abi/src.ts/interface.ts:427:23)
at Contract. (location/hardhat-starter-kit/node_modules/@ethersproject/contracts/src.ts/index.ts:400:44)
at step (location/hardhat-starter-kit/node_modules/@ethersproject/contracts/lib/index.js:48:23)
at Object.next (location/hardhat-starter-kit/node_modules/@ethersproject/contracts/lib/index.js:29:53)
at fulfilled (location/hardhat-starter-kit/node_modules/@ethersproject/contracts/lib/index.js:20:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
reason: null,
code: 'CALL_EXCEPTION',
method: 'lastRequestId()',
data: '0x',
errorArgs: null,
errorName: null,
errorSignature: null,
address: '0xa16E02E87b7454126E5E10d957A927A7F5B5d2be',
args: [],
transaction: {
data: '0xfc2a88c3',
to: '0xa16E02E87b7454126E5E10d957A927A7F5B5d2be',
from: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
}
}

@andrejrakic andrejrakic self-assigned this Apr 1, 2024
@andrejrakic
Copy link
Contributor

Hi @DevYourDreams, did you run npx hardhat test npx hardhat node npx hardhat transfer-link --recipient 0xa16E02E87b7454126E5E10d957A927A7F5B5d2be --amount 1000 --network localhost as provided here, or as three separate commands? Thank you in advance!

@DevYourDreams
Copy link
Author

Hi @andrejrakic, I ran it in 3 separate commands. I didn't see the formatting :
npx hardhat test -> ok
npx hardhat node -> ok
npx hardhat transfer-link --recipient 0xa16E02E87b7454126E5E10d957A927A7F5B5d2be --amount 1000 --network localhost -> failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants