Skip to content

Commit

Permalink
Updates for mainnet upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Scullard committed Aug 28, 2019
1 parent 48d49fc commit e3091e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/proto/ContractCallLocal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ message ContractFunctionResult {
repeated ContractLoginfo logInfo = 6; // the log info for events returned by the function
}

/* Call a function of the given smart contract instance, giving it functionParameters as its inputs. It can use the given amount of gas, and any unspent gas will be refunded to the paying account.
/* Call a function of the given smart contract instance, giving it functionParameters as its inputs. It will consume the entire given amount of gas.
*
* This is performed locally on the particular node that the client is communicating with. It cannot change the state of the contract instance (and so, cannot spend anything from the instance's cryptocurrency account). It will not have a consensus timestamp. It cannot generate a record or a receipt. The response will contain the output returned by the function call. This is useful for calling getter functions, which purely read the state and don't change it. It is faster and cheaper than a normal call, because it is purely local to a single node. */
message ContractCallLocalQuery {
QueryHeader header = 1; // standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither).
QueryHeader header = 1; // standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). The payment must cover the fees and all of the gas offered.
ContractID contractID = 2; // the contract instance to call, in the format used in transactions
int64 gas = 3; // the amount of gas to use for the call
int64 gas = 3; // the amount of gas to use for the call. All of the gas offered will be charged for.
bytes functionParameters = 4; // which function to call, and the parameters to pass to the function
int64 maxResultSize = 5; // max number of bytes that the result might include. The run will fail if it would have returned more than this number of bytes.
}
Expand Down
9 changes: 9 additions & 0 deletions src/main/proto/ResponseCode.proto
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,13 @@ enum ResponseCodeEnum {
NOT_SPECIAL_ACCOUNT = 94; //The payer account is not a special account(account 0.0.55)
CONTRACT_NEGATIVE_GAS = 95; // Negative gas was offered in smart contract call
CONTRACT_NEGATIVE_VALUE = 96; // Negative value / initial balance was specified in a smart contract call / create
INVALID_FEE_FILE=97; // Failed to update fee file
INVALID_EXCHANGE_RATE_FILE=98; // Failed to update exchange rate file
INSUFFICIENT_LOCAL_CALL_GAS = 99; // Payment tendered for contract local call cannot cover both the fee and the gas
ENTITY_NOT_ALLOWED_TO_DELETE = 100; // Entities with Entity ID below 1000 are not allowed to be deleted
AUTHORIZATION_FAILED = 101; // Violating one of these rules: 1) treasury account can update all entities below 0.0.1000, 2) account 0.0.50 can update all entities from 0.0.51 - 0.0.80, 3) Network Function Master Account A/c 0.0.50 - Update all Network Function accounts & perform all the Network Functions listed below, 4) Network Function Accounts: i) A/c 0.0.55 - Update Address Book files (0.0.101/102), ii) A/c 0.0.56 - Update Fee schedule (0.0.111), iii) A/c 0.0.57 - Update Exchange Rate (0.0.112).
FILE_UPLOADED_PROTO_INVALID = 102; // Fee Schedule Proto uploaded but not valid (append or update is required)
FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK = 103; // Fee Schedule Proto uploaded but not valid (append or update is required)
FEE_SCHEDULE_FILE_PART_UPLOADED = 104; // Fee Schedule Proto File Part uploaded
EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED = 105; // The change on Exchange Rate exceeds Exchange_Rate_Allowed_Percentage
}

0 comments on commit e3091e0

Please sign in to comment.