forked from jmzkChain/jmzk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
120 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
file(GLOB ABI_FILES "*.abi") | ||
configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) | ||
add_wast_executable(TARGET floattest | ||
INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" | ||
LIBRARIES libc++ libc eosiolib | ||
DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
|
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,21 @@ | ||
{ | ||
"types": [{ | ||
"new_type_name": "account_name", | ||
"type": "name" | ||
} | ||
], | ||
"structs": [{ | ||
"name": "f32add", | ||
"base": "", | ||
"fields": [ | ||
{ "name" : "test_output", "type" : "vector<float>" } | ||
] | ||
} | ||
], | ||
"actions": [{ | ||
"name":"f32add", | ||
"type":"f32add" | ||
} | ||
], | ||
"tables": [] | ||
} |
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 @@ | ||
#include <floattest/floattest.hpp> | ||
|
||
namespace floattest { | ||
extern "C" { | ||
void apply( uint64_t code, uint64_t action ) { | ||
eosio::dispatch<floattest, floattest::f32add>(code, action); | ||
} | ||
} | ||
} |
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,37 @@ | ||
/** | ||
* @file | ||
* @copyright defined in eos/LICENSE.txt | ||
*/ | ||
#pragma once | ||
|
||
#include <vector> | ||
#include <eosiolib/eosio.hpp> | ||
#include <eosiolib/dispatcher.hpp> | ||
|
||
namespace floattest { | ||
using std::string; | ||
|
||
|
||
/** | ||
noop contract | ||
All it does is require sender authorization. | ||
Actions: anyaction | ||
*/ | ||
class floattest { | ||
public: | ||
|
||
ACTION(N(floattest), f32add) { | ||
f32add() { } | ||
f32add( std::vector<float> outs ) : outputs( outs ) {} | ||
|
||
std::vector<float> outputs; | ||
EOSLIB_SERIALIZE(f32add, (outputs)) | ||
}; | ||
|
||
static void on(const f32add& act) | ||
{ | ||
prints("Hello\n"); | ||
} | ||
}; | ||
|
||
} /// noop |
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