Open sam445uutg opened 2 years ago
That's because in fact 0x94870a14597c129b5b460401dc9ee87c053955fc0a89294ffa2b599dd198462a is not a valid ETH address 😄 You can see that just by the length of that number
Maybe you should check if you correctly setted up your private key and everything related to your wallet
Thank for your help
On Mon, Aug 7, 2023, 14:47 ReasonZx @.***> wrote:
That's because in fact 0x94870a14597c129b5b460401dc9ee87c053955fc0a89294ffa2b599dd198462a is not a valid ETH address 😄 You can see that just by the length of that number
Maybe you should check if you correctly setted up your private key and everything related to your wallet
— Reply to this email directly, view it on GitHub https://github.com/PatrickAlphaC/nft-mix/issues/103#issuecomment-1667498685, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATFI6QBK74QCCFRDS45GWQLXUCXCTANCNFSM5246Q6CQ . You are receiving this because you authored the thread.Message ID: @.***>
deploy.py `from brownie import smart_lottery,config, network from scripts.help_scripts import get_accounts, get_contract, fund_with_link import time
def deploy_lottery(): account = get_accounts()
usd=get_contract("eth_usd")
def start__lottery(): account = get_accounts() lottery = smart_lottery[-1] start_lottery=lottery.start_lottery({"from":account}) start_lottery.wait(1) print("lottery is started !!! \n welcome to lottery try your luck here??")
def enter_fee(): account = get_accounts() lottery = smart_lottery[-1] Values = lottery.getenterancefee()+100000000 enter_tx = lottery.enter({"from":account,"value":Values}) enter_tx.wait(1) print("You paid fee")
def end_lottery(): account =get_accounts() lottery= smart_lottery[-1]
fund
def main(): deploy_lottery() start__lottery() enter_fee() end_lottery()`
mainnet-fork: eth_usd: '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419' VRFCoordinator : '0x271682DEB8C4E0901D1a1550aD2e64D568E69909' Link_Token: '0x271682DEB8C4E0901D1a1550aD2e64D568E69909' keyhash: '0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef' fee: 1000000000
wallet: from_key: ${PRIVATE_KEY}
smart-lottery-contract.sol // SPDX-License-Identifier:MIT
pragma solidity <=0.8.0;
import "node_modules/@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; import "node_modules/@openzeppelin/contracts/access/Ownable.sol"; import "node_modules/@chainlink/contracts/src/v0.6/VRFConsumerBase.sol";
contract smart_lottery is VRFConsumerBase, Ownable{ // golbal variable address payable[] public players; uint256 public USD_amt; address payable public winner; AggregatorV3Interface internal ethusd_preice_feed; uint256 public randomness; enum LOTTERY_STATE { CLOSED, OPENED, CALCULATING_WINNER } LOTTERY_STATE public lottery_state; uint256 public fee; bytes32 public keyHash;
} I'm try deploy contract on development its running perfectly fine , but I'm try to deploy in rinkeby testnets its given me this error: PS D:\Users\HP\code1.vscode\blockchain\demo\browine\lottery-smart-contract> brownie run scripts/deploy_lottery.py --network rinkeby INFO: Could not find files for the given pattern(s). Brownie v1.19.0 - Python development framework for Ethereum
LotterySmartContractProject is the active project.
Running 'scripts\deploy_lottery.py::main'... File "C:\Users\HP.local\pipx\venvs\eth-brownie\lib\site-packages\brownie_cli\run.py", line 51, in main
return_value, frame = run( File "C:\Users\HP.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\scripts.py", line 110, in run return_value = f_locals[method_name](*args, **kwargs) File ".\scripts\deploy_lottery.py", line 55, in main deploy_lottery() File ".\scripts\deploy_lottery.py", line 14, in deploy_lottery smart_lottery.deploy(get_contract("eth_usd"), File "C:\Users\HP.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\contract.py", line 542, in call args, tx = _get_tx(None, args) File "C:\Users\HP.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\contract.py", line 1954, in _get_tx tx["from"] = accounts.at(tx["from"], force=True) File "C:\Users\HP.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\account.py", line 244, in at
address = _resolve_address(address) File "C:\Users\HP.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\web3.py", line 195, in _resolve_address return to_address(domain) File "C:\Users\HP.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\convert\main.py", line 43, in to_address
return str(EthAddress(value)) File "C:\Users\HP.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\convert\datatypes.py", line 213, in new raise ValueError(f"'{value}' is not a valid ETH address") from None ValueError: '0x94870a14597c129b5b460401dc9ee87c053955fc0a89294ffa2b599dd198462a' is not a valid ETH address