# ReceiverActivityUpgradeable ## Methods ### UPGRADE_INTERFACE_VERSION ```solidity function UPGRADE_INTERFACE_VERSION() external view returns (string) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | string | undefined | ### VERSION ```solidity function VERSION() external view returns (string) ``` *current version* #### Returns | Name | Type | Description | |---|---|---| | _0 | string | undefined | ### acceptAdmin ```solidity function acceptAdmin() external nonpayable ``` ### acceptSuperAdmin ```solidity function acceptSuperAdmin() external nonpayable ``` ### changeAdmin ```solidity function changeAdmin(address payable addr) external nonpayable ``` *Allows the current superAdmin to change admin.* #### Parameters | Name | Type | Description | |---|---|---| | addr | address payable | The address to transfer the right of admin to. | ### changeSuperAdmin ```solidity function changeSuperAdmin(address payable addr) external nonpayable ``` *Allows the current superAdmin to change superAdmin.* #### Parameters | Name | Type | Description | |---|---|---| | addr | address payable | The address to transfer the right of superAdmin to. | ### currentPaymentId ```solidity function currentPaymentId() external view returns (uint256) ``` *record current payment's id* #### Returns | Name | Type | Description | |---|---|---| | _0 | uint256 | undefined | ### getOps ```solidity function getOps() external view returns (address[] res) ``` #### Returns | Name | Type | Description | |---|---|---| | res | address[] | undefined | ### getPaidActivityFee ```solidity function getPaidActivityFee(uint256 _paymentId, address _tokenAddress) external view returns (uint256) ``` *get paid activity fee* #### Parameters | Name | Type | Description | |---|---|---| | _paymentId | uint256 | payment id | | _tokenAddress | address | token address, if _tokenAddress is zero address, will return matic balance received. | #### Returns | Name | Type | Description | |---|---|---| | _0 | uint256 | undefined | ### getPaids ```solidity function getPaids(address _user) external view returns (struct ReceiverActivityUpgradeable.Paid[]) ``` *get paid information by user* #### Parameters | Name | Type | Description | |---|---|---| | _user | address | user address | #### Returns | Name | Type | Description | |---|---|---| | _0 | ReceiverActivityUpgradeable.Paid[] | undefined | ### getPayments ```solidity function getPayments() external view returns (struct ReceiverActivityUpgradeable.Payment[]) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | ReceiverActivityUpgradeable.Payment[] | undefined | ### initialize ```solidity function initialize() external nonpayable ``` ### paids ```solidity function paids(address, uint256) external view returns (uint256 paymentId, string tokenName, uint256 amount, address tokenAddress) ``` #### Parameters | Name | Type | Description | |---|---|---| | _0 | address | receiver address | | _1 | uint256 | index | #### Returns | Name | Type | Description | |---|---|---| | paymentId | uint256 | undefined | | tokenName | string | undefined | | amount | uint256 | undefined | | tokenAddress | address | undefined | ### pause ```solidity function pause() external nonpayable ``` *Called by superAdmin to pause the contract. Used when something goes wrong and we need to limit damage.* ### paused ```solidity function paused() external view returns (bool) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | bool | undefined | ### payActivityFee ```solidity function payActivityFee(address _tokenAddress, uint256 _paymentId, uint256 _amount) external payable ``` *pay activity fee* #### Parameters | Name | Type | Description | |---|---|---| | _tokenAddress | address | token address, if _tokenAddress is zero address, will pay native coin | | _paymentId | uint256 | payment id | | _amount | uint256 | amount of token | ### pendingOwner ```solidity function pendingOwner() external view returns (address, address) ``` #### Returns | Name | Type | Description | |---|---|---| | _0 | address | undefined | | _1 | address | undefined | ### proxiableUUID ```solidity function proxiableUUID() external view returns (bytes32) ``` *Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.* #### Returns | Name | Type | Description | |---|---|---| | _0 | bytes32 | undefined | ### receivedTokenBalanceById ```solidity function receivedTokenBalanceById(uint256, address) external view returns (uint256) ``` #### Parameters | Name | Type | Description | |---|---|---| | _0 | uint256 | paymentId | | _1 | address | tokenAddress, Matic if that be zero address | #### Returns | Name | Type | Description | |---|---|---| | _0 | uint256 | balance | ### setOps ```solidity function setOps(address op, bool tf) external nonpayable ``` *set operator* #### Parameters | Name | Type | Description | |---|---|---| | op | address | operator address | | tf | bool | is or not operator | ### setPayment ```solidity function setPayment(uint256 _paymentId, address payable _receiverAddress) external nonpayable ``` *edit or add a payment address* #### Parameters | Name | Type | Description | |---|---|---| | _paymentId | uint256 | payment id, if _paymentId is zero, will create a new payment | | _receiverAddress | address payable | receiver address, not allow zero address and if it is contract address, check it was implement transfer function | ### unpause ```solidity function unpause() external nonpayable ``` *Unpauses the smart contract. Can only be called by the superAdmin.* ### upgradeToAndCall ```solidity function upgradeToAndCall(address newImplementation, bytes data) external payable ``` *Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.* #### Parameters | Name | Type | Description | |---|---|---| | newImplementation | address | undefined | | data | bytes | undefined | ### upgradeVersion ```solidity function upgradeVersion(string _version) external nonpayable ``` *upgrade version* #### Parameters | Name | Type | Description | |---|---|---| | _version | string | new version | ### withdrawBalance ```solidity function withdrawBalance(uint256 amount) external nonpayable ``` *Called by superAdmin to withdraw balance.* #### Parameters | Name | Type | Description | |---|---|---| | amount | uint256 | undefined | ## Events ### ActivityFeePaid ```solidity event ActivityFeePaid(address indexed from, uint256 indexed paymentId, address indexed tokenAddress, uint256 amount, string tokenName) ``` #### Parameters | Name | Type | Description | |---|---|---| | from `indexed` | address | who transfer | | paymentId `indexed` | uint256 | undefined | | tokenAddress `indexed` | address | if tokenAddress its zero address,that is Matic | | amount | uint256 | transfer amount | | tokenName | string | transfer ERC20 or native name | ### Initialized ```solidity event Initialized(uint64 version) ``` *Triggered when the contract has been initialized or reinitialized.* #### Parameters | Name | Type | Description | |---|---|---| | version | uint64 | undefined | ### OwnershipTransferStarted ```solidity event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) ``` #### Parameters | Name | Type | Description | |---|---|---| | previousOwner `indexed` | address | undefined | | newOwner `indexed` | address | undefined | ### OwnershipTransferred ```solidity event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) ``` #### Parameters | Name | Type | Description | |---|---|---| | previousOwner `indexed` | address | undefined | | newOwner `indexed` | address | undefined | ### PaymentChanged ```solidity event PaymentChanged(uint256 indexed paymentId, address indexed receiverAddress) ``` *emit event when payment is changed* #### Parameters | Name | Type | Description | |---|---|---| | paymentId `indexed` | uint256 | undefined | | receiverAddress `indexed` | address | undefined | ### Upgraded ```solidity event Upgraded(address indexed implementation) ``` *Emitted when the implementation is upgraded.* #### Parameters | Name | Type | Description | |---|---|---| | implementation `indexed` | address | undefined | ## Errors ### AddressEmptyCode ```solidity error AddressEmptyCode(address target) ``` *There's no code at `target` (it is not a contract).* #### Parameters | Name | Type | Description | |---|---|---| | target | address | undefined | ### ERC1967InvalidImplementation ```solidity error ERC1967InvalidImplementation(address implementation) ``` *The `implementation` of the proxy is invalid.* #### Parameters | Name | Type | Description | |---|---|---| | implementation | address | undefined | ### ERC1967NonPayable ```solidity error ERC1967NonPayable() ``` *An upgrade function sees `msg.value > 0` that may be lost.* ### FailedInnerCall ```solidity error FailedInnerCall() ``` *A call to an address target failed. The target may have reverted.* ### InvalidInitialization ```solidity error InvalidInitialization() ``` *The contract is already initialized.* ### NotInitializing ```solidity error NotInitializing() ``` *The contract is not initializing.* ### UUPSUnauthorizedCallContext ```solidity error UUPSUnauthorizedCallContext() ``` *The call is from an unauthorized context.* ### UUPSUnsupportedProxiableUUID ```solidity error UUPSUnsupportedProxiableUUID(bytes32 slot) ``` *The storage `slot` is unsupported as a UUID.* #### Parameters | Name | Type | Description | |---|---|---| | slot | bytes32 | undefined |