ETH Price: $1,984.12 (+0.78%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LibPosition

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2020-03-24
*/

/**

  Source code of Opium Protocol
  Web https://opium.network
  Telegram https://t.me/opium_network
  Twitter https://twitter.com/opium_network

 */

// File: LICENSE

/**

The software and documentation available in this repository (the "Software") is protected by copyright law and accessible pursuant to the license set forth below. Copyright © 2020 Blockeys BV. All rights reserved.

Permission is hereby granted, free of charge, to any person or organization obtaining the Software (the “Licensee”) to privately study, review, and analyze the Software. Licensee shall not use the Software for any other purpose. Licensee shall not modify, transfer, assign, share, or sub-license the Software or any derivative works of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/


// File: erc721o/contracts/Libs/LibPosition.sol

pragma solidity ^0.5.4;

library LibPosition {
  function getLongTokenId(bytes32 _hash) public pure returns (uint256 tokenId) {
    tokenId = uint256(keccak256(abi.encodePacked(_hash, "LONG")));
  }

  function getShortTokenId(bytes32 _hash) public pure returns (uint256 tokenId) {
    tokenId = uint256(keccak256(abi.encodePacked(_hash, "SHORT")));
  }
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"getLongTokenId","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"getShortTokenId","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}]

610124610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe7300000000000000000000000000000000000000003014608060405260043610603d5760003560e01c80635b667cf9146042578063a085725914606e575b600080fd5b605c60048036036020811015605657600080fd5b50356088565b60408051918252519081900360200190f35b605c60048036036020811015608257600080fd5b503560bc565b604080516020808201939093526414d213d49560da1b81830152815160258183030181526045909101909152805191012090565b60408051602080820193909352634c4f4e4760e01b8183015281516024818303018152604490910190915280519101209056fea265627a7a72315820d80b541cf2ec9ae8fb5d369b950d56988b9dae39c26626f002aabdefd65b30aa64736f6c63430005100032

Deployed Bytecode

0x7356c54b408c44b12f6c9219c9c73fcda4e783fc203014608060405260043610603d5760003560e01c80635b667cf9146042578063a085725914606e575b600080fd5b605c60048036036020811015605657600080fd5b50356088565b60408051918252519081900360200190f35b605c60048036036020811015608257600080fd5b503560bc565b604080516020808201939093526414d213d49560da1b81830152815160258183030181526045909101909152805191012090565b60408051602080820193909352634c4f4e4760e01b8183015281516024818303018152604490910190915280519101209056fea265627a7a72315820d80b541cf2ec9ae8fb5d369b950d56988b9dae39c26626f002aabdefd65b30aa64736f6c63430005100032

Deployed Bytecode Sourcemap

1312:338:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1494:153;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1494:153:0;;:::i;:::-;;;;;;;;;;;;;;;;1337:151;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1337:151:0;;:::i;1494:153::-;1607:32;;;;;;;;;;;-1:-1:-1;;;1607:32:0;;;;;;22::-1;26:21;;;22:32;6:49;;1607:32:0;;;;;;;1597:43;;;;;;1494:153::o;1337:151::-;1449:31;;;;;;;;;;;-1:-1:-1;;;1449:31:0;;;;;;22:32:-1;26:21;;;22:32;6:49;;1449:31:0;;;;;;;1439:42;;;;;;1337:151::o

Swarm Source

bzzr://d80b541cf2ec9ae8fb5d369b950d56988b9dae39c26626f002aabdefd65b30aa

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

Helper functions for Opium positions.

Loading...
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.