Skip to content

ContractCache

Contract cache is a mapping of addresses to deployedBytecode It is implemented via extending StorageCache and hardcoding slot 0

Constructors

new ContractCache()

new ContractCache(storageCache): ContractCache

Parameters

storageCache: StorageCache= undefined

Returns

ContractCache

Source

packages/state/src/ContractCache.js:11

Properties

storageCache

storageCache: StorageCache

Source

packages/state/src/ContractCache.js:17

Accessors

_checkpoints

get _checkpoints(): number

Returns

number

Source

packages/state/src/ContractCache.js:75

Methods

checkpoint()

checkpoint(): void

Returns

void

Source

packages/state/src/ContractCache.js:62


clear()

clear(): void

Returns

void

Source

packages/state/src/ContractCache.js:30


commit()

commit(): void

Returns

void

Source

packages/state/src/ContractCache.js:23


del()

del(address): void

Parameters

address: EthjsAddress

Returns

void

Source

packages/state/src/ContractCache.js:55


get()

get(address): undefined | Uint8Array

Parameters

address: EthjsAddress

Returns

undefined | Uint8Array

Source

packages/state/src/ContractCache.js:38


has()

has(address): boolean

Parameters

address: EthjsAddress

Returns

boolean

if the cache has the key

Source

packages/state/src/ContractCache.js:70


put()

put(address, bytecode): void

Parameters

address: EthjsAddress

bytecode: Uint8Array

Returns

void

Source

packages/state/src/ContractCache.js:47


revert()

revert(): void

Returns

void

Source

packages/state/src/ContractCache.js:86


size()

size(): number

Returns

number

Source

packages/state/src/ContractCache.js:79