line 48 (address payable msg_sender =)
why on different devices code act differently?
on computer - working. on remix.ethereum.org - syntax error
https://pastebin.com/T8J56TYQ
how can I fix code in right way?
Jun 16, 2022, 11:17 AM
it is wrong lol
is this the issue?
Jun 16, 2022, 11:18 AM
yes. but if I replace msg_sender with msg.sender
i get an error about conversion "address" > "payable address"
i get an error about conversion "address" > "payable address"
Jun 16, 2022, 11:19 AM
show us
Jun 16, 2022, 11:19 AM
i found a way around that error
Jun 16, 2022, 11:19 AM
I can' tunderstand otherwise
this should works
Jun 16, 2022, 11:19 AM
i fixed 62 too)
Jun 16, 2022, 11:20 AM
it is obvious what the error says
no?
payable(author).transfer..
same for the events
Jun 16, 2022, 11:21 AM
its defined as payable
Jun 16, 2022, 11:21 AM
payable(msg.sender)
here you mean?
here there isn't
also that address(_author) is useless
Jun 16, 2022, 11:22 AM
payable(address(_author)).transfer(msg.value);
Jun 16, 2022, 11:22 AM
here I don't see it
Jun 16, 2022, 11:22 AM
is it ok?
Jun 16, 2022, 11:22 AM
maybe you didn't recompile
.
Jun 16, 2022, 11:22 AM
51 - emit ImageCreated(imageCount, _imgHash, _description, 0, msg.sender);
Jun 16, 2022, 11:24 AM
.
.
if you ask for help
read what we say
read what we say
don't ignore our answers
Jun 16, 2022, 11:24 AM
May help me too
Jun 16, 2022, 11:25 AM
i can't read in you screenshot
Jun 16, 2022, 11:26 AM
now its working on my machine
but not in emulator
Jun 16, 2022, 11:27 AM
lol
the error is not on that line
check the red flag
Jun 16, 2022, 11:27 AM
https://pastebin.com/jFh9dDWB
what does it want?
what does it want?
Jun 16, 2022, 11:29 AM
https://pastebin.com/yqggeyqW
@dennis_py
Jun 16, 2022, 11:30 AM
thanks) its happy now
Jun 16, 2022, 11:33 AM
maybe you are using it wrongly
everything works
if something is not working the issue is the user not the code
what do you mean
Jun 16, 2022, 1:53 PM
I don't know what you don't understand
Jun 16, 2022, 1:56 PM
you are forking mainnet
which is the issue then
Jun 16, 2022, 1:56 PM
yes, as per hardhat docs, with alchemy.
I run 'hardhat node --network hardhat'
then 'hardhat deploy'
it says the contract is deployed without error, but all calls fail, suggesting it actually isn't
I run 'hardhat node --network hardhat'
then 'hardhat deploy'
it says the contract is deployed without error, but all calls fail, suggesting it actually isn't
also it's always deployed with the same txhash and has the same address
Jun 16, 2022, 1:59 PM
wait
you can't fork for deployments
only for testing
Jun 16, 2022, 2:02 PM
so I can't deploy and interact locally?
Jun 16, 2022, 2:03 PM
then you have to deploy on hardhat local network
Jun 16, 2022, 2:03 PM
is there a guide on how to deploy uniswap on hardhat local network?
Jun 16, 2022, 2:04 PM
maybe? cyheck on google
Jun 16, 2022, 2:05 PM
thank you for this
Jun 16, 2022, 2:05 PM
what is msg.value ?
is it zero or I can change it somehow?
is it zero or I can change it somehow?
Jun 16, 2022, 2:32 PM
https://ethereum.stackexchange.com/questions/6542/what-are-the-attributes-of-the-msg-object-and-how-can-i-list-them
Jun 16, 2022, 2:33 PM
The amount of ether you're sending with a transaction.
If a minting cost 1eth and you decide to mint, the msg.value of that transaction is the 1eth you will pay.
If a minting cost 1eth and you decide to mint, the msg.value of that transaction is the 1eth you will pay.
Jun 16, 2022, 2:36 PM
how can i use function call
"contract.functions.tipImageOwner"
along with value?
"contract.functions.tipImageOwner"
along with value?
if found that and its working . but i cant use it with functions
web3.py
Jun 16, 2022, 3:00 PM
If you're using web3js you can modify the code above and try it
"Your contract instance".methods.tipImageOwner("id").send({
from: sender,
to: recipient,
value: web3.utils.toWei("amount to send")
})
`
"Your contract instance".methods.tipImageOwner("id").send({
from: sender,
to: recipient,
value: web3.utils.toWei("amount to send")
})
`
/report
Jun 16, 2022, 3:02 PM
/report
ok
Jun 16, 2022, 3:07 PM
What?
Jun 16, 2022, 3:15 PM
i thought u reported me for some reason) i reported u back
sorry)
Jun 16, 2022, 3:16 PM
Nope, someone forwarded some shit and I reported
Jun 16, 2022, 3:17 PM
Lol
What is this, kindergarten?
Jun 16, 2022, 4:04 PM
Bruh xD
So even if there is no fallback, and there exists a payable function, you can use call() to call that
Jun 16, 2022, 4:17 PM
Transfer has a fixed gas limit of 2.3k gas
Call can be anything unless explicitly specified
Jun 16, 2022, 4:19 PM
Oh right, it won't revert the entire call
Jun 16, 2022, 4:21 PM
Yeah, that's something to be careful with
Jun 16, 2022, 4:21 PM
@OxBecks
This is 2.3k btw, you can do lots of stuff using 23k gas :)
Jun 16, 2022, 4:26 PM
You're right my bad :)
The error it emitted is the correct one, I think the error is on your js test
Jun 16, 2022, 4:33 PM
You have to explicitly include those functions in your contract before deployment unless it's an upgradable one
Jun 16, 2022, 4:51 PM
msg.value gives the balance.
Jun 17, 2022, 2:50 PM
I use hardhat
you should find where the compiler version is set
Jun 17, 2022, 2:51 PM
with solcjs if i recall correctly, you need to change the global solidity version for each contract you need to compile
i've just ignored that and used hardhat
Jun 17, 2022, 2:53 PM
you chose happiness instead of stress
Jun 17, 2022, 2:54 PM
2^256 is a lot bigger than you think
Jun 17, 2022, 3:29 PM
1.1579208900000000000000000000000000000000000000000000000000000000000000000000000000000
Jun 17, 2022, 3:30 PM
also any rfi project would dire before reaching it
Jun 17, 2022, 3:32 PM
yeah i guess so 😅
Jun 17, 2022, 3:40 PM