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 = ...

Returns

ContractCache

Defined in

packages/state/src/ContractCache.js:11

Properties

storageCache

storageCache: StorageCache

Defined in

packages/state/src/ContractCache.js:17

Accessors

_checkpoints

get _checkpoints(): number

Returns

number

Defined in

packages/state/src/ContractCache.js:77

Methods

checkpoint()

checkpoint(): void

Returns

void

Defined in

packages/state/src/ContractCache.js:62


clear()

clear(): void

Returns

void

Defined in

packages/state/src/ContractCache.js:30


commit()

commit(): void

Returns

void

Defined in

packages/state/src/ContractCache.js:23


del()

del(address): void

Parameters

address: EthjsAddress

Returns

void

Defined in

packages/state/src/ContractCache.js:55


get()

get(address): undefined | Uint8Array

Parameters

address: EthjsAddress

Returns

undefined | Uint8Array

Defined in

packages/state/src/ContractCache.js:38


has()

has(address): boolean

Parameters

address: EthjsAddress

Returns

boolean

if the cache has the key

Defined in

packages/state/src/ContractCache.js:70


put()

put(address, bytecode): void

Parameters

address: EthjsAddress

bytecode: Uint8Array

Returns

void

Defined in

packages/state/src/ContractCache.js:47


revert()

revert(): void

Returns

void

Defined in

packages/state/src/ContractCache.js:88


size()

size(): number

Returns

number

Defined in

packages/state/src/ContractCache.js:81