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 __future__ import annotations | |
from jira import JIRA | |
import os | |
from dotenv import load_dotenv | |
class JiraClient: | |
def __init__(self): | |
load_dotenv() | |
self.jira_server_url = os.environ.get('JIRA_SERVER_URL') | |
self.jira_username = os.environ.get('JIRA_USERNAME') |
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
const axios = require("axios"); | |
const livepeerSubgraphEndpoint = | |
"https://api.thegraph.com/subgraphs/name/livepeer/arbitrum-one"; | |
const bondEventQuery = ` | |
query BondEvents { | |
bondEvents(first: 1000) { | |
id | |
transaction { |
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
const derivative = derivativeFactory({ | |
margin: toBN("40"), //required collateral denominated in DAI token | |
endTime: ~~(Date.now() / 1000) + SECONDS_40_MINS, // Now + 40 mins | |
params: [ | |
toBN("3430"), // Strike Price 3430DAI | |
], | |
oracleId: adminOracleController.address, | |
token: dai.address, | |
syntheticId: optionCallMock.address, | |
}); |
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
it("should execute the full margin option with the underlying's market price less than the strike price", async () => { | |
const { buyer, oracle } = namedSigners; | |
/** | |
* @dev time-travel after the maturity of the derivative | |
*/ | |
await timeTravel(SECONDS_40_MINS + 100); | |
/** | |
* @dev manually pushes the current underlying's market price to the oracle contract | |
*/ |
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
pragma solidity 0.5.16; | |
pragma experimental ABIEncoderV2; | |
import "openzeppelin-solidity/contracts/math/SafeMath.sol"; | |
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; | |
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; | |
import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; | |
import "opium-contracts/contracts/Lib/LibDerivative.sol"; | |
import "erc721o/contracts/Libs/LibPosition.sol"; |
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
const { Api, Utils } = require('@opiumteam/oex-js') | |
const { signMessage } = Utils | |
class Example { | |
constructor (publicKey, privateKey) { | |
this.api = new Api() | |
this.publicKey = publicKey | |
this.privateKey = privateKey | |
} |