anyone in here have any luck using ChainLink? I get an error with this import line and it is based on ChainLink's example: import "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol";

Aug 3, 2021, 9:12 AM
but I get an error of: Import callback not supported
using pragma 0.5.0
Aug 3, 2021, 9:13 AM
bro
lol
use 0.8
Aug 3, 2021, 9:14 AM
yea it is pretty old pragma.
Aug 3, 2021, 9:14 AM
https://github.com/smartcontractkit/chainlink/tree/develop/contracts/src/v0.8
and use these
makes code look like 10000x better
and saves gas
https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/VRFConsumerBase.sol
@jaypersanchez
Aug 3, 2021, 9:16 AM
Sup guys! Does safemath really save gas? I thought since the introduction of checked math it is not necessary anymore
Aug 3, 2021, 9:17 AM
thanks that's the link I'm already using. The example is using pragma 6
Aug 3, 2021, 9:17 AM
not safemath
safemath uses more gas
no safemath saves gas
(solidity 0.8)
:S
0.4 is a nightmare
Aug 3, 2021, 9:18 AM
Btw, does anyone know where I can find how to implement burning and sending a percent of every transaction to a certain address?
Just a code that implements it would be good for analyzing, but if you have videos or articles would be even better!
Aug 3, 2021, 9:18 AM
before transfer, substract from amount
and do another transfer
to burn
Aug 3, 2021, 9:18 AM
and then install 0.8 solc. If you are using Truffle, then change the compiler version in your truffle config
Aug 3, 2021, 9:20 AM
forgetting safemath is soo easy
all you have to do
is use + instead of .add
and * instead of .mul
and your code becomes 10x more clean
:P
:P
Aug 3, 2021, 9:23 AM
I came to solidity after checked math was introduced and I like to rewrite code to get rid of safemath when i copy anything)
Aug 3, 2021, 9:23 AM
:>
on contract
// is a buy
if (to == address(unirouter)) {

}

// is a sell
if (from == address(unipair)){

}
@SimonTianPhD
openzeppelin does not have those
these?
https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/token/ERC721
use these
those are old
and its bad practice to use them
those are 10x better though
better to switch to 0.8
0.4 is so bad lol
just different name
is interface
:P
and why is the contract your forking 0.4?
Aug 3, 2021, 9:39 AM
What accounts should be excluded from fees in reflect contracts?
Aug 3, 2021, 10:00 AM
I got this here.
for a buy, is to == address(router) or to == pair
Sep 10, 2021, 3:44 PM
lol
Sep 10, 2021, 3:46 PM
Neither. To will be the msg.sender. If I am buying something, I need that on my address right🙂
Sep 10, 2021, 3:46 PM
Cool. No consensus has been acheived. A bad block.
Sep 10, 2021, 3:47 PM
wtf?
why your phrases sounds so strange?
Sep 10, 2021, 3:48 PM
I guess we got a chain split here🙃
Sep 10, 2021, 3:48 PM
You got it.
Sep 10, 2021, 3:49 PM
This is wrong. For a sell, to will be the pair and for buy, to will be msg.sender
No need to involve router
Talking about token here, not eth
Sep 10, 2021, 3:52 PM
@mrrobot3_3 Will think about it. spaceowl.eth is not in the group anymore.
Sep 10, 2021, 3:54 PM
So?
Sep 10, 2021, 4:07 PM

© 2024 Draquery.com All rights reserved.