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
{ | |
"price": "0.86500000", | |
"size": "40", | |
"symbol": "MATIC-USDC", | |
"side": "sell", | |
"clientOrderId": "550e8400-e29b-41d4-a716-446655440000", | |
"eip712Sig": "0xc83cacc200812f9f62f643f3ff6e3ce5474c05d440ae8149097596db632ede033179ca2ee150cdc17a146697ac43c08eacd1e7faf2ec1dacebbc837823ea5f791c", | |
"eip712Domain": { | |
"name": "RePermit", | |
"chainId": "137", |
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
from eth_abi import encode | |
# Define the data types as strings | |
order_info_type = "(address,address,uint256,uint256,address,bytes)" | |
partial_input_type = "(address,uint256)" | |
partial_output_type = "(address,uint256,address)" | |
partial_order_type = "(tuple,address,uint256,tuple,tuple[])" | |
# Define the data structure with correct types | |
partial_order_abi = [ |
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
{ | |
"domain_separator":{ | |
"chainId":"137", | |
"name":"RePermit", | |
"verifyingContract":"0x4d415B58EA43988FfF7f50A3475718b0858fE0f1" | |
}, | |
"message_types":{ | |
"OrderInfo":[ | |
{ | |
"name":"reactor", |
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
package main | |
import ( | |
"fmt" | |
"strings" | |
) | |
type TokenPair struct { | |
InToken string | |
OutToken string |
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
version: "3.8" | |
services: | |
app: | |
build: | |
dockerfile: Dockerfile | |
context: . | |
develop: | |
watch: | |
- action: rebuild | |
files: |
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
FROM golang:1.21.3 | |
WORKDIR /app | |
COPY . . | |
RUN go mod download | |
RUN CGO_ENABLED=0 GOOS=linux go build -o main . |
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
package redisrepo | |
import ( | |
"context" | |
"github.com/google/uuid" | |
"github.com/orbs-network/order-book/models" | |
) | |
type OrderTraversal interface { |
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
export interface MessageTypes { | |
EIP712Domain: MessageTypeProperty[]; | |
[additionalProperties: string]: MessageTypeProperty[]; | |
} | |
/** | |
* This is the message format used for `signTypeData`, for all versions | |
* except `V1`. | |
* | |
* @template T - The custom types used by this message. | |
* @property types - The custom types used by this message. |
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
/** | |
* @dev Taken from OpenZeppelin Contracts (access/Ownable.sol). | |
* Represents the project owner entity of a given project. | |
* Names have been changed, but otherwise the code is identical. | |
*/ | |
abstract contract ProjectRole is Context { | |
address private _projectOwner; | |
event ProjectOwnershipTransferred(address indexed previousProjectOwner, address indexed newProjectOwner); |
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
logger = use_logging() | |
logger.info('An informative log message', extra={'user_id': 'abc123', **function_args}) |
NewerOlder