github.com/Finschia/finschia-sdk@v0.49.1/proto/lbm/fbridge/v1/fbridge.proto (about) 1 syntax = "proto3"; 2 package lbm.fbridge.v1; 3 4 option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; 5 6 import "google/protobuf/timestamp.proto"; 7 import "gogoproto/gogo.proto"; 8 9 message Params { 10 // ratio of how many operators' confirmations are needed to be valid. 11 Fraction operator_trust_level = 1 [(gogoproto.nullable) = false]; 12 // ratio of how many guardians' confirmations are needed to be valid. 13 Fraction guardian_trust_level = 2 [(gogoproto.nullable) = false]; 14 // ratio of how many judges' confirmations are needed to be valid. 15 Fraction judge_trust_level = 3 [(gogoproto.nullable) = false]; 16 // default timelock period for each provision (unix timestamp) 17 uint64 timelock_period = 4; 18 // default period of the proposal to update the role 19 uint64 proposal_period = 5; 20 // target denom of the bridge module. This is the base denom of Finschia normally. 21 string target_denom = 6; 22 } 23 24 // Provision is a struct that represents a provision internally. 25 message ProvisionData { 26 // the sequence number of the bridge request 27 uint64 seq = 1; 28 // the amount of token to be claimed 29 string amount = 2 30 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; 31 // the sender address on the source chain 32 string sender = 3; 33 // the recipient address on the destination chain 34 string receiver = 4; 35 } 36 37 // ProvisionStatus is a struct that represents the status of a provision. 38 // To optimize computational cost, we have collected frequently changing values from provision. 39 message ProvisionStatus { 40 // the unix timestamp the provision will be able to be claimed (unix timestamp) 41 uint64 timelock_end = 1; 42 // a value that tells how many operators have submitted this provision 43 int32 confirm_counts = 2; 44 // whether the provision has been claimed 45 bool is_claimed = 3; 46 } 47 48 // Fraction defines the protobuf message type for tmmath.Fraction that only 49 // supports positive values. 50 message Fraction { 51 uint64 numerator = 1; 52 uint64 denominator = 2; 53 } 54 55 // Role defines the role of the operator, guardian, and judge. 56 enum Role { 57 option (gogoproto.goproto_enum_prefix) = false; 58 59 UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "RoleEmpty"]; 60 GUARDIAN = 1 [(gogoproto.enumvalue_customname) = "RoleGuardian"]; 61 OPERATOR = 2 [(gogoproto.enumvalue_customname) = "RoleOperator"]; 62 JUDGE = 3 [(gogoproto.enumvalue_customname) = "RoleJudge"]; 63 } 64 65 message RolePair { 66 string address = 1; 67 Role role = 2; 68 } 69 70 message RoleProposal { 71 uint64 id = 1; 72 // the proposer address 73 string proposer = 2; 74 // the address to update the role 75 string target = 3; 76 // the role to be updated 77 // - unspecified : 0, used to remove the address from a group 78 // - guardian : 1 79 // - operator : 2 80 // - judge : 3 81 Role role = 4; 82 83 // the unix timestamp the proposal will be expired (unix timestamp) 84 google.protobuf.Timestamp expired_at = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; 85 } 86 87 // VoteOption enumerates the valid vote options for a given role proposal. 88 enum VoteOption { 89 option (gogoproto.goproto_enum_prefix) = false; 90 91 // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. 92 VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"]; 93 // VOTE_OPTION_YES defines a yes vote option. 94 VOTE_OPTION_YES = 1 [(gogoproto.enumvalue_customname) = "OptionYes"]; 95 // VOTE_OPTION_NO defines a no vote option. 96 VOTE_OPTION_NO = 2 [(gogoproto.enumvalue_customname) = "OptionNo"]; 97 } 98 99 // Vote defines a vote on a role proposal. 100 message Vote { 101 option (gogoproto.equal) = false; 102 103 uint64 proposal_id = 1; 104 string voter = 2; 105 VoteOption option = 3; 106 } 107 108 // RoleMetadata defines the metadata of the role. 109 message RoleMetadata { 110 // the number of registered guardians 111 uint64 guardian = 1; 112 // the number of the operators 113 uint64 operator = 2; 114 // the number of the judges 115 uint64 judge = 3; 116 } 117 118 enum BridgeStatus { 119 option (gogoproto.goproto_enum_prefix) = false; 120 121 // BRIDGE_STATUS_UNSPECIFIED defines an unspecified bridge status. 122 BRIDGE_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusEmpty"]; 123 124 // BRIDGE_STATUS_ACTIVE defines an active bridge status. 125 BRIDGE_STATUS_ACTIVE = 1 [(gogoproto.enumvalue_customname) = "StatusActive"]; 126 // BRIDGE_STATUS_INACTIVE defines an inactive bridge status. 127 BRIDGE_STATUS_INACTIVE = 2 [(gogoproto.enumvalue_customname) = "StatusInactive"]; 128 } 129 130 // BridgeStatusMetadata defines the metadata of the bridge status. 131 message BridgeStatusMetadata { 132 // the number of inactived bridge switch 133 uint64 inactive = 1; 134 // the number of activated bridge switch 135 uint64 active = 2; 136 }