Skip to content

Commit

Permalink
Updated some uint64 too, in case.
Browse files Browse the repository at this point in the history
  • Loading branch information
abourget committed Jan 22, 2019
1 parent 37ae1f8 commit c469226
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ type ClausePair struct {
}

type ABIErrorMessage struct {
Code uint64 `json:"error_code"`
Code Uint64 `json:"error_code"`
Message string `json:"error_msg"`
}
4 changes: 2 additions & 2 deletions system/setram.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ func NewSetRAM(maxRAMSize uint64) *eos.Action {
{AN("eosio"), eos.PermissionName("active")},
},
ActionData: eos.NewActionData(SetRAM{
MaxRAMSize: maxRAMSize,
MaxRAMSize: eos.Uint64(maxRAMSize),
}),
}
return a
}

// SetRAM represents the hard-coded `setram` action.
type SetRAM struct {
MaxRAMSize uint64 `json:"max_ram_size"`
MaxRAMSize eos.Uint64 `json:"max_ram_size"`
}
44 changes: 23 additions & 21 deletions system/types.go
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
package system

import eos "github.com/eoscanada/eos-go"

// BlockchainParameters are all the params we can set through `setparams`.
type BlockchainParameters struct {
MaxBlockNetUsage uint64 `json:"max_block_net_usage"`
TargetBlockNetUsagePct uint32 `json:"target_block_net_usage_pct"`
MaxTransactionNetUsage uint32 `json:"max_transaction_net_usage"`
BasePerTransactionNetUsage uint32 `json:"base_per_transaction_net_usage"`
NetUsageLeeway uint32 `json:"net_usage_leeway"`
ContextFreeDiscountNetUsageNum uint32 `json:"context_free_discount_net_usage_num"`
ContextFreeDiscountNetUsageDen uint32 `json:"context_free_discount_net_usage_den"`
MaxBlockCPUUsage uint32 `json:"max_block_cpu_usage"`
TargetBlockCPUUsagePct uint32 `json:"target_block_cpu_usage_pct"`
MaxTransactionCPUUsage uint32 `json:"max_transaction_cpu_usage"`
MinTransactionCPUUsage uint32 `json:"min_transaction_cpu_usage"`
MaxTransactionLifetime uint32 `json:"max_transaction_lifetime"`
DeferredTrxExpirationWindow uint32 `json:"deferred_trx_expiration_window"`
MaxTransactionDelay uint32 `json:"max_transaction_delay"`
MaxInlineActionSize uint32 `json:"max_inline_action_size"`
MaxInlineActionDepth uint16 `json:"max_inline_action_depth"`
MaxAuthorityDepth uint16 `json:"max_authority_depth"`
MaxGeneratedTransactionCount uint32 `json:"max_generated_transaction_count"`
MaxBlockNetUsage eos.Uint64 `json:"max_block_net_usage"`
TargetBlockNetUsagePct uint32 `json:"target_block_net_usage_pct"`
MaxTransactionNetUsage uint32 `json:"max_transaction_net_usage"`
BasePerTransactionNetUsage uint32 `json:"base_per_transaction_net_usage"`
NetUsageLeeway uint32 `json:"net_usage_leeway"`
ContextFreeDiscountNetUsageNum uint32 `json:"context_free_discount_net_usage_num"`
ContextFreeDiscountNetUsageDen uint32 `json:"context_free_discount_net_usage_den"`
MaxBlockCPUUsage uint32 `json:"max_block_cpu_usage"`
TargetBlockCPUUsagePct uint32 `json:"target_block_cpu_usage_pct"`
MaxTransactionCPUUsage uint32 `json:"max_transaction_cpu_usage"`
MinTransactionCPUUsage uint32 `json:"min_transaction_cpu_usage"`
MaxTransactionLifetime uint32 `json:"max_transaction_lifetime"`
DeferredTrxExpirationWindow uint32 `json:"deferred_trx_expiration_window"`
MaxTransactionDelay uint32 `json:"max_transaction_delay"`
MaxInlineActionSize uint32 `json:"max_inline_action_size"`
MaxInlineActionDepth uint16 `json:"max_inline_action_depth"`
MaxAuthorityDepth uint16 `json:"max_authority_depth"`
MaxGeneratedTransactionCount uint32 `json:"max_generated_transaction_count"`

// replace-regexp \(\w\)_\(\w\) -> \1\,(upcase \2)
// then Cpu -> CPU
}

type EOSIOGlobalState struct {
BlockchainParameters
TotalStorageBytesReserved uint64 `json:"total_storage_bytes_reserved"`
TotalStorageStake uint64 `json:"total_storage_stake"`
PaymentPerBlock uint64 `json:"payment_per_block"`
TotalStorageBytesReserved eos.Uint64 `json:"total_storage_bytes_reserved"`
TotalStorageStake eos.Uint64 `json:"total_storage_stake"`
PaymentPerBlock eos.Uint64 `json:"payment_per_block"`
}

// Nonce represents the `eosio.system::nonce` action. It is used to
Expand Down

0 comments on commit c469226

Please sign in to comment.