mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 19:02:28 +00:00
core: remove interop methods from interopContext
If interops are defined as a separate functions they can be implemented in a separate packages which can help us to structure core.
This commit is contained in:
parent
6d9c59f7fe
commit
efddcf3bfe
7 changed files with 390 additions and 389 deletions
|
@ -31,55 +31,55 @@ func TestUnexpectedNonInterops(t *testing.T) {
|
|||
|
||||
// All of these functions expect an interop item on the stack.
|
||||
funcs := []func(*interopContext, *vm.VM) error{
|
||||
(*interopContext).accountGetBalance,
|
||||
(*interopContext).accountGetScriptHash,
|
||||
(*interopContext).accountGetVotes,
|
||||
(*interopContext).assetGetAdmin,
|
||||
(*interopContext).assetGetAmount,
|
||||
(*interopContext).assetGetAssetID,
|
||||
(*interopContext).assetGetAssetType,
|
||||
(*interopContext).assetGetAvailable,
|
||||
(*interopContext).assetGetIssuer,
|
||||
(*interopContext).assetGetOwner,
|
||||
(*interopContext).assetGetPrecision,
|
||||
(*interopContext).assetRenew,
|
||||
(*interopContext).attrGetData,
|
||||
(*interopContext).attrGetUsage,
|
||||
(*interopContext).blockGetTransaction,
|
||||
(*interopContext).blockGetTransactionCount,
|
||||
(*interopContext).blockGetTransactions,
|
||||
(*interopContext).contractGetScript,
|
||||
(*interopContext).contractGetStorageContext,
|
||||
(*interopContext).contractIsPayable,
|
||||
(*interopContext).headerGetConsensusData,
|
||||
(*interopContext).headerGetHash,
|
||||
(*interopContext).headerGetIndex,
|
||||
(*interopContext).headerGetMerkleRoot,
|
||||
(*interopContext).headerGetNextConsensus,
|
||||
(*interopContext).headerGetPrevHash,
|
||||
(*interopContext).headerGetTimestamp,
|
||||
(*interopContext).headerGetVersion,
|
||||
(*interopContext).inputGetHash,
|
||||
(*interopContext).inputGetIndex,
|
||||
(*interopContext).invocationTxGetScript,
|
||||
(*interopContext).outputGetAssetID,
|
||||
(*interopContext).outputGetScriptHash,
|
||||
(*interopContext).outputGetValue,
|
||||
(*interopContext).storageContextAsReadOnly,
|
||||
(*interopContext).storageDelete,
|
||||
(*interopContext).storageFind,
|
||||
(*interopContext).storageGet,
|
||||
(*interopContext).storagePut,
|
||||
(*interopContext).storagePutEx,
|
||||
(*interopContext).txGetAttributes,
|
||||
(*interopContext).txGetHash,
|
||||
(*interopContext).txGetInputs,
|
||||
(*interopContext).txGetOutputs,
|
||||
(*interopContext).txGetReferences,
|
||||
(*interopContext).txGetType,
|
||||
(*interopContext).txGetUnspentCoins,
|
||||
(*interopContext).txGetWitnesses,
|
||||
(*interopContext).witnessGetVerificationScript,
|
||||
accountGetBalance,
|
||||
accountGetScriptHash,
|
||||
accountGetVotes,
|
||||
assetGetAdmin,
|
||||
assetGetAmount,
|
||||
assetGetAssetID,
|
||||
assetGetAssetType,
|
||||
assetGetAvailable,
|
||||
assetGetIssuer,
|
||||
assetGetOwner,
|
||||
assetGetPrecision,
|
||||
assetRenew,
|
||||
attrGetData,
|
||||
attrGetUsage,
|
||||
blockGetTransaction,
|
||||
blockGetTransactionCount,
|
||||
blockGetTransactions,
|
||||
contractGetScript,
|
||||
contractGetStorageContext,
|
||||
contractIsPayable,
|
||||
headerGetConsensusData,
|
||||
headerGetHash,
|
||||
headerGetIndex,
|
||||
headerGetMerkleRoot,
|
||||
headerGetNextConsensus,
|
||||
headerGetPrevHash,
|
||||
headerGetTimestamp,
|
||||
headerGetVersion,
|
||||
inputGetHash,
|
||||
inputGetIndex,
|
||||
invocationTxGetScript,
|
||||
outputGetAssetID,
|
||||
outputGetScriptHash,
|
||||
outputGetValue,
|
||||
storageContextAsReadOnly,
|
||||
storageDelete,
|
||||
storageFind,
|
||||
storageGet,
|
||||
storagePut,
|
||||
storagePutEx,
|
||||
txGetAttributes,
|
||||
txGetHash,
|
||||
txGetInputs,
|
||||
txGetOutputs,
|
||||
txGetReferences,
|
||||
txGetType,
|
||||
txGetUnspentCoins,
|
||||
txGetWitnesses,
|
||||
witnessGetVerificationScript,
|
||||
}
|
||||
for _, f := range funcs {
|
||||
for k, v := range vals {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue