Skip to content

code size to deposit exceeds maximum code size #1884

Open
@demos2022

Description

// SPDX-License-Identifier: MIT

pragma solidity 0.6.0;
contract SimpleStorage {
uint256 favoriteNumber;
// This is a comment!
struct People {
uint256 favoriteNumber;
string name;
}
People[] public people;
mapping(string => uint256) public nameToFavoriteNumber;

function store(uint256 _favoriteNumber) public {
    favoriteNumber = _favoriteNumber;
}

function retrieve() public view returns (uint256){
    return favoriteNumber;
}
function addPerson(string memory _name, uint256 _favoriteNumber) public {
    people.push(People(_favoriteNumber, _name));
    nameToFavoriteNumber[_name] = _favoriteNumber;
}

}

This is my contract
I get this error message - alueError: {'message': 'VM Exception while processing transaction: code size to deposit exceeds maximum code size', 'stack': 'RuntimeError: VM Exception while processing transaction: code size to deposit exceeds maximum code size\n at LegacyTransaction.fillFromResult

If I remove all the functions from my contract, my transaction goes through

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions