This file contains hidden or 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
<? | |
$dbUser = \Bitrix\Main\UserTable::getList(array( | |
'select' =>array('ID','LOGIN'), | |
'filter' => array('ID' => 198) | |
)); | |
while ($arUser = $dbUser->fetch()){ | |
$qText="update b_user set PASSWORD_EXPIRED='Y' WHERE ID=".$arUser['ID']; | |
print $qText; | |
print "<br/>"; |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.17; | |
contract GuessRandomNumber { | |
function guess(uint256 _number) | |
public payable{ | |
require( | |
msg.value >= 10 gwei, | |
"please send more money!" |
This file contains hidden or 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
contract DoubleTx{ | |
struct Participant { | |
address etherAddress; | |
uint PayAmount; | |
} | |
Participant[] public participants; |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
interface DoubleTx { | |
function collectFees() external; | |
function setOwner(address _owner) external; | |
} | |
contract Attacker { |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/utils/Counters.sol"; | |
contract MyToken is ERC721, ERC721URIStorage, Ownable { | |
using Counters for Counters.Counter; |
This file contains hidden or 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
//Указание лицензии | |
// SPDX-License-Identifier: MIT | |
//директива компилятору - какая версия компилятора требуется для компиляции данного смарт-контракта | |
pragma solidity 0.8.15; | |
//контракт, его название, тело контракта должно быть заключено в фигурные скобки | |
contract Granny { | |
// счетчик количества внуков |
This file contains hidden or 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
//Указание лицензии | |
// SPDX-License-Identifier: MIT | |
//директива компилятору - какая версия компилятора требуется для компиляции данного смарт-контракта | |
pragma solidity 0.8.15; | |
//контракт, его название, тело контракто должно быть заключено в фигурные скобки | |
contract Granny { | |
} |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.7; | |
import "@openzeppelin/contracts/utils/Address.sol"; | |
contract Voting { | |
bool public finished; | |
bool public success; | |
address public immutable admin; |
This file contains hidden or 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 Web3 = require('web3'); | |
class TransactionChecker { | |
web3; | |
web3ws; | |
account; | |
subscription; | |
constructor(projectId, account) { | |
this.web3ws = new Web3(new Web3.providers.WebsocketProvider('wss://rinkeby.infura.io/ws/v3/' + projectId)); |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
contract TestToken1 is ERC20 { | |
constructor(uint256 initialSupply) ERC20("TestToken1", "TTK1") { | |
_mint(msg.sender, initialSupply*10**decimals()); | |
} | |
} |