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
| Parent: | |
| var frame = document.getElementById('test'); | |
| r = frame.contentWindow.postMessage("DUPA", '*'); | |
| Child: | |
| window.addEventListener('message', function(event) { | |
| console.log(event.data); | |
| }); |
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
| Parent: | |
| window.addEventListener('message', function(event) { | |
| console.log(event.data); | |
| }); | |
| Child: | |
| setInterval(function() { | |
| parent.postMessage("Hello",'*'); |
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
| pragma solidity 0.4.18; | |
| contract TossCoin { | |
| address player1; | |
| address player2; | |
| address oracle; | |
| uint value; | |
| function TossCoin(address _oracle) payable public { |
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
Show hidden characters
| { | |
| "parser": "babel-eslint", | |
| "parserOptions": {}, | |
| "plugins": [ | |
| "import" | |
| ], | |
| "env": { | |
| "node": true, | |
| "es6": true | |
| }, |
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
| // A single line comment | |
| /* | |
| A multiline comment | |
| */ | |
| pragma solidity ^0.4.21; //Solidity version supported | |
| contract ExampleContract { | |
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
| pragma solidity ^0.4.24; | |
| contract IERC1077 { | |
| enum OperationType {CALL, DELEGATECALL, CREATE} | |
| event ExecutedSigned(bytes32 executionId, address from, uint nonce, bool success); | |
| function lastNonce() public view returns (uint nonce); |
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 IERC1077 { | |
| enum OperationType {CALL, DELEGATECALL, CREATE} | |
| event ExecutedSigned(bytes32 executionId, address from, uint nonce, bool success); | |
| function lastNonce() public view returns (uint nonce); | |
| address [] modules; | |
| function canExecute( |
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
| /* raw js call */ | |
| data = subscriptionModule.createSubscription(...).encode(); | |
| identity.executeSigned(subscriptionModule.address, 0, data, nonce, | |
| gasPrice, | |
| gasToken, | |
| gasLimit, | |
| DELEGATE_CALL, | |
| bytes extraData, | |
| bytes signatures); |
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
| await expect(token.transfer(address, 1)) | |
| .to.be.revertedWith('Not enough balance on sender account'); | |
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
| await expect(token.transfer(address, 7)) | |
| .to.emit(token, 'Transfer') | |
| .withArgs(wallet.address, walletTo.address, 7); | |