📖Data Access
How to access different data inside wav3s.sol
There is public information about the state of actions and budgets in the contract useful for frontend and client apps to create a great user experience for Zurfers.
Direct Values
The following are public single variables:
nextActionId
uint256
The next ActionId to be emitted
protocolFee
uint256
The percentage of the budget charged by the protocol per action funded.
baseFee
uint256
The base fee in native currency charged by the protocol each time a fundAction is called.
s_NativeCurrencyProtocolWallet
uint256
The amount of native currency fees acumulated by the protocol.
Mappings
The following are public accesible mappings:
s_PubIdToActionNameToActionDataBase
[string: "pubId"][string: "actionName"]
struct ActionDataBase
Access ActionDataBase struct by giving pubId and actionName values.
s_PubIdToActionNameToActionDataFilters
[string: "pubId"][string: "actionName"]
struct ActionDataFilters
Access ActionDataFilters struct by giving pubId and actionName values.
s_currencyWhitelisted
[address: "currency"]
bool
Returns true if currency is whitelisted.
s_superCurrencyWhitelisted
[address: "currency"]
bool
Returns true if currency is whitelisted as superCurrency.
s_appAddressToAppFee
[address: "appAddress"]
uint256
Returns the fee in percetage that the app charges.
s_userToCurrencyToWalletBudget
[address: "user"][address: "currency"]
uint256
Returns the internal currency balance of the user.
s_userToNativeCurrencyToWalletBudget
[address: "user"]
uint256
Returns the internal native currency balance of the user.
s_CurrencyToProtocolWallet
[address: "currency"]
uint256
Returns the acumulated protocol fees of the currency.
s_appToCurrencyToWallet
[address: "appAddress"][address: "currency"]
uint256
Returns the acumulated APP fees of the currency.
Structs
Structs can give you access to data related to recorded actions:
ActionDataBase
ActionDataFilters
Then, you can access the "currency" used in an Action by calling the mapping:
Last updated