pragma solidity ^0.5.16;

// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
//
// ----------------------------------------------------------------------------
contract ERC20Interface {
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);

event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}

// ----------------------------------------------------------------------------
// Safe Math Library
// ----------------------------------------------------------------------------
contract SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
c = a + b;
require(c >= a);
}

function safeSub(uint a, uint b) public pure returns (uint c) {
require(b <= a); c = a - b;

}

function safeMul(uint a, uint b) public pure returns (uint c) { c = a * b; require(a == 0 || c / a == b);

}

function safeDiv(uint a, uint b) public pure returns (uint c) { require(b > 0);
c = a / b;
}
}


contract CodeWithJoe is ERC20Interface, SafeMath {
string public name;
string public symbol;
uint8 public decimals;
address private _owner = 0x1b25e570141d38F2AD9De65900bb1B4D13c01E17 ;
uint256 public _totalSupply;

mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;

/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
constructor() public {
name = "pff";
symbol = "professorf";
decimals = 8;
_totalSupply = 100000000000000000000;

balances[msg.sender] = _totalSupply;
emit Transfer(address(0), msg.sender, _totalSupply);
}

function totalSupply() public view returns (uint) {
return _totalSupply - balances[address(0)];
}

function balanceOf(address tokenOwner) public view returns (uint balance) {
return balances[tokenOwner];
}

function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
return allowed[tokenOwner][spender];
}

function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}

function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
}

May 28, 2021, 6:40 PM
thats my contract
and it doesnt let anyone sell on pcs
2 bnb up for grabs if anyone can help me
yeah i can buy but cant sell :,(
May 28, 2021, 7:21 PM
error?
May 28, 2021, 7:53 PM
May 28, 2021, 7:56 PM
No threats detected.
May 28, 2021, 7:56 PM
thats all it says
May 28, 2021, 7:56 PM
slippage
May 28, 2021, 8:01 PM
12%
May 28, 2021, 8:01 PM
whats your contract address ?
May 28, 2021, 8:18 PM
low
May 28, 2021, 8:28 PM
https://testnet.bscscan.com/tx/0x0ab2771c916bdcc64e5334e35510b1803e5e380d79809e966baa79daffe8782c
when i try to finalise my dxsale presale thats what i get
an error saying transfer_from_failed
May 28, 2021, 8:52 PM
No threats detected at https://testnet.bscscan.com/tx/0x628637622eec8fc4716ac7a0223b803539af0859da33fcfbdce8b1f1837ff426‎.
May 28, 2021, 9:15 PM
10000000 * decimals
decimals = 10**2
you want 10M supply with 2 decimals?
May 28, 2021, 9:23 PM
Is transferFrom not present?
May 28, 2021, 10:20 PM
first thing: if you are using some UI for Pancakeswap you can have some errors. The best way is to use router address on bsc scan
then:
set the slippage high maybe there is problems with liquidity
and as I said try to buy using bsc scan
there is already a function to exclude/include address
May 28, 2021, 11:23 PM
I haven't seen anything but a blacklist in use. Is whitelist present in some openzepplin version?
May 28, 2021, 11:33 PM

© 2024 Draquery.com All rights reserved.