LPX calls external, on-chain contracts for the following systems:
- Uniswap pair (add liq, remove liq)
- Uniswap price oracle, 30 minute interval. Ref: https://github.com/bloq/sol-price-oracles
- Whitelist. Ref: https://github.com/bloq/sol-address-list
// | |
// Copyright (c) 2024 Jeff Garzik | |
// | |
// This file is part of the posixutils-rs project covered under | |
// the MIT License. For the full license text, please see the LICENSE | |
// file in the root directory of this project. | |
// SPDX-License-Identifier: MIT | |
// | |
extern crate clap; |
diff --git a/file/src/file.rs b/file/src/file.rs | |
index 39c0aeb..fadce24 100644 | |
--- a/file/src/file.rs | |
+++ b/file/src/file.rs | |
@@ -25,6 +25,10 @@ use std::{ | |
#[derive(Parser, Debug)] | |
#[command(author, version, about, long_about, disable_help_flag = true)] | |
struct Args { | |
+ /// Restore --help | |
+ #[arg(long, action = clap::ArgAction::HelpLong)] |
extern crate libc; | |
use libc::{endgrent, getgrent, setgrent, group}; | |
use std::ffi::CStr; | |
use std::ptr; | |
struct Group { | |
name: String, | |
passwd: String, | |
gid: libc::gid_t, | |
members: Vec<String>, |
extern crate libc; | |
use libc::{group, setgrent, getgrent, endgrent, gid_t}; | |
use std::ffi::CStr; | |
use std::ptr; | |
struct Group { | |
name: String, | |
passwd: String, | |
gid: gid_t, | |
members: Vec<String>, |
fn enumerate_groups() { | |
let mut groupent: *mut libc::group; | |
unsafe { | |
setgrent(); | |
groupent = getgrent(); | |
} | |
while groupent != ptr::null_mut() { | |
let c_str: &CStr = unsafe { CStr::from_ptr((*groupent).gr_name) }; | |
println!("{}", c_str.to_str().unwrap()); | |
unsafe { |
LPX calls external, on-chain contracts for the following systems:
#include <stdio.h> | |
#include <stdexcept> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <string> | |
#include <vector> | |
#include <string.h> | |
#include <assert.h> | |
#include <zlib.h> |
#include <stdio.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <string> | |
#include <vector> | |
#include <assert.h> | |
#include <zlib.h> | |
using namespace std; |
#ifndef __SRV_BIDIPIPE_H__ | |
#define __SRV_BIDIPIPE_H__ | |
#include "Util.h" | |
#ifndef ARRAYLEN | |
#define ARRAYLEN(array) (sizeof(array)/sizeof((array)[0])) | |
#endif // ARRAYLEN | |
class BidiPipe { |
/* | |
Build: | |
g++ -std=c++11 -O -Wall -g -o eth-tx-prefix eth-tx-prefix.cc -lrocksdb | |
Run: | |
./eth-tx-prefix | |
Clean: |