What is the typical amount of RAM needed to store a smart contract?
Can you give some examples and their RAM sizes?
What is the typical amount of RAM needed to store a smart contract?
Can you give some examples and their RAM sizes?
For some examples, you can check the sizes of the wasm
files in EOSIO contracts (sizes are approximate):
$ ls -l eos/build/contracts/* | grep wasm | awk 'BEGIN {print "SIZE \t NAME"} {sum+= $5; n++; print $5/100"KB " $NF} END {print "average: " sum/n/100"KB"}'
SIZE NAME
44.05KB asserter.wasm
345.34KB dice.wasm
59.9KB eosio.bios.wasm
217.36KB eosio.msig.wasm
31.47KB eosio.sudo.wasm
1163.96KB eosio.system.wasm
189.65KB eosio.token.wasm
721.87KB exchange.wasm
30.42KB hello.wasm
234.83KB identity.wasm
3.71KB infinite.wasm
158.93KB multi_index_test.wasm
49.7KB noop.wasm
29.34KB payloadless.wasm
163.42KB proxy.wasm
65.67KB simple.token.wasm
244.44KB stltest.wasm
897.36KB test_api.wasm
300.91KB test_api_db.wasm
140.09KB test_api_mem.wasm
756.55KB test_api_multi_index.wasm
54.43KB test.inline.wasm
108.23KB test_ram_limit.wasm
134.42KB tic_tac_toe.wasm
average: 256.085KB
So I would say the typical size is 200-300KB, but it can go much lower or much higher.
Note that I'm dividing by 100 instead of 1000 because the mainnet is set to take up RAM space 10x the size of the WASM binary