diff --git a/README.md b/README.md index 897dcd0..bed7a13 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ To ensure compatibility with the node version, check the following versions: | L1 Node | MiniMove | MiniWasm | MiniEVM | | ------- | -------- | -------- | ------- | -| v0.6.1+ | v0.6.3+ | v0.6.3+ | v0.6.6+ | +| v0.6.1+ | v0.6.4+ | v0.6.4+ | v0.6.7+ | ### Build and Configure diff --git a/executor/README.md b/executor/README.md index 94c4c0f..324627b 100644 --- a/executor/README.md +++ b/executor/README.md @@ -90,6 +90,14 @@ To configure the Executor, fill in the values in the `~/.opinit/executor.json` f } ``` +### Oracle config +If the oracle is enabled, the `oracle_bridge_executor` field must be set. The oracle data is stored in the 0th tx of each L1 block. The bridge executor submits a `MsgUpdateOracle` containing the 0th Tx of l1 block to l2 when a block in l1 is created. + +The `oracle_bridge_executor` must be an account that has received the authz grant from the executor. If it is not set, you can set the authz with the command below. +```bash +opinitd tx grant-oracle [oracle-account-address] +``` + ### Start height config examples If the latest height stored in the db is not 0, start height config is ignored. @@ -329,13 +337,18 @@ curl localhost:3000/status ```json { - "bridge_id": 1, + "bridge_id": 0, "host": { "node": { "last_block_height": 0, "broadcaster": { "pending_txs": 0, - "sequence": 0 + "accounts_status": [ + { + "address": "", + "sequence": 0 + } + ] } }, "last_proposed_output_index": 0, @@ -346,7 +359,16 @@ curl localhost:3000/status "last_block_height": 0, "broadcaster": { "pending_txs": 0, - "sequence": 0 + "accounts_status": [ + { + "address": "", + "sequence": 0 + }, + { + "address": "", + "sequence": 0 + } + ] } }, "last_updated_oracle_height": 0, @@ -360,7 +382,7 @@ curl localhost:3000/status }, "batch": { "node": { - "last_block_height": 0, + "last_block_height": 0 }, "batch_info": { "submitter": "", @@ -374,7 +396,12 @@ curl localhost:3000/status "da": { "broadcaster": { "pending_txs": 0, - "sequence": 0 + "accounts_status": [ + { + "address": "", + "sequence": 0 + } + ] } } } @@ -389,20 +416,32 @@ initiad tx ophost finalize-token-withdrawal ./withdrawal-info.json --gas= --gas- ```go type QueryWithdrawalResponse struct { - // fields required to withdraw funds - BridgeId uint64 `json:"bridge_id"` - OutputIndex uint64 `json:"output_index"` - WithdrawalProofs [][]byte `json:"withdrawal_proofs"` - Sender string `json:"sender"` - Sequence uint64 `json:"sequence"` - Amount string `json:"amount"` - Version []byte `json:"version"` - StorageRoot []byte `json:"storage_root"` - LatestBlockHash []byte `json:"latest_block_hash"` - - // extra info - BlockNumber int64 `json:"block_number"` - Receiver string `json:"receiver"` - WithdrawalHash []byte `json:"withdrawal_hash"` + Sequence uint64 `json:"sequence"` + To string `json:"to"` + From string `json:"from"` + Amount types.Coin `json:"amount"` + OutputIndex uint64 `json:"output_index"` + BridgeId uint64 `json:"bridge_id"` + WithdrawalProofs [][]byte `json:"withdrawal_proofs"` + Version []byte `json:"version"` + StorageRoot []byte `json:"storage_root"` + LastBlockHash []byte `json:"last_block_hash"` } ``` + +```bash +curl localhost:3000/withdrawals/{address} +``` +default options +- `limit`: 10 +- `offset`: 0 +- `order`: desc + + +```go +type QueryWithdrawalsResponse struct { + Withdrawals []QueryWithdrawalResponse `json:"withdrawals"` + Next uint64 `json:"next"` + Total uint64 `json:"total"` +} +``` \ No newline at end of file