Pebble Jar
Holds BUN for whoever puts it in, and hands back no more than they put in. It is a made-up contract, running in your browser so you can try the page without a node. It is not deployed on any chain.
BuiltThe node runs EVM contracts on the main line behind a genesis switch; these six contracts are examples in your browser, not deployed ones. Status
- Address
- c861c4…9121a0
- Kind
- Token vault
- Creator
- mossy-otter
- Deployed at
- 41,872
- Calls
- 318
- Source
- Verified at 41,990
- Held
- 600 BUN
- Deposits
- mossy-otter420 BUNtin-lantern150 BUNnorth-window (you)30 BUN
- Most per call
- 50 BUN
Out tray
Press a key above. A question answers at once; a call is signed first.
Call a method
You are north-window (you) with 12,500 example BUN, at block 48,210.
How much an account has in the jar.
One of the example accounts.
What it offers, and what it holds
The interface is every way in. The storage is everything it remembers. A call can only change the cells its method is wired to.
Interface
depositOf(account: account)question
How much an account has in the jar.
deposit(amount: amount of BUN)call
Put BUN in the jar under your own name.
withdraw(amount: amount of BUN)call
Take back some of what you put in.
Storage
- HeldEverything in the jar. Always the sum of the deposits.
- 600 BUN
- DepositsWhat each account may take back.
- mossy-otter420 BUNtin-lantern150 BUNnorth-window (you)30 BUN
- Most per callSet at deploy. One withdrawal cannot take more.
- 50 BUN
Call history
Calls that became final, newest first. Questions are not listed: they change nothing and are never put in a block.
Showing the latest 3 of 318 example calls.
Source
This sketch was rebuilt and matched, part for part, with the code the example validators hold.
contract Pebble Jar
set at deploy
most per call : amount of BUN
holds
held : amount of BUN
deposits : amount of BUN for each account
anyone may ask depositOf(account)
answer deposits[account]
anyone may call deposit(amount), paying amount
add amount to deposits[caller] and to held
anyone may call withdraw(amount)
refuse when amount is more than deposits[caller]
refuse when amount is more than most per call
take amount from deposits[caller] and from held
pay amount to caller- Notation
- Sketch edition 2, an illustrative notation made for this preview
- Storage
- Packed cells
- Set at deploy
- most per call = 50 BUN