smartcontractkit/hardhat-starter-kit

Duplicate definition of Transfer

DevYourDreams opened this issue · 2 comments

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'
}
}

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!

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