-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate code from specification file
- Loading branch information
1 parent
c039b84
commit c39b13d
Showing
10 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package models | ||
|
||
// ApplicationInitialStates an application's initial global/local/box states that | ||
// were accessed during simulation. | ||
type ApplicationInitialStates struct { | ||
// AppBoxes an application's global/local/box state. | ||
AppBoxes ApplicationKVStorage `json:"app-boxes,omitempty"` | ||
|
||
// AppGlobals an application's global/local/box state. | ||
AppGlobals ApplicationKVStorage `json:"app-globals,omitempty"` | ||
|
||
// AppLocals an application's initial local states tied to different accounts. | ||
AppLocals []ApplicationKVStorage `json:"app-locals,omitempty"` | ||
|
||
// Id application index. | ||
Id uint64 `json:"id"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package models | ||
|
||
// ApplicationKVStorage an application's global/local/box state. | ||
type ApplicationKVStorage struct { | ||
// Account the address of the account associated with the local state. | ||
Account string `json:"account,omitempty"` | ||
|
||
// Kvs key-Value pairs representing application states. | ||
Kvs []AvmKeyValue `json:"kvs"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package models | ||
|
||
// ApplicationStateOperation an operation against an application's global/local/box | ||
// state. | ||
type ApplicationStateOperation struct { | ||
// Account for local state changes, the address of the account associated with the | ||
// local state. | ||
Account string `json:"account,omitempty"` | ||
|
||
// AppStateType type of application state. Value `g` is **global state**, `l` is | ||
// **local state**, `b` is **boxes**. | ||
AppStateType string `json:"app-state-type"` | ||
|
||
// Key the key (name) of the global/local/box state. | ||
Key []byte `json:"key"` | ||
|
||
// NewValue represents an AVM value. | ||
NewValue AvmValue `json:"new-value,omitempty"` | ||
|
||
// Operation operation type. Value `w` is **write**, `d` is **delete**. | ||
Operation string `json:"operation"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package models | ||
|
||
// AvmKeyValue represents an AVM key-value pair in an application store. | ||
type AvmKeyValue struct { | ||
// Key | ||
Key []byte `json:"key"` | ||
|
||
// Value represents an AVM value. | ||
Value AvmValue `json:"value"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package models | ||
|
||
// SimulateInitialStates initial states of resources that were accessed during | ||
// simulation. | ||
type SimulateInitialStates struct { | ||
// AppInitialStates the initial states of accessed application before simulation. | ||
// The order of this array is arbitrary. | ||
AppInitialStates []ApplicationInitialStates `json:"app-initial-states,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters