U256

Concurrent Uint256 Array

The U256 contract is a concurrent array specialized for storing uint256 data. It inherits from the Base contract to utilize container functionalities for uint256 storage.

Constructor

U256()

constructor()

Constructor for the U256 contract.

Public Functions

push

function push(uint256 elem) public virtual

Add a uint256 data element to the concurrent array.

  • Parameters:

    • elem: The uint256 data element to add to the array.

pop

function pop() public virtual returns (uint256)

Remove and return the last uint256 data element from the concurrent array.

  • Returns:

    • uint256: The last uint256 data element from the array.

get

function get(uint256 idx) public virtual returns (uint256)

Retrieve the uint256 data element at the given index from the concurrent array.

  • Parameters:

    • idx: The index of the uint256 data element to retrieve.

  • Returns:

    • uint256: The uint256 data element stored at the given index.

set

function set(uint256 idx, uint256 elem) public

Set the uint256 data element at the given index in the concurrent array.

  • Parameters:

    • idx: The index where the uint256 data element should be stored.

    • elem: The uint256 data element to be stored at the specified index.

Last updated