Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
da6a4baa
Commit
da6a4baa
authored
Mar 02, 2021
by
袁兴强
Committed by
vipwzw
Mar 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add evidence contract for reference
parent
65de3f64
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
evidence.cpp
plugin/dapp/wasm/contracts/evidence/evidence.cpp
+13
-0
evidence.hpp
plugin/dapp/wasm/contracts/evidence/evidence.hpp
+10
-0
evidence.wasm
plugin/dapp/wasm/contracts/evidence/evidence.wasm
+0
-0
No files found.
plugin/dapp/wasm/contracts/evidence/evidence.cpp
0 → 100644
View file @
da6a4baa
#include "../common.h"
#include "evidence.hpp"
#include <string.h>
int
set
(
int64_t
n
)
{
size_t
l
=
getENVSize
(
n
);
//暂不支持动态数组 char* value = new char[l]; 给定静态数组长度表示字符串长度上限
char
value
[
1024
]
=
{
0
};
getENV
(
n
,
value
,
l
);
printlog
(
value
,
l
);
return
0
;
}
\ No newline at end of file
plugin/dapp/wasm/contracts/evidence/evidence.hpp
0 → 100644
View file @
da6a4baa
#ifdef __cplusplus //而这一部分就是告诉编译器,如果定义了__cplusplus(即如果是cpp文件,
extern
"C"
{
//因为cpp文件默认定义了该宏),则采用C语言方式进行编译
#endif
int
set
(
int64_t
n
);
#ifdef __cplusplus
}
#endif
\ No newline at end of file
plugin/dapp/wasm/contracts/evidence/evidence.wasm
0 → 100644
View file @
da6a4baa
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment