Setting Config Key and Contract Address
Learn how to set ConfigKey and ContractAddress
Config Key
The precompile config key is used to configure the precompile in the chainConfig
. It's set in the module.go
file of our precompile.
The generator chooses an initial value that should be sufficient for many cases. For the sha256 precompile this is:
This key is used for each precompile in the chainConfig to set the activation timestamp of the precompile.
Contract Address
Each precompile has a unique contract address we can use to call it. This is the address we used earlier to instantiate the precompile in our solidity code or in remix when we interacted with the precompile.
The 0x01
range is reserved for precompiles added by Ethereum.
The 0x02
range is reserved for precompiles provided by Avalanche.
The 0x03
range is reserved for custom precompiles.
Setting ConfigKey and ContractAddress for MD5 Precompile
Set a custom precompile address in the md5/module.go
file.