-
-
Save 0xmikko/5210141de58de26cab110016e92d5ded to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.25; | |
import "https://raw.githubusercontent.com/Arachnid/solidity-stringutils/master/src/strings.sol"; | |
contract HappyBirthdayDima { | |
using strings for *; | |
event SPBlockchainCommuntyGreeting (address sender, string greeting); | |
modifier onlyRazVGodu (){ | |
uint startTime = 1540339200; // 2018.10.24 00:00:00 | |
uint finishTime = 1540425599; // 2018.10.24 23:59:59 | |
require((now >= startTime) && (now <= finishTime)); | |
_; | |
} | |
// Provides Happy Birthday Greeting | |
function Greetings () public onlyRazVGodu returns (string) { | |
string memory greetings1 = "Дима! "; | |
string memory greetings2 = "От лица нашего сообщества поздравляем тебя с Днем Рождения! "; | |
string memory greetings3 = "У тебя потрясающий талант объединять людей, и в этот теплый осенний день "; | |
string memory wishes = "мы желаем тебе здоровья, радости, достижения новых высот и отличного настроения! "; | |
string memory happyBirthday = "С Днем Рождения!"; | |
string memory greetings = greetings1.toSlice().concat(greetings2.toSlice()).toSlice().concat(greetings3.toSlice()); | |
string memory allGoodWishes = wishes.toSlice().concat(happyBirthday.toSlice()); | |
emit SPBlockchainCommuntyGreeting(msg.sender, greetings.toSlice().concat(allGoodWishes.toSlice())); | |
} | |
} |
ABI:
[
{
"constant": false,
"inputs": [],
"name": "Greetings",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "sender",
"type": "address"
},
{
"indexed": false,
"name": "greeting",
"type": "string"
}
],
"name": "SPBlockchainCommuntyGreeting",
"type": "event"
}
]
Bytecode:
{
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50610625806100206000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063121433a514610046575b600080fd5b34801561005257600080fd5b5061005b6100d6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561009b578082015181840152602081019050610080565b50505050905090810190601f1680156100c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b606080606080606080606080600080635bcfb6009150635bd1077f90508142101580156101035750804211155b151561010e57600080fd5b6040805190810160405280600a81526020017fd094d0b8d0bcd0b0212000000000000000000000000000000000000000000000815250985060a060405190810160405280606e81526020017fd09ed18220d0bbd0b8d186d0b020d0bdd0b0d188d0b5d0b3d0be20d181d0bed081526020017fbed0b1d189d0b5d181d182d0b2d0b020d0bfd0bed0b7d0b4d180d0b0d0b2d0bb81526020017fd18fd0b5d0bc20d182d0b5d0b1d18f20d18120d094d0bdd0b5d0bc20d0a0d0be81526020017fd0b6d0b4d0b5d0bdd0b8d18f2120000000000000000000000000000000000000815250975060c0604051908101604052806085815260200161057560859139965060c060405190810160405280609481526020016104e16094913995506040805190810160405280601d81526020017fd0a120d094d0bdd0b5d0bc20d0a0d0bed0b6d0b4d0b5d0bdd0b8d18f2100000081525094506102a661026d886103cb565b61029861029361027c8c6103cb565b6102858e6103cb565b6103f990919063ffffffff16565b6103cb565b6103f990919063ffffffff16565b93506102cb6102b4866103cb565b6102bd886103cb565b6103f990919063ffffffff16565b92507fc1558d8522004d88aa29c9b6882d09cd988fc7b1960314684d102502242e1436336103126102fb866103cb565b610304886103cb565b6103f990919063ffffffff16565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610384578082015181840152602081019050610369565b50505050905090810190601f1680156103b15780820380516001836020036101000a031916815260200191505b50935050505060405180910390a150505050505050505090565b6103d36104c6565b600060208301905060408051908101604052808451815260200182815250915050919050565b606080600083600001518560000151016040519080825280601f01601f19166020018201604052801561043b5781602001602082028038833980820191505090505b509150602082019050610457818660200151876000015161047b565b610470856000015182018560200151866000015161047b565b819250505092915050565b60005b6020821015156104a3578251845260208401935060208301925060208203915061047e565b6001826020036101000a0390508019835116818551168181178652505050505050565b6040805190810160405280600081526020016000815250905600d0bcd18b20d0b6d0b5d0bbd0b0d0b5d0bc20d182d0b5d0b1d0b520d0b7d0b4d0bed180d0bed0b2d18cd18f2c20d180d0b0d0b4d0bed181d182d0b82c20d0b4d0bed181d182d0b8d0b6d0b5d0bdd0b8d18f20d0bdd0bed0b2d18bd18520d0b2d18bd181d0bed18220d0b820d0bed182d0bbd0b8d187d0bdd0bed0b3d0be20d0bdd0b0d181d182d180d0bed0b5d0bdd0b8d18f2120d0a320d182d0b5d0b1d18f20d0bfd0bed182d180d18fd181d0b0d18ed189d0b8d0b920d182d0b0d0bbd0b0d0bdd18220d0bed0b1d18ad0b5d0b4d0b8d0bdd18fd182d18c20d0bbd18ed0b4d0b5d0b92c20d0b820d0b220d18dd182d0bed18220d182d0b5d0bfd0bbd18bd0b920d0bed181d0b5d0bdd0bdd0b8d0b920d0b4d0b5d0bdd18c20a165627a7a72305820a4a779d4de74569753ca08c0ec77ff2d1229bba46b147593d4b7feffd7a558560029",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x625 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH29 0x100000000000000000000000000000000000000000000000000000000 SWAP1 DIV PUSH4 0xFFFFFFFF AND DUP1 PUSH4 0x121433A5 EQ PUSH2 0x46 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x52 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x5B PUSH2 0xD6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x9B JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x80 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xC8 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x60 DUP1 PUSH1 0x60 DUP1 PUSH1 0x60 DUP1 PUSH1 0x0 DUP1 PUSH4 0x5BCFB600 SWAP2 POP PUSH4 0x5BD1077F SWAP1 POP DUP2 TIMESTAMP LT ISZERO DUP1 ISZERO PUSH2 0x103 JUMPI POP DUP1 TIMESTAMP GT ISZERO JUMPDEST ISZERO ISZERO PUSH2 0x10E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0xA DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0xD094D0B8D0BCD0B0212000000000000000000000000000000000000000000000 DUP2 MSTORE POP SWAP9 POP PUSH1 0xA0 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x6E DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0xD09ED18220D0BBD0B8D186D0B020D0BDD0B0D188D0B5D0B3D0BE20D181D0BED0 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0xBED0B1D189D0B5D181D182D0B2D0B020D0BFD0BED0B7D0B4D180D0B0D0B2D0BB DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0xD18FD0B5D0BC20D182D0B5D0B1D18F20D18120D094D0BDD0B5D0BC20D0A0D0BE DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0xD0B6D0B4D0B5D0BDD0B8D18F2120000000000000000000000000000000000000 DUP2 MSTORE POP SWAP8 POP PUSH1 0xC0 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x85 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x575 PUSH1 0x85 SWAP2 CODECOPY SWAP7 POP PUSH1 0xC0 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x94 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x4E1 PUSH1 0x94 SWAP2 CODECOPY SWAP6 POP PUSH1 0x40 DUP1 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1D DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0xD0A120D094D0BDD0B5D0BC20D0A0D0BED0B6D0B4D0B5D0BDD0B8D18F21000000 DUP2 MSTORE POP SWAP5 POP PUSH2 0x2A6 PUSH2 0x26D DUP9 PUSH2 0x3CB JUMP JUMPDEST PUSH2 0x298 PUSH2 0x293 PUSH2 0x27C DUP13 PUSH2 0x3CB JUMP JUMPDEST PUSH2 0x285 DUP15 PUSH2 0x3CB JUMP JUMPDEST PUSH2 0x3F9 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x3CB JUMP JUMPDEST PUSH2 0x3F9 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP4 POP PUSH2 0x2CB PUSH2 0x2B4 DUP7 PUSH2 0x3CB JUMP JUMPDEST PUSH2 0x2BD DUP9 PUSH2 0x3CB JUMP JUMPDEST PUSH2 0x3F9 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP3 POP PUSH32 0xC1558D8522004D88AA29C9B6882D09CD988FC7B1960314684D102502242E1436 CALLER PUSH2 0x312 PUSH2 0x2FB DUP7 PUSH2 0x3CB JUMP JUMPDEST PUSH2 0x304 DUP9 PUSH2 0x3CB JUMP JUMPDEST PUSH2 0x3F9 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x384 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x369 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x3B1 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP4 POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP POP POP POP POP POP POP POP SWAP1 JUMP JUMPDEST PUSH2 0x3D3 PUSH2 0x4C6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP4 ADD SWAP1 POP PUSH1 0x40 DUP1 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 DUP5 MLOAD DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE POP SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP4 PUSH1 0x0 ADD MLOAD DUP6 PUSH1 0x0 ADD MLOAD ADD PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x43B JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY DUP1 DUP3 ADD SWAP2 POP POP SWAP1 POP JUMPDEST POP SWAP2 POP PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x457 DUP2 DUP7 PUSH1 0x20 ADD MLOAD DUP8 PUSH1 0x0 ADD MLOAD PUSH2 0x47B JUMP JUMPDEST PUSH2 0x470 DUP6 PUSH1 0x0 ADD MLOAD DUP3 ADD DUP6 PUSH1 0x20 ADD MLOAD DUP7 PUSH1 0x0 ADD MLOAD PUSH2 0x47B JUMP JUMPDEST DUP2 SWAP3 POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH1 0x20 DUP3 LT ISZERO ISZERO PUSH2 0x4A3 JUMPI DUP3 MLOAD DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP4 POP PUSH1 0x20 DUP4 ADD SWAP3 POP PUSH1 0x20 DUP3 SUB SWAP2 POP PUSH2 0x47E JUMP JUMPDEST PUSH1 0x1 DUP3 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB SWAP1 POP DUP1 NOT DUP4 MLOAD AND DUP2 DUP6 MLOAD AND DUP2 DUP2 OR DUP7 MSTORE POP POP POP POP POP POP JUMP JUMPDEST P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xd1 DUP10 0xd0 0xb8 0xd0 0xb9 KECCAK256 0xd1 DUP3 0xd0 0xb0 0xd0 0xbb 0xd0 0xb0 0xd0 0xbd 0xd1 DUP3 KECCAK256 0xd0 0xbe 0xd0 0xb1 0xd1 DUP11 0xd0 0xb5 0xd0 0xb4 0xd0 0xb8 0xd0 0xbd 0xd1 DUP16 0xd1 DUP3 0xd1 DUP13 KECCAK256 0xd0 0xbb 0xd1 DUP15 0xd0 0xb4 0xd0 0xb5 0xd0 0xb9 0x2c KECCAK256 0xd0 0xb8 KECCAK256 0xd0 0xb2 KECCAK256 0xd1 DUP14 0xd1 DUP3 0xd0 0xbe 0xd1 DUP3 KECCAK256 0xd1 DUP3 0xd0 0xb5 0xd0 0xbf 0xd0 0xbb 0xd1 DUP12 0xd0 0xb9 KECCAK256 0xd0 0xbe 0xd1 DUP2 0xd0 0xb5 0xd0 0xbd 0xd0 0xbd 0xd0 0xb8 0xd0 0xb9 KECCAK256 0xd0 0xb4 0xd0 0xb5 0xd0 0xbd 0xd1 DUP13 KECCAK256 LOG1 PUSH6 0x627A7A723058 KECCAK256 LOG4 0xa7 PUSH26 0xD4DE74569753CA08C0EC77FF2D1229BBA46B147593D4B7FEFFD7 0xa5 PC JUMP STOP 0x29 ",
"sourceMap": "124:1498:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;124:1498:0;;;;;;;"
}
Contract deployed in Kovan network at 0xef35c0df5132cca2afa582cd76f0c8e7ff2fff12