ckb-script 0.107.0

CKB component to run the type/lock scripts.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "ckb_syscalls.h"

int current_cycles() {
    return syscall(2042, 0, 0, 0, 0, 0, 0);
}

int main() {
    int prev = current_cycles();
    int curr;
    for (int i=0; i<4096; i++) {
        curr = current_cycles();
        if (curr <= prev) {
            return -1;
        }
        prev = curr;
    }
    return CKB_SUCCESS;
}