Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Complete PCX(bevm -> chainx)
  • Loading branch information
icodezjb committed Dec 18, 2023
commit d9a1931a38eca530aca501dc94cf3fc8f265f7d6
Binary file added docs/account-convert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 30 additions & 1 deletion docs/chainxbridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,36 @@ TODO
TODO

### 2.3 PCX(bevm -> chainx)
TODO
ChainXBridge(mainnet): **0xd1543A52d770D32854fc5f5F076a74033D49D41f**

通过remix调用ChainXBridge合约中的**withdrawPCX**
```solidity
function withdrawPCX(
uint256 value,
bytes32 chainxPubkey
) external autoIncreaseNonce returns (bool) {
return SystemWithdraw.withdrawPCX(value, chainxPubkey);
}
```

下载ChainX源码,启动remixd
```bash
$ git clone https://github.com/chainx-org/ChainX.git
$ cd ChainX
$ bash scripts/remix.sh
```

metamask连接chainx-evm
![img.png](remix-chainx-bridge.png)

在"At Address": 填入chainx bridge合约地址 **0xd1543A52d770D32854fc5f5F076a74033D49D41f**

调用 "withdrawPCX": 第一个参数填pcx balance(decimals=8), 第二个参数填chainx账户的公钥


chainx账户转公钥可用下面的工具: https://scan.chainx.org/tools/SS58
![img.png](account-convert.png)


## 3. Query balance

Expand Down
Binary file added docs/remix-chainx-bridge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.