Skip to content

Commit

Permalink
update protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Nov 23, 2024
1 parent ad8d75f commit 212f9a0
Show file tree
Hide file tree
Showing 74 changed files with 86 additions and 2,618 deletions.
9 changes: 0 additions & 9 deletions blocks/antelope/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,3 @@ protogen:
.PHONY: parquet
parquet:
substreams-sink-files run eos.substreams.pinax.network:443 substreams.yaml map_events './out' 386841287:386841787 --encoder parquet --file-block-count 100 --development-mode

.PHONY: parquet-wax
parquet-wax:
substreams-sink-files run wax.substreams.pinax.network:443 substreams.yaml map_events './out' 32233917:32234417 --encoder parquet --file-block-count 100 --development-mode

.PHONY: deploy
deploy:
graph build
graph deploy --studio clock
2 changes: 1 addition & 1 deletion blocks/antelope/src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use substreams::Hex;
use substreams_antelope::pb::TransactionTrace;
use substreams_antelope::Block;

use crate::pb::antelope::Action;
use crate::pb::pinax::antelope::v1::Action;

// https://github.com/pinax-network/firehose-antelope/blob/534ca5bf2aeda67e8ef07a1af8fc8e0fe46473ee/proto/sf/antelope/type/v1/type.proto#L525
pub fn collect_tx_actions(block: &Block, transaction: &TransactionTrace, timestamp: &BlockTimestamp, tx_success: bool) -> Vec<Action> {
Expand Down
2 changes: 1 addition & 1 deletion blocks/antelope/src/blocks.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{pb::antelope::Block as EventsBlock, size::compute_block_size};
use crate::{pb::pinax::antelope::v1::Block as EventsBlock, size::compute_block_size};
use common::structs::BlockTimestamp;
use substreams::Hex;
use substreams_antelope::Block;
Expand Down
2 changes: 1 addition & 1 deletion blocks/antelope/src/db_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use common::structs::BlockTimestamp;
use substreams::Hex;
use substreams_antelope::pb::TransactionTrace;

use crate::pb::antelope::DbOp;
use crate::pb::pinax::antelope::v1::DbOp;

pub fn operation_to_string(operation: i32) -> String {
match operation {
Expand Down
2 changes: 1 addition & 1 deletion blocks/antelope/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::actions::collect_tx_actions;
use crate::blocks::collect_block;
use crate::db_ops::collect_tx_db_ops;
use crate::feature_ops::collect_tx_feature_ops;
use crate::pb::antelope::Events;
use crate::pb::pinax::antelope::v1::Events;
use crate::perm_ops::collect_tx_perm_ops;
use crate::ram_ops::collect_tx_ram_ops;
use crate::table_ops::collect_tx_table_ops;
Expand Down
2 changes: 1 addition & 1 deletion blocks/antelope/src/feature_ops.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use common::structs::BlockTimestamp;
use substreams_antelope::pb::TransactionTrace;

use crate::pb::antelope::FeatureOp;
use crate::pb::pinax::antelope::v1::FeatureOp;

pub fn collect_tx_feature_ops(transaction: &TransactionTrace, timestamp: &BlockTimestamp, tx_success: bool) -> Vec<FeatureOp> {
let mut feature_ops = Vec::new();
Expand Down
12 changes: 8 additions & 4 deletions blocks/antelope/src/pb/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// @generated
// @@protoc_insertion_point(attribute:antelope)
pub mod antelope {
include!("antelope.rs");
// @@protoc_insertion_point(antelope)
pub mod pinax {
pub mod antelope {
// @@protoc_insertion_point(attribute:pinax.antelope.v1)
pub mod v1 {
include!("pinax.antelope.v1.rs");
// @@protoc_insertion_point(pinax.antelope.v1)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @generated
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Events {
Expand Down
2 changes: 1 addition & 1 deletion blocks/antelope/src/perm_ops.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use common::structs::BlockTimestamp;
use substreams_antelope::pb::{PermissionLevel, TransactionTrace};

use crate::pb::antelope::PermOp;
use crate::pb::pinax::antelope::v1::PermOp;

pub fn perm_op_operation_to_string(operation: i32) -> String {
match operation {
Expand Down
2 changes: 1 addition & 1 deletion blocks/antelope/src/ram_ops.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use common::structs::BlockTimestamp;
use substreams_antelope::pb::TransactionTrace;

use crate::pb::antelope::RamOp;
use crate::pb::pinax::antelope::v1::RamOp;

pub fn namespace_to_string(namespace: i32) -> String {
match namespace {
Expand Down
2 changes: 1 addition & 1 deletion blocks/antelope/src/table_ops.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use common::structs::BlockTimestamp;
use substreams_antelope::pb::TransactionTrace;

use crate::pb::antelope::TableOp;
use crate::pb::pinax::antelope::v1::TableOp;

pub fn table_op_operation_to_string(operation: i32) -> String {
match operation {
Expand Down
2 changes: 1 addition & 1 deletion blocks/antelope/src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use common::structs::BlockTimestamp;
use substreams::Hex;
use substreams_antelope::{pb::TransactionTrace, Block};

use crate::pb::antelope::Transaction;
use crate::pb::pinax::antelope::v1::Transaction;

pub fn transaction_status_to_string(status: i32) -> String {
match status {
Expand Down
1 change: 0 additions & 1 deletion blocks/antelope/substreams.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ protobuf:
- sf/substreams
- google


modules:
- name: map_events
kind: map
Expand Down
2 changes: 1 addition & 1 deletion blocks/beacon/substreams.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
specVersion: v0.1.0
package:
name: raw_blocks_beacon
version: v0.6.0
version: v1.0.0
url: https://github.com/pinax-network/substreams-raw-blocks

binaries:
Expand Down
2 changes: 1 addition & 1 deletion blocks/bitcoin/src/blocks.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use common::structs::BlockTimestamp;
use substreams_bitcoin::pb::btc::v1::Block;

use crate::pb::pinax::bitcoin::Block as OutputBlock;
use crate::pb::pinax::bitcoin::v1::Block as OutputBlock;

pub fn collect_block(block: &Block, timestamp: &BlockTimestamp) -> OutputBlock {
// Get the coinbase from the first transaction
Expand Down
2 changes: 1 addition & 1 deletion blocks/bitcoin/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use common::utils::build_timestamp;
use substreams::{errors::Error, pb::substreams::Clock};
use substreams_bitcoin::pb::btc::v1::Block;

use crate::{blocks::collect_block, inputs::collect_transaction_inputs, outputs::collect_transaction_outputs, pb::pinax::bitcoin::Events, transactions::collect_transaction};
use crate::{blocks::collect_block, inputs::collect_transaction_inputs, outputs::collect_transaction_outputs, pb::pinax::bitcoin::v1::Events, transactions::collect_transaction};

#[substreams::handlers::map]
pub fn map_events(clock: Clock, block: Block) -> Result<Events, Error> {
Expand Down
2 changes: 1 addition & 1 deletion blocks/bitcoin/src/inputs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use common::structs::BlockTimestamp;
use substreams_bitcoin::pb::btc::v1::Transaction;

use crate::pb::pinax::bitcoin::Input;
use crate::pb::pinax::bitcoin::v1::Input;

pub fn collect_transaction_inputs(transaction: &Transaction, timestamp: &BlockTimestamp) -> Vec<Input> {
let mut inputs = Vec::new();
Expand Down
2 changes: 1 addition & 1 deletion blocks/bitcoin/src/outputs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use common::structs::BlockTimestamp;
use substreams_bitcoin::pb::btc::v1::Transaction;

use crate::pb::pinax::bitcoin::Output;
use crate::pb::pinax::bitcoin::v1::Output;

pub fn collect_transaction_outputs(transaction: &Transaction, timestamp: &BlockTimestamp) -> Vec<Output> {
let mut outputs = Vec::new();
Expand Down
184 changes: 0 additions & 184 deletions blocks/bitcoin/src/pb/bitcoin.rs

This file was deleted.

Loading

0 comments on commit 212f9a0

Please sign in to comment.