Skip to content
This repository was archived by the owner on Sep 3, 2020. It is now read-only.

Commit fd162d8

Browse files
authored
Merge pull request #33 from tomerweller/master
add bumpseq support
2 parents daf78fa + 3782f4f commit fd162d8

22 files changed

+135
-55
lines changed

generated/stellar-base-generated.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module Stellar
3232
Thresholds = XDR::Opaque[4]
3333
String32 = XDR::String[32]
3434
String64 = XDR::String[64]
35-
SequenceNumber = Uint64
35+
SequenceNumber = Int64
3636
DataValue = XDR::VarOpaque[64]
3737
autoload :AssetType
3838
autoload :Asset
@@ -67,6 +67,7 @@ module Stellar
6767
autoload :ChangeTrustOp
6868
autoload :AllowTrustOp
6969
autoload :ManageDataOp
70+
autoload :BumpSequenceOp
7071
autoload :Operation
7172
autoload :MemoType
7273
autoload :Memo
@@ -99,6 +100,8 @@ module Stellar
99100
autoload :InflationResult
100101
autoload :ManageDataResultCode
101102
autoload :ManageDataResult
103+
autoload :BumpSequenceResultCode
104+
autoload :BumpSequenceResult
102105
autoload :OperationResultCode
103106
autoload :OperationResult
104107
autoload :TransactionResultCode
@@ -128,6 +131,7 @@ module Stellar
128131
autoload :LedgerEntryChange
129132
LedgerEntryChanges = XDR::VarArray[LedgerEntryChange]
130133
autoload :OperationMeta
134+
autoload :TransactionMetaV1
131135
autoload :TransactionMeta
132136
end
133137
module Stellar

generated/stellar/account_merge_result_code.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
# // codes considered as "success" for the operation
1111
# ACCOUNT_MERGE_SUCCESS = 0,
1212
# // codes considered as "failure" for the operation
13-
# ACCOUNT_MERGE_MALFORMED = -1, // can't merge onto itself
14-
# ACCOUNT_MERGE_NO_ACCOUNT = -2, // destination does not exist
15-
# ACCOUNT_MERGE_IMMUTABLE_SET = -3, // source account has AUTH_IMMUTABLE set
16-
# ACCOUNT_MERGE_HAS_SUB_ENTRIES = -4 // account has trust lines/offers
13+
# ACCOUNT_MERGE_MALFORMED = -1, // can't merge onto itself
14+
# ACCOUNT_MERGE_NO_ACCOUNT = -2, // destination does not exist
15+
# ACCOUNT_MERGE_IMMUTABLE_SET = -3, // source account has AUTH_IMMUTABLE set
16+
# ACCOUNT_MERGE_HAS_SUB_ENTRIES = -4, // account has trust lines/offers
17+
# ACCOUNT_MERGE_SEQNUM_TOO_FAR = -5 // sequence number is over max allowed
1718
# };
1819
#
1920
# ===========================================================================
@@ -24,6 +25,7 @@ class AccountMergeResultCode < XDR::Enum
2425
member :account_merge_no_account, -2
2526
member :account_merge_immutable_set, -3
2627
member :account_merge_has_sub_entries, -4
28+
member :account_merge_seqnum_too_far, -5
2729

2830
seal
2931
end

generated/stellar/allow_trust_result_code.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# ALLOW_TRUST_NO_TRUST_LINE = -2, // trustor does not have a trustline
1515
# // source account does not require trust
1616
# ALLOW_TRUST_TRUST_NOT_REQUIRED = -3,
17-
# ALLOW_TRUST_CANT_REVOKE = -4, // source account can't revoke trust,
17+
# ALLOW_TRUST_CANT_REVOKE = -4, // source account can't revoke trust,
1818
# ALLOW_TRUST_SELF_NOT_ALLOWED = -5 // trusting self is not allowed
1919
# };
2020
#

generated/stellar/change_trust_result_code.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
# CHANGE_TRUST_NO_ISSUER = -2, // could not find issuer
1515
# CHANGE_TRUST_INVALID_LIMIT = -3, // cannot drop limit below balance
1616
# // cannot create with a limit of 0
17-
# CHANGE_TRUST_LOW_RESERVE = -4, // not enough funds to create a new trust line,
17+
# CHANGE_TRUST_LOW_RESERVE =
18+
# -4, // not enough funds to create a new trust line,
1819
# CHANGE_TRUST_SELF_NOT_ALLOWED = -5 // trusting self is not allowed
1920
# };
2021
#

generated/stellar/manage_data_op.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#
88
# struct ManageDataOp
99
# {
10-
# string64 dataName;
11-
# DataValue* dataValue; // set to null to clear
10+
# string64 dataName;
11+
# DataValue* dataValue; // set to null to clear
1212
# };
1313
#
1414
# ===========================================================================

generated/stellar/manage_data_result_code.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
# // codes considered as "success" for the operation
1111
# MANAGE_DATA_SUCCESS = 0,
1212
# // codes considered as "failure" for the operation
13-
# MANAGE_DATA_NOT_SUPPORTED_YET = -1, // The network hasn't moved to this protocol change yet
14-
# MANAGE_DATA_NAME_NOT_FOUND = -2, // Trying to remove a Data Entry that isn't there
15-
# MANAGE_DATA_LOW_RESERVE = -3, // not enough funds to create a new Data Entry
16-
# MANAGE_DATA_INVALID_NAME = -4 // Name not a valid string
13+
# MANAGE_DATA_NOT_SUPPORTED_YET =
14+
# -1, // The network hasn't moved to this protocol change yet
15+
# MANAGE_DATA_NAME_NOT_FOUND =
16+
# -2, // Trying to remove a Data Entry that isn't there
17+
# MANAGE_DATA_LOW_RESERVE = -3, // not enough funds to create a new Data Entry
18+
# MANAGE_DATA_INVALID_NAME = -4 // Name not a valid string
1719
# };
1820
#
1921
# ===========================================================================

generated/stellar/operation.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
# void;
3737
# case MANAGE_DATA:
3838
# ManageDataOp manageDataOp;
39+
# case BUMP_SEQUENCE:
40+
# BumpSequenceOp bumpSequenceOp;
3941
# }
4042
# body;
4143
# };

generated/stellar/operation/body.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
# void;
3030
# case MANAGE_DATA:
3131
# ManageDataOp manageDataOp;
32+
# case BUMP_SEQUENCE:
33+
# BumpSequenceOp bumpSequenceOp;
3234
# }
3335
#
3436
# ===========================================================================
@@ -48,6 +50,7 @@ class Body < XDR::Union
4850
switch :account_merge, :destination
4951
switch :inflation
5052
switch :manage_data, :manage_data_op
53+
switch :bump_sequence, :bump_sequence_op
5154

5255
attribute :create_account_op, CreateAccountOp
5356
attribute :payment_op, PaymentOp
@@ -59,6 +62,7 @@ class Body < XDR::Union
5962
attribute :allow_trust_op, AllowTrustOp
6063
attribute :destination, AccountID
6164
attribute :manage_data_op, ManageDataOp
65+
attribute :bump_sequence_op, BumpSequenceOp
6266
end
6367
end
6468
end

generated/stellar/operation_result.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
# InflationResult inflationResult;
3333
# case MANAGE_DATA:
3434
# ManageDataResult manageDataResult;
35+
# case BUMP_SEQUENCE:
36+
# BumpSequenceResult bumpSeqResult;
3537
# }
3638
# tr;
3739
# default:

generated/stellar/operation_result/tr.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
# InflationResult inflationResult;
3030
# case MANAGE_DATA:
3131
# ManageDataResult manageDataResult;
32+
# case BUMP_SEQUENCE:
33+
# BumpSequenceResult bumpSeqResult;
3234
# }
3335
#
3436
# ===========================================================================
@@ -48,6 +50,7 @@ class Tr < XDR::Union
4850
switch :account_merge, :account_merge_result
4951
switch :inflation, :inflation_result
5052
switch :manage_data, :manage_data_result
53+
switch :bump_sequence, :bump_seq_result
5154

5255
attribute :create_account_result, CreateAccountResult
5356
attribute :payment_result, PaymentResult
@@ -60,6 +63,7 @@ class Tr < XDR::Union
6063
attribute :account_merge_result, AccountMergeResult
6164
attribute :inflation_result, InflationResult
6265
attribute :manage_data_result, ManageDataResult
66+
attribute :bump_seq_result, BumpSequenceResult
6367
end
6468
end
6569
end

0 commit comments

Comments
 (0)