Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    JMRE
    @JMRE
    Hay alguien pr aqui¿¿?
    Me a un error aqui:
    // Obtener Capital Invertido en tokens
    function equity_in_soveringcoin[address investor]external view returns (uint) {
        return equity_soveringcoin[investor];
    }
    bizso09
    @bizso09
    remixd is broken. it shows the wrong file tree. I cannot see my file
    can somebody help?
    Alex
    @Alex73762280_twitter
    hi
    :)
    I am trying to deploy a simple contract
    Internal JSON-RPC error. { "code": -32000, "message": "gas required exceeds allowance (30000000) or always failing transaction" }
    hehe
    why
    Ali Wisam Ch
    @AliWisam

    creation of SuperRareTokenCreatorRegistry errored: Error encoding arguments: Error: types/values length mismatch (count={"types":1,"values":2}, value={"types":["address[]"],"values":["[0x5B38Da6a701c568545dCfcB03FcB875f56beddC4,",",0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db]"]}, code=INVALID_ARGUMENT, version=abi/5.0.7)

    How to pass an array of addresses to function. It is giving me the error.

    @param _iERC721Creators address[] to set as iERC721Creators.
    Shivam Crypto
    @shivamcrypto_twitter
    Internal JSON-RPC error. { "code": -32000, "message": "gas required exceeds allowance (30000000) or always failing transaction" }
    getting this message when deploying on BSC, any solution?
    abdul sattar
    @tanoli322:matrix.org
    [m]
    hi i want to create my coin can you help me? how i can create step by step?
    yann300
    @yann300
    Edward McMillan
    @Tedmcm
    Hi, Im having TONS of serious problems w/remix and my smart contracts i wrote last year, In the last day all my code is totally blowing up with the imports.. its like when i compile any erc20 token in remix and then try to compile any other contract that has an erc20 import it totally blows up.. even code that the open zeppelin people can get to work on there end and i cut and paste in remix and it works fine.. but then i compile another different token to play with another contract and when i come back to that contract it wont work.. its like remix has a kernal like jupterlab and its inheriting the compile versions into other contracts.. ive tried exiting remix completely.. turning off my computer and exiting out of the remix page and when i come back it does it again. I did a couple of mock ICO's in the past.. compiled.. deployed on test networks and locally on ganache.. and now none will work.. i literally get 19 red errors in remix when i compile... for imports.. I cant figure it out? Does anyone know an actual help line or someone I can speak to to get help?
    Edward McMillan
    @Tedmcm
    does remix have a help line? someone we can actually speak to ?
    yann300
    @yann300
    @Tedmcm which compiler versioin are you using for compiling?
    Jason
    @Jason12359165_twitter
    Which Teams need a developer of smart contracts?
    Edward McMillan
    @Tedmcm
    I am using the version of the pragma for the particular contract.. this is so bizarre.. the openzepplin guys just sent me some totally new imports for a bunch of my contracts that previously worked and then just stopped working.. now those work.. but this problem is still happening w/some contracts.. for example.. i compile an erc20 contract w/a 0.6.0 pragma.. this is one the openzepplin team send me.. it wont compile.. but when i go to another contract.. totally different.. exit out of that contract.. and then in the new one.. and i change the compiler to the new pragma.. and try to compile.. the contract errors and in the error message its stuck on the old compiler.. even when the compilers is set to the new one.. in the address bar you can see the new one.. but the last line of the error says..note that nightly builds are considered to be strickly less than the released version pragma 0.8.0.. this pramga was the old/last contract.. its like its carrying over.. inheriting/keeping the old one.. its like once i compile with a version.. its stuck with that one even if i change the blue compiler button to a different one.. this is causing all my stuff to error and i dont know how to fix it. I have been going back and forth with the openzeppelin guys for 3days now.. is there a remix customer service contact anyone knows about? i think its a bad problem with remix.. idk..
    yann300
    @yann300
    can you send me the contract you are trying to compile?
    Edward McMillan
    @Tedmcm
    here or w/email?
    yann300
    @yann300
    here's or pm is fine if you can
    Edward McMillan
    @Tedmcm
    This is a major problem with remix.. i think somehow the version is corrupted to faulty.. i dont know what to do.. when i compile some contracts it works and then literally go back and try to compile hrs later it doesnt..I just had a colleague look at it and this makes no sense.. i tried to open a new remix window and copy and paste the contracts into a new remix window and they run/compile fine.. I think the copy i have of remix is faulty or has been corrupted some how.. Since we cant save any files with remix i dont know what do but to copy and save all my contracts in a google doc and just try to transfer everything over to a new copy of remix im just paranoid when i shut down my computer and restart the old window of remix will open and I will lose all my stuff every time.. Does anyone know a Remix help line??????
    Shiwu Stonehouse
    @cryptoearner2
    trying to load a contract using At Address not working. Am connected to Metamask with Injected Web3. Not getting any response when inputting contract address and Enter
    bodytexture
    @bodytexture
    hi! new to vyper, I would like to clone a very simple dapp to have a look at the full stack of an ethereum dapp from back end (write compile and deploy a simple contract) to an internet site as a front end facing the internet. where to find an example to have a look at all the details, to better understand all the components involved in the pipeline , and how they interact?
    Denis9k
    @Denis9k
    Hello can anyboday help me? I am trying to build my own locktoken smart contract like ethereum lock token . I copied that and ran to BSC . but I have errors to run that code. please help help me.

    pragma solidity 0.6.12;

    abstract contract Token {
    function balanceOf(address who) external view virtual returns (uint256);
    function allowance(address owner, address spender) external view virtual returns (uint256);
    function transfer(address to, uint256 value) external virtual returns (bool);
    function approve(address spender, uint256 value) external virtual returns (bool);
    function approveAndCall(address spender, uint tokens, bytes memory data) external virtual returns (bool success);
    function transferFrom(address from, address to, uint256 value) external virtual returns (bool);
    }

    library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
    return 0;
    }
    uint256 c = a * b;
    require(c / a == b);
    return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a / b;
    return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a);
    return a - b;
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a);
    return c;
    }

    function ceil(uint256 a, uint256 m) internal pure returns (uint256) {
    uint256 c = add(a,m);
    uint256 d = sub(c,1);
    return mul(div(d,m),m);
    }
    }

    contract owned {
    address public owner;

        constructor() public {
            owner = msg.sender;
        }
    
        modifier onlyOwner {
            require(msg.sender == owner);
            _;
        }
    
        function transferOwnership(address newOwner) onlyOwner public {
            owner = newOwner;
        }

    }

    contract bscLockToken is owned{
    using SafeMath for uint256;

    /*
     * deposit vars
    */
    struct Items {
        address tokenAddress;
        address withdrawalAddress;
        uint256 tokenAmount;
        uint256 unlockTime;
        bool withdrawn;
    }
    
    uint256 public depositId;
    uint256[] public allDepositIds;
    mapping (address => uint256[]) public depositsByWithdrawalAddress;
    mapping (uint256 => Items) public lockedToken;
    mapping (address => mapping(address => uint256)) public walletTokenBalance;
    
    event LogWithdrawal(address SentToAddress, uint256 AmountTransferred);
    
    /**
     * Constrctor function
    */
    constructor() public {
    
    }
    
    /**
     *lock tokens
    */
    function lockTokens(address _tokenAddress, uint256 _amount, uint256 _unlockTime) public returns (uint256 _id) {
        require(_amount > 0, 'token amount is Zero');
        require(_unlockTime < 10000000000, 'Enter an unix timestamp in seconds, not miliseconds');
        require(Token(_tokenAddress).approve(address(this), _amount), 'Approve tokens failed');
        require(Token(_tokenAddress).transferFrom(msg.sender, address(this), _amount), 'Transfer of tokens failed');
    
        //update balance in address
        walletTokenBalance[_tokenAddress][msg.sender] = walletTokenBalance[_tokenAddress][msg.sender].add(_amount);
    
        address _withdrawalAddress = msg.sender;
        _id = ++depositId;
        lockedToken[_id].tokenAddress = _tokenAddress;
        lockedToken[_id].withdrawalAddress = _withdrawalAddress;
        lockedToken[_id].tokenAmount = _amount;
        lockedToken[_id].unlockTime = _unlockTime;
        lockedToken[_id].withdrawn = false;
    
        allDepositIds.push(_id);
        depositsByWithdrawalAddress[_withdrawalAddress].push(_id);
    }
    
    /**
     *withdraw tokens
    */
    function withdrawTokens(uint256 _id) public {
        require(block.timestamp >= lockedToken[_id].unlockTime, 'Tokens are locked');
        require(msg.sender == lockedToken[_id].withdrawalAddress, 'Can withdraw by withdrawal Address only');
        require(!lockedToken[_id].withdrawn, 'Tokens already withdrawn');
        require(Token(lockedToken[_id].tokenAddress).transfer(msg.sender, lockedToken[_id].tokenAmount), 'Transfer of tokens failed');
    
        lockedToken[_id].withdrawn = true;
    
        //up
    Edward McMillan
    @Tedmcm
    Hi, Does anyone know how to contact REMIX??? Is there a help line that you can actually talk. with anyone? I think my remix is faulty and and I have been trying with the openzepplin people for days and I think something is faulty with remix and i need to know how to wipe it or something, the compiler or memory is faulty.. any help would be appreciated..
    yann300
    @yann300
    @Tedmcm please PM your code and I can help, you can also send a mail to remix@ethereum.org
    Denis9k
    @Denis9k
    Screen Shot 2021-03-06 at 20.27.06.png
    hello anybody can help me?
    I can not run this codebase . I am using Interface for IBEP20 . and I am going to use transferfrom function of IBEP20 into my own token contract . but it is not working
    please
    quan-thecreator
    @quan-thecreator

    I'm a complete noob volunteering for non-profits. Why am I having issues with gas?

    pragma solidity ^0.8.0;

    import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol";
    import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Context.sol";

    contract ERC20 is Context, IERC20 {

    mapping (address => uint256) private _balances;
    
    mapping (address => mapping (address => uint256)) private _allowances;
    
    uint256 private _totalSupply;
    
    string private _name;
    string private _symbol;
    
    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The defaut value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
         address Maker= msg.sender;
    address payable theMaker = payable(Maker);
        _mint(theMaker, 1000000);
    }
    
    
    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }
    
    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }
    
    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overloaded;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }
    
    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }
    
    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }
    
    
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }
    
    
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }
    
    
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }
    
    
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
    
        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        _approve(sender, _msgSender(), currentAllowance - amount);
    
        return true;
    }
    
    
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }
    
    
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        _approve(_msgSender(), spender, currentAllowance - subtractedValue);
    
        return true;
    }
    quan-thecreator
    @quan-thecreator

    Second controller contract:

    contract CRAZY{
    address Maker= msg.sender;
    address payable theMaker = payable(Maker);
    uint etherValueOfContract = 0;

    ERC20 dallas;
    constructor(){
        dallas = new ERC20("Dallas", "DAL");
    
    }

    modifier makerOnly{
    require(Maker == msg.sender);
    _;
    }
    function addToValue() public makerOnly payable {
    require(msg.value > 0 ether);
    etherValueOfContract += uint(msg.value);

    }
    function invest() public payable{
    theMaker.transfer(msg.value);
    dallas.transferFrom(theMaker, payable(msg.sender), uint(500 * msg.value));

    }
    function seeWorth(address person) public returns(uint){
    uint balance
    = dallas.balanceOf(person);
    uint rate = uint(etherValueOfContract / dallas.totalSupply());
    return(uint(balance
    * rate));
    }
    }

    Edward McMillan
    @Tedmcm
    @yann300
    quan-thecreator
    @quan-thecreator
    nvmd
    I fixed all the issues that I found
    and it works
    but I'm having trouble with verifying and publishing my contract on ether scan
    error code 2
    coin moon
    @coinmoon7_twitter
    Hello
    how are you doing
    Any one here
    I need some help
    can anyone help me please