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.10; | |
| interface CallProxy{ | |
| function anyCall( | |
| address _to, | |
| bytes calldata _data, | |
| address _fallback, | |
| uint256 _toChainID, |
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.0; | |
| import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
| import "@openzeppelin/contracts/utils/Context.sol"; | |
| contract Disperse is Context { | |
| function disperseEther( | |
| address payable[] calldata recipients, |
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
| async function sendTx(contract, method, params = []) { | |
| console.log(`Sending tx for contracts "${contract.address}" with method name "${method}" and params: "${params}"`); | |
| const gasEstimation = await contract.estimateGas[method](...params); | |
| const unsignedTx = await contract.populateTransaction[method](...params); | |
| const payload = {}; | |
| const { accessList, gasUsed: gasUsedHex } = await ethers.provider.send("eth_createAccessList", [unsignedTx]); | |
| const gasUsed = ethers.BigNumber.from(gasUsedHex); | |
| if (gasUsed >= gasEstimation) { |
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: UNLICENSED | |
| pragma solidity ^0.8.0; | |
| import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
| import "@openzeppelin/contracts/access/Ownable.sol"; | |
| contract SigmaToken is ERC20, Ownable { | |
| constructor( | |
| string memory _name, | |
| string memory _symbol, |
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.7.0 <0.8.0; | |
| contract Test { | |
| mapping(address => bool) private data; | |
| function set(bool res) public payable { | |
| data[msg.sender] = res; | |
| } | |
| function get() public view returns(bool) { |
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.7.0 <0.8.0; | |
| interface ERC20 { | |
| function totalSupply() external view returns (uint supply); | |
| function balanceOf(address _owner) external view returns (uint balance); | |
| function transfer(address _to, uint _value) external returns (bool success); | |
| function transferFrom(address _from, address _to, uint _value) external returns (bool success); | |
| function approve(address _spender, uint _value) external returns (bool success); | |
| function allowance(address _owner, address _spender) external view returns (uint remaining); | |
| function decimals() external view returns(uint digits); |
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
| did:3:bafyreihtwhjauja2ogqdanvh5f3fyhixkifwcgk7xo22qlqknlv7sx2f5m |
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
| import sys | |
| if sys.version_info[0] >= 3: | |
| xrange = range | |
| def list_partitate(elems): | |
| if not isinstance(elems, list): | |
| return False |
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 Debt { | |
| address owner; | |
| int public balance; | |
| mapping(address => int) public debts; | |
| event Borrow(address user, int amount); | |
| event Refund(address user, int amount); | |
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
| { | |
| // you may set specific environment variables here | |
| // e.g "env": { "PATH": "$HOME/go/bin:$PATH" } | |
| // in values, $PATH and ${PATH} are replaced with | |
| // the corresponding environment(PATH) variable, if it exists. | |
| "env": {"GOPATH": "$HOME/go", "PATH": "$PATH:$GOPATH/bin" }, | |
| "fmt_cmd": ["goimports"], | |
| // enable comp-lint, this will effectively disable the live linter |
NewerOlder