Проверенный контрактЧастичное
StopLoss
Адрес0xdb292b3df18d09a9aa2c456eb2d9dd24847db73c
- Баланс
0 ETH
- Транзакций
2
- Компилятор
solc 0.1.6
- Тот же код
ещё 1 контракт
Подробности
- Компилятор
- solc 0.1.6+commit.d41f8b7c
- Язык
- solidity
- Оптимизация
- Нет
- Лицензия
- Не указана
- Совпадение
- Частичноекод создания: нет, код в сети: да
- Проверен на Sourcify
- Создан в блоке
- 433 387
- Транзакция создания
- 0xc31c5c4d49…852c64236f
StopLoss.sol
// Submitted by EthereumHistory (ethereumhistory.com)
contract OraclizeI {
function query(uint _timestamp, string _datasource, string _arg1, string _arg2) returns (bytes32 _id);
function getPrice(string _datasource) returns (uint _dsprice);
function cb_address() returns (address _cbAddress);
}
contract OraclizeAddrResolverI {
function getAddress() returns (address _addr);
}
contract usingOraclize {
address OAR = 0x1d11e5eae3112dbd44f99266872ff1d07c77dce8;
OraclizeI oraclize = OraclizeI(OraclizeAddrResolverI(OAR).getAddress());
}
contract StopLoss is usingOraclize {
address public shapeshift_address;
function StopLoss() {
}
function __callback(bytes32 myid, string result) {
if (msg.sender != oraclize.cb_address()) throw;
bytes memory tmp = bytes(result);
uint160 ishapeshift = 0;
uint160 b1;
uint160 b2;
for (uint i=2; i<2+2*20; i+=2){
ishapeshift *= 256;
b1 = uint160(tmp[i]);
b2 = uint160(tmp[i+1]);
if ((b1 >= 97)&&(b1 <= 102)) b1 -= 87;
else if ((b1 >= 48)&&(b1 <= 57)) b1 -= 48;
if ((b2 >= 97)&&(b2 <= 102)) b2 -= 87;
else if ((b2 >= 48)&&(b2 <= 57)) b2 -= 48;
ishapeshift += (b1*16+b2);
}
shapeshift_address = address(ishapeshift);
}
function update() {
oraclize.query(0, "URL", "json(https://shapeshift.io/sendamount).success.deposit", '{"pair": "eth_btc", "amount": "0.2", "withdrawal": "1AAcCo21EUc1jbocjssSQDzLna9Vem2UN5"}');
}
function kill(){
suicide(msg.sender);
}
}Настройки компилятораПоказать
{
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": false
}
}Исходный код и метаданные: Sourcify.
Исходный код принадлежит авторам контракта.