Berry Press
On-chain contracts
On-chain contracts
Network: Base mainnet, chain id 8453.
| Contract | Address |
|---|---|
| USDC (settlement) | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
For the deposit factory, always use the depositFactory field of GET /api/config instead of a saved address.
Main functions
Factory: createVault(address token, uint256 amount) -> address vault
vaultsOf(address creator) -> address[]
Vault: position() -> (token, amount, open)
withdraw() // creator only
press(uint256 minUsdcOut) // operator or creatorEvents
VaultCreated(creator, vault, token, amount, id)
Pressed(creator, usdcGross, creatorValue, protocolMargin)
Withdrawn(creator, tokenReturned, quoteReturned)
InferenceCredited(creator, quoteToken, value)Pressed and InferenceCredited report amounts in USDC with 6 decimals.
Who can call what
- createVault: any wallet, for supported tokens (anything else reverts with UnsupportedToken)
- withdraw: only the vault's creator, and it needs no off-chain service
- press: Berry's operator or the vault's creator; the contract decides where the money goes