Smart Contracts

Asteroid Protocol Contracts

Asteroid

interface IAsteroid {
/* _ids = [short_id, arweave_tx], _uints = [nonce, _rate], _extra_uints = [ratios, topics, topic_ratios] */
function mint (string[] memory _ids, bytes[] memory _signatures, uint[] memory _uints, bytes32 _extra, address[] memory _recipients, uint[][] memory _extra_uints) external;
function update (string[] memory _ids, bytes[] memory _signatures, uint[] memory _uints, bytes32 _extra, address[] memory _recipients, uint[][] memory _extra_uints) external;
}

Topics

interface ITopic {
function mintTopic (string[] memory _ids, bytes[] memory _signatures, uint[] memory _uints, bytes32 _extra) external;
function updateTopic (string[] memory _ids, bytes[] memory _signatures, uint[] memory _uints, bytes32 _extra) external;
}

Events

event UpdateItem (string id, address token, uint token_id, string arweave, address indexed owner, uint fee, uint rate, uint[] topics);
event UpdateTopic (string id, address token, uint token_id, string arweave, address indexed owner, uint fee);
event Tip(address indexed from, address[2] tokens, uint from_amount, address[] to, uint[] to_amounts, uint payback, string id, string ref, uint[] topics, uint[] topic_amounts, uint indexed season);

Parameters

interface IParameters {
function treasury () external view returns (address);
function minAmount () external view returns (uint);
function min_tip () external view returns(uint);
function tip_recipients (string memory id) external view returns (address[] memory);
function tip_ratios (string memory id) external view returns (uint[] memory);
function article_topics (string memory id) external view returns (uint[] memory);
function article_topic_ratios (string memory id) external view returns (uint[] memory);
function tip_rate (string memory id) external view returns (uint);
function token () external view returns (address);
function topic () external view returns (address);
function maxRate () external view returns (uint);
function minRate () external view returns (uint);
function ids (string memory id) external view returns (uint);
function nonces (string memory id) external view returns (uint);
function contracts (string memory id) external view returns (address);
function long_ids (uint _tokenId) external view returns (bytes32);
function short_ids (bytes32 _hash) external view returns (string memory);
function topic_ids (string memory id) external view returns (uint);
function topic_nonces (string memory id) external view returns (uint);
function topic_contracts (string memory id) external view returns (address);
function topic_long_ids (uint _tokenId) external view returns (bytes32);
function topic_short_ids (bytes32 _hash) external view returns (string memory);
}