Cyfrin / foundry-smart-contract-lottery-cu

47 stars 42 forks source link

I got into this Error While Trying to run the Interaction.s.sol script #26

Closed BondeYash closed 1 year ago

BondeYash commented 1 year ago

Traces: [5085245] → new FundSubscription@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519 └─ ← 25175 bytes of code

[4576984] FundSubscription::run() ├─ [4508481] → new HelperConfig@0xC7f2Cf4845C6db0e1a1e91ED41Bcd0FcC1b0E141 │ ├─ [0] VM::startBroadcast() │ │ └─ ← () │ ├─ [1206889] → new VRFCoordinatorV2Mock@0x0c1712ecfB1C56d3cFFf8DB9FB00e49F20FE96CB │ │ └─ ← 5805 bytes of code │ ├─ [746241] → new LinkToken@0xbDd6e59163e5fffE339Fea57F6F64217Be566b95 │ │ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: 0xADC8A5dE0081B84c6A347E35Cb3E6B6C9C16397D, amount: 1000000000000000000000000 [1e24]) │ │ └─ ← 3267 bytes of code │ ├─ [0] VM::stopBroadcast() │ │ └─ ← () │ └─ ← 11644 bytes of code ├─ [985] HelperConfig::activeNetworkConfig() [staticcall] │ └─ ← 10000000000000000 [1e16], 30, VRFCoordinatorV2Mock: [0x0c1712ecfB1C56d3cFFf8DB9FB00e49F20FE96CB], 0x474e34a077df58807dbe9c96d3c009b23b3c6d0cce433e59bbf5b34f823bc56c, 4401, 500000 [5e5], LinkToken: [0xbDd6e59163e5fffE339Fea57F6F64217Be566b95] ├─ [0] console::9710a9d0(00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000001131000000000000000000000000000000000000000000000000000000000000001546756e64696e6720537562736372697074696f6e200000000000000000000000) [staticcall] │ └─ ← () ├─ [0] console::log(Using vrfCoordinator, VRFCoordinatorV2Mock: [0x0c1712ecfB1C56d3cFFf8DB9FB00e49F20FE96CB]) [staticcall] │ └─ ← () ├─ [0] console::9710a9d0(00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000000000000000000000000000000000000000000a4f6e20636861696e496400000000000000000000000000000000000000000000) [staticcall] │ └─ ← () ├─ [0] VM::startBroadcast() │ └─ ← () ├─ [2659] VRFCoordinatorV2Mock::fundSubscription(4401, 3000000000000000000 [3e18]) │ └─ ← "InvalidSubscription()" └─ ← "InvalidSubscription()"

== Logs == Funding Subscription 4401 Using vrfCoordinator 0x0c1712ecfB1C56d3cFFf8DB9FB00e49F20FE96CB On chainId 11155111 Error: Script failed.

PatrickAlphaC commented 1 year ago

Hello! Thanks for making this issue.

Can you:

  1. Make this a discusson on the full repo? https://github.com/Cyfrin/foundry-full-course-f23/discussions

  2. Could you please remember to follow this section to format your questions? https://youtu.be/umepbfKp5rI?t=22464