Commit 671a85fd authored by John Doe's avatar John Doe
Browse files

🟣🏴

parent aff1f6e0
Pipeline #49 failed with stages
in 0 seconds
# Private key used for publishing
RPC_URL=
# If private key is filled, it will be used for both deposits and publishing -- be careful if you are doing both
PRIVATE_KEY=
THREADS=0 # Use all available threads
PROFIT=2 # Minimum profit in priority gwei (coinbase_fee is automatically added on top of this)
# Anonymous Publishing -- Advanced Users Only
# -- MUST USE COMPATIBLE SEND_RPC
ANON=0 # Must be 0 if WITHDRAW is enabled.
COINBASE_FEE=2 # Fee in Gwei per gas paid to Eth builders to anonymize publishing -- Ignored if ANON is FALSE
SEND_RPC=https://protect.flashbots.net/configure/refund?builder=Titan&builder=builder0x69&hint=hash # For builder sponsorship
# If this is enabled, anonymous publishing is disabled.
WITHDRAW=0 # Withdrawal address 0x...
# Nargo Stuff
NARGO_PATH=~/.nargo/backends/acvm-backend-barretenberg/backend_binary
VERBOSE=FALSE
# Nostr Relays -- optional if you have working seeds
RELAYS=
# Nostr Relay APIs ("Seed" nodes) -- expects an array returned
MAX_RELAYS=8
SEEDS=https://api.nostr.watch/v1/online
\ No newline at end of file
# Ignore node_modules directory
node_modules/
# Ignore built output
dist/
# Ignore environment variables file
.env
.envSepolia
# Ignore IDE and editor files
.vscode/
.idea/
*.sublime-project
*.sublime-workspace
# Ignore logs and generated files
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Ignore OS generated files
.DS_Store
Thumbs.db
FROM node:20.0
RUN mkdir /code && mkdir /code/node
WORKDIR /code/node
RUN wget https://github.com/noir-lang/noir/releases/download/v0.28.0/nargo-x86_64-unknown-linux-gnu.tar.gz
RUN tar xvf nargo-x86_64-unknown-linux-gnu.tar.gz
RUN mv nargo /bin
RUN rm nargo-x86_64-unknown-linux-gnu.tar.gz
COPY . .
RUN npm install
RUN cd ./momiji-helpers/ && npm install
WORKDIR /code/node
ENTRYPOINT [ "npm", "start"]
# momiji-node-mainnet
# momiji-node-ts
This is the node for publishing batch transactions to the momiji protocol
## FAQ
- Global Config: One config, initialized in index.ts and borrowed from the .env
- npm warnings are ok, npm outputs a lot of warnings.
## USAGE
First clone this repo.
- Copy over the .env.example file to .env
and Fill out the `.env` file with your hex formatted private key and your RPC URL
and after that there are 2 alternatives for running a node either the quick way with docker or for those who already have a configured development machine setup.
### Docker setup
for building
```sh
sudo docker build -t xftnode .
```
for running
```sh
sudo docker run -it xftnode
```
### npm usage
- Install noirup, the Nargo package manager
```sh
curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash
```
- Install nargo v0.28.0
```
noirup --version 0.28.0
```
- Install nvm and grab the latest LTS version of node
```sh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
```
Restart your terminal and then run
```sh
nvm install --lts
nvm use --lts
```
```
cd ./momiji-helpers && npm install && cd .. && npm install
```
- Run `npm run start` to start the node
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@openzeppelin/hardhat-upgrades";
const config: HardhatUserConfig = {
solidity: {
version: '0.8.24',
settings: {
evmVersion: 'cancun',
optimizer: { enabled: true, runs: 5000 },
},
},
networks: {
hardhat: {
blockGasLimit: 30000000,
gasPrice: "auto",
hardfork: 'cancun',
accounts: {
mnemonic: "artwork story jeans lyrics expose update sword absurd rail game argue submit"
},
chainId: 1
}
},
mocha: {
timeout: 200000
}
};
export default config;
node_modules
.env
coverage
coverage.json
typechain
#Hardhat files
cache
artifacts
#node_modules
node_modules
package-lock.json
#ignore JS
*.js
typechain-types-ignore
\ No newline at end of file
# momiji-ts
\ No newline at end of file
[package]
name = "helpers"
type = "lib"
authors = [""]
compiler_version = ">=0.19.2"
[dependencies]
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/* Autogenerated file, do not edit! */
/* eslint-disable */
import { Noir, InputMap, CompiledCircuit, ForeignCallHandler } from "@noir-lang/noir_js"
export type { ForeignCallHandler } from "@noir-lang/noir_js"
export type Field = string;
export const pedersen_left_right_circuit: CompiledCircuit = {"abi":{"parameters":[{"name":"left","type":{"kind":"field"},"visibility":"private"},{"name":"right","type":{"kind":"field"},"visibility":"private"}],"param_witnesses":{"left":[{"start":0,"end":1}],"right":[{"start":1,"end":2}]},"return_type":{"abi_type":{"kind":"field"},"visibility":"private"},"return_witnesses":[2]},"bytecode":"H4sIAAAAAAAA/22KQQoAQAgCc0/7/wdHRRYRDYiiQpLnAnP4Z1coex1/WR8cee6NAftGOOF1AAAA"};
export async function pedersen_left_right(left: Field, right: Field, foreignCallHandler?: ForeignCallHandler): Promise<Field> {
const program = new Noir(pedersen_left_right_circuit);
const args: InputMap = { left, right };
const { returnValue } = await program.execute(args, foreignCallHandler);
return returnValue as Field;
}
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment