Hi, got another issue in my contract
contracts/AdvancedCollectible.sol:35:29: TypeError: Wrong argument count for function call: 3 arguments given but expected 2.
bytes32 requestId = requestRandomness(keyHash, fee, userProvidedSeed);
^-----------------------------------------------^
contracts/VRFConsumer.sol:37:16: TypeError: Wrong argument count for function call: 2 arguments given but expected 3.
return requestRandomness(keyHash, fee);
Sep 17, 2021, 11:42 AM
When I include userProvidedSeed in VRFConsumer.sol it reduces to
contracts/AdvancedCollectible.sol:35:29: TypeError: Wrong argument count for function call: 3 arguments given but expected 2.
bytes32 requestId = requestRandomness(keyHash, fee, userProvidedSeed);
contracts/AdvancedCollectible.sol:35:29: TypeError: Wrong argument count for function call: 3 arguments given but expected 2.
bytes32 requestId = requestRandomness(keyHash, fee, userProvidedSeed);
Sep 17, 2021, 11:44 AM
where are you running your migration ?
screenshot cause it showing here that you passed in 3 data and the function or is expecting 2
screenshot cause it showing here that you passed in 3 data and the function or is expecting 2
Sep 17, 2021, 11:46 AM
The tutorial is fromPatrick Collins but in his version it gives no error
Sep 17, 2021, 11:57 AM
remove userProvidedseed and retry from both
Sep 17, 2021, 11:59 AM
contracts/VRFConsumer.sol:37:16: TypeError: Wrong argument count for function call: 2 arguments given but expected 3.
return requestRandomness(keyHash, fee);
^-----------------------------^
return requestRandomness(keyHash, fee);
^-----------------------------^
some s*i
t
strange. removed and saved everything
Sep 17, 2021, 12:02 PM
can i see where you used the vrf consumer ?
Sep 17, 2021, 12:07 PM
I only used VRFConsumerBase
Sep 17, 2021, 12:11 PM
also requestRandomness only take two parameters not three
the keyHash and the fee
Sep 17, 2021, 12:12 PM
took it from the tutorial
Sep 17, 2021, 12:12 PM
version 0.6.
requestRandomness only accept two data
requestRandomness only accept two data
Sep 17, 2021, 12:18 PM
oh ok. so there should be a newer one
?
Sep 17, 2021, 12:19 PM
now in line 35 pass in userProvidedSeed
if persist you will have to update the contracts
Sep 17, 2021, 12:22 PM
I do have to as it seems
I changed the file to v0.8 and pragma to 0.8. and it seems to work now
at least itβs downloading sth
I found the solution β¦. I was missing the ^behind pragma solidity ππ€¦ββοΈ
Sep 17, 2021, 3:56 PM