From 4ec0f887d48518a3b829861cfa59a84a06bd6b3a Mon Sep 17 00:00:00 2001 From: Eason Date: Mon, 23 Oct 2023 13:40:35 +0800 Subject: [PATCH 1/2] docs: fix precompile and system contract address --- docs/contract/precompile_contracts.md | 30 ++++++++++----------------- docs/contract/system_contacts.md | 4 ++-- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/docs/contract/precompile_contracts.md b/docs/contract/precompile_contracts.md index 3f6877cb..92429a65 100644 --- a/docs/contract/precompile_contracts.md +++ b/docs/contract/precompile_contracts.md @@ -18,67 +18,61 @@ The address precompile contract is described by the last 2 bytes: | Byte range [0..18] | Byte range [18..20] | | --- | --- | -| 0000000000000000 | `addr` | +| 000000000000000000000000000000000000 | `addr` | ### EcRecover | ADDRESS | MINIMUM GAS | INPUT | OUTPUT | | --- | --- | --- | --- | -| 0x00000000000000000001 | 3000 | hash, v, r, s | publicAddress | +| 0x0000000000000000000000000000000000000001 | 3000 | hash, v, r, s | publicAddress | EcRecover is a elliptic curve digital signature algorithm (ECDSA) public key recovery function. For details, see [this page](https://www.evm.codes/precompiled#0x01?fork=london). - ### SHA2-256 | ADDRESS | MINIMUM GAS | INPUT | OUTPUT | | --- | --- | --- | --- | -| 0x00000000000000000002 | 60 | data | hash | +| 0x0000000000000000000000000000000000000002 | 60 | data | hash | SHA2-256 is the hash function used in Bitcoin. For details, see [this page](https://www.evm.codes/precompiled#0x02?fork=london) - ### RIPEMD-160 | ADDRESS | MINIMUM GAS | INPUT | OUTPUT | | --- | --- | --- | --- | -| 0x00000000000000000003 | 600 | data | hash | +| 0x0000000000000000000000000000000000000003 | 600 | data | hash | A hash function. For details, see [this page](https://www.evm.codes/precompiled#0x03?fork=london). - ### Identity | ADDRESS | MINIMUM GAS | INPUT | OUTPUT | | --- | --- | --- | --- | -| 0x00000000000000000004 | 15 | data | data | +| 0x0000000000000000000000000000000000000004 | 15 | data | data | Identity copies and returns input data. For details, see [this page](https://www.evm.codes/precompiled#0x04?fork=london). - ### Modexp | ADDRESS | MINIMUM GAS | INPUT | OUTPUT | | --- | --- | --- | --- | -| 0x00000000000000000005 | 200 | Bsize, Esize, Msize, B, E, M | value | +| 0x0000000000000000000000000000000000000005 | 200 | Bsize, Esize, Msize, B, E, M | value | Modexp is an arbitrary-precision exponentiation under modulo. For details, see [this page](https://www.evm.codes/precompiled#0x05?fork=london). - ### EcAdd | ADDRESS | MINIMUM GAS | INPUT | OUTPUT | | --- | --- | --- | --- | -| 0x00000000000000000006 | 150 | x1, x2, y1, y2 | x, y | +| 0x0000000000000000000000000000000000000006 | 150 | x1, x2, y1, y2 | x, y | EcAdd is the point addition (ADD) on the elliptic curve alt_bn128. For details, see [this page](https://www.evm.codes/precompiled#0x06?fork=london). - ### EcMul | ADDRESS | MINIMUM GAS | INPUT | OUTPUT | | --- | --- | --- | --- | -| 0x00000000000000000007 | 6000 | x1, x2, s | x, y | +| 0x0000000000000000000000000000000000000007 | 6000 | x1, x2, s | x, y | EcMul is the scalar multiplication (MUL) on the elliptic curve alt_bn128. For details, see [this page](https://www.evm.codes/precompiled#0x07?fork=london). @@ -86,7 +80,7 @@ EcMul is the scalar multiplication (MUL) on the elliptic curve alt_bn128. For de | ADDRESS | MINIMUM GAS | INPUT | OUTPUT | | --- | --- | --- | --- | -| 0x00000000000000000008 | 45000 | x1, y1, x2, y2, …, xk, yk | success | +| 0x0000000000000000000000000000000000000008 | 45000 | x1, y1, x2, y2, …, xk, yk | success | EcPairing is the bilinear function on groups on the elliptic curve `alt_bn128`. For details, see [this page](https://www.evm.codes/precompiled#0x08?fork=london). @@ -94,11 +88,10 @@ EcPairing is the bilinear function on groups on the elliptic curve `alt_bn128`. | ADDRESS | MINIMUM GAS | INPUT | OUTPUT | | --- | --- | --- | --- | -| 0x00000000000000000009 | 0 | rounds, h, m, t, f | h | +| 0x0000000000000000000000000000000000000009 | 0 | rounds, h, m, t, f | h | Blake2f is the compression function F used in the BLAKE2 cryptographic hashing algorithm. For details, see [this page](https://www.evm.codes/precompiled#0x09?fork=london). - ### GetHeader 🚧 Information updates in progress - stay tuned! @@ -111,7 +104,7 @@ Blake2f is the compression function F used in the BLAKE2 cryptographic hashing a | ADDRESS | MINIMUM GAS | INPUT | OUTPUT | | --- | --- | --- | --- | -| 0x00000000000000000104 | 300 | cell dep, args | big-endian bytes | +| 0x0000000000000000000000000000000000000104 | 300 | cell dep, args | big-endian bytes | Call a script that runs in CKB-VM and return the execute result. @@ -186,4 +179,3 @@ contract CallCkbVm { ### VerifyInCkbVm 🚧 Information updates in progress - stay tuned! - diff --git a/docs/contract/system_contacts.md b/docs/contract/system_contacts.md index 5338a413..c821fa80 100644 --- a/docs/contract/system_contacts.md +++ b/docs/contract/system_contacts.md @@ -29,7 +29,7 @@ The Metadata Contract records the metadata of the chain, such as validator ident ### Address ``` -0x10000000000000000001 +0xffffffffffffffffffffffffffffffffffffff01 ``` ### ABI @@ -328,7 +328,7 @@ The CKB Light Client Contract is the light client on Axon for CKB Layer 1. It re ### Address ``` -0x10000000000000000003 +0xffffffffffffffffffffffffffffffffffffff03 ``` ### ABI From eb5bcf8e685e768617da28057e9dab0e7be0b553 Mon Sep 17 00:00:00 2001 From: Eason Date: Mon, 23 Oct 2023 14:52:30 +0800 Subject: [PATCH 2/2] fix image cell contract address --- docs/contract/system_contacts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contract/system_contacts.md b/docs/contract/system_contacts.md index c821fa80..905e759b 100644 --- a/docs/contract/system_contacts.md +++ b/docs/contract/system_contacts.md @@ -449,7 +449,7 @@ The Image Cell Contract stores the CKB Layer 1 cells in Axon, allowing applicati ### Address ``` -0x10000000000000000004 +0xffffffffffffffffffffffffffffffffffffff04 ``` ### ABI