Skip to content

Commit

Permalink
switched from pascal case to camel case
Browse files Browse the repository at this point in the history
  • Loading branch information
pavitthrap committed Feb 3, 2023
1 parent 9911a8d commit dab5d0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions docs/event-dispatcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Example:
},
{
"burnchain_op": {
"TransferStx": {
"transfer_stx": {
"burn_block_height": 10,
"burn_header_hash": "1410131010105914101010101013704010101010221010101010101010101010",
"memo": "0x000102030405",
Expand Down Expand Up @@ -156,7 +156,7 @@ Example:
- TransferStx
```json
{
"TransferStx": {
"transfer_stx": {
"burn_block_height": 10,
"burn_header_hash": "1410131010105914101010101013704010101010221010101010101010101010",
"memo": "0x000102030405",
Expand All @@ -180,7 +180,7 @@ Example:
- StackStx
```json
{
"StackStx": {
"stack_stx": {
"burn_block_height": 10,
"burn_header_hash": "1010101010101010101010101010101010101010101010101010101010101010",
"num_cycles": 10,
Expand All @@ -200,7 +200,7 @@ Example:
- DelegateStx
```json
{
"DelegateStx": {
"delegate_stx": {
"burn_block_height": 10,
"burn_header_hash": "1010101010101010101010101010101010101010101010101010101010101010",
"delegate_to": {
Expand Down
16 changes: 8 additions & 8 deletions src/chainstate/burn/operations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ impl BlockstackOperationType {

pub fn pre_stx_to_json(op: &PreStxOp) -> serde_json::Value {
json!({
"PreStx": {
"pre_stx": {
"burn_block_height": op.block_height,
"burn_header_hash": &op.burn_header_hash.to_hex(),
"output": stacks_addr_serialize(&op.output),
Expand All @@ -445,7 +445,7 @@ impl BlockstackOperationType {

pub fn stack_stx_to_json(op: &StackStxOp) -> serde_json::Value {
json!({
"StackStx": {
"stack_stx": {
"burn_block_height": op.block_height,
"burn_header_hash": &op.burn_header_hash.to_hex(),
"num_cycles": op.num_cycles,
Expand All @@ -460,7 +460,7 @@ impl BlockstackOperationType {

pub fn transfer_stx_to_json(op: &TransferStxOp) -> serde_json::Value {
json!({
"TransferStx": {
"transfer_stx": {
"burn_block_height": op.block_height,
"burn_header_hash": &op.burn_header_hash.to_hex(),
"memo": memo_serialize(&op.memo),
Expand All @@ -475,7 +475,7 @@ impl BlockstackOperationType {

pub fn delegate_stx_to_json(op: &DelegateStxOp) -> serde_json::Value {
json!({
"DelegateStx": {
"delegate_stx": {
"burn_block_height": op.block_height,
"burn_header_hash": &op.burn_header_hash.to_hex(),
"delegate_to": stacks_addr_serialize(&op.delegate_to),
Expand Down Expand Up @@ -571,7 +571,7 @@ mod test {
};
let serialized_json = BlockstackOperationType::transfer_stx_to_json(&op);
let constructed_json = json!({
"TransferStx": {
"transfer_stx": {
"burn_block_height": 10,
"burn_header_hash": "1010101010101010101010101010101010101010101010101010101010101010",
"memo": "0x000102030405",
Expand Down Expand Up @@ -618,7 +618,7 @@ mod test {
};
let serialized_json = BlockstackOperationType::stack_stx_to_json(&op);
let constructed_json = json!({
"StackStx": {
"stack_stx": {
"burn_block_height": 10,
"burn_header_hash": "1010101010101010101010101010101010101010101010101010101010101010",
"num_cycles": 10,
Expand Down Expand Up @@ -651,7 +651,7 @@ mod test {
};
let serialized_json = BlockstackOperationType::pre_stx_to_json(&op);
let constructed_json = json!({
"PreStx": {
"pre_stx": {
"burn_block_height": 10,
"burn_header_hash": "1010101010101010101010101010101010101010101010101010101010101010",
"output": {
Expand Down Expand Up @@ -693,7 +693,7 @@ mod test {
};
let serialized_json = BlockstackOperationType::delegate_stx_to_json(&op);
let constructed_json = json!({
"DelegateStx": {
"delegate_stx": {
"burn_block_height": 10,
"burn_header_hash": "1010101010101010101010101010101010101010101010101010101010101010",
"delegate_to": {
Expand Down

0 comments on commit dab5d0b

Please sign in to comment.