
Networks
bấm next qua 2 cái trên ảnh1. đáp án CALLBACK FUNCTIONS/** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { callbackFunction(); } module.exports = runCallback; /** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { setTimeout(callbackFunction, 1000); } module.exports = runCallback; class Dialog { onClose(callbackFunction) { this.carr = this.carr || []; th...

Sui Name Service ($SNS)
twitter :discord :Discord - Group Chat That's All Fun & GamesDiscord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.https://discord.comIt's finally here! Join our Crew3 and earn your spot in the $SNS DAO ➤ http://snsdomains.crew3.xyz ➤ New Quests added Daily! 10 people to Like/RT this tweet will also be selected for the Stork role - Winners selected below. #Sui isn't ready. Let&a...

tương tác Harpie
liên kết víxem ví mình dùng cái nào thì chọn - ví hold token thì chọn cái trên , ví chơi nft thì chọn cái dưới hoặc chọn cả 2 cũng đcchọn cái nào muốn bảo vệđợi cho nó load xong và import token mạng eth hoặc nft nào mà mình muốn bảo vệadd bn token hay nft tùy thích - sau đó chọn protecttốn chút fee ethnhư vậy là xong bước 1tiếp theo chọn setupnhập địa chỉ ví - tốn fee eth - nhập 1 địa chỉ ví khác ví đang dùngtiếp theo đến bước 3chọn mint FAU - tốn fee ethBẤM protect faucet token - tốn fee eth...
vui vẻ

Networks
bấm next qua 2 cái trên ảnh1. đáp án CALLBACK FUNCTIONS/** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { callbackFunction(); } module.exports = runCallback; /** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { setTimeout(callbackFunction, 1000); } module.exports = runCallback; class Dialog { onClose(callbackFunction) { this.carr = this.carr || []; th...

Sui Name Service ($SNS)
twitter :discord :Discord - Group Chat That's All Fun & GamesDiscord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.https://discord.comIt's finally here! Join our Crew3 and earn your spot in the $SNS DAO ➤ http://snsdomains.crew3.xyz ➤ New Quests added Daily! 10 people to Like/RT this tweet will also be selected for the Stork role - Winners selected below. #Sui isn't ready. Let&a...

tương tác Harpie
liên kết víxem ví mình dùng cái nào thì chọn - ví hold token thì chọn cái trên , ví chơi nft thì chọn cái dưới hoặc chọn cả 2 cũng đcchọn cái nào muốn bảo vệđợi cho nó load xong và import token mạng eth hoặc nft nào mà mình muốn bảo vệadd bn token hay nft tùy thích - sau đó chọn protecttốn chút fee ethnhư vậy là xong bước 1tiếp theo chọn setupnhập địa chỉ ví - tốn fee eth - nhập 1 địa chỉ ví khác ví đang dùngtiếp theo đến bước 3chọn mint FAU - tốn fee ethBẤM protect faucet token - tốn fee eth...
vui vẻ

Subscribe to meteosrds

Subscribe to meteosrds
Share Dialog
Share Dialog


<100 subscribers
<100 subscribers


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
bool public a = true;
bool public b = false;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
uint8 public a = 3;
uint16 public b = 268;
uint256 public sum = a + b;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
int8 public a = 10;
int8 public b = -15;
int16 public difference = a - b;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
bytes32 public msg1 = "Hello World";
string public msg2 = "ccccccccccccccccccccccccccccccccabcd";
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
enum Foods { Apple, Pizza, Bagel, Banana }
Foods public food1 = Foods.Apple;
Foods public food2 = Foods.Pizza;
Foods public food3 = Foods.Bagel;
Foods public food4 = Foods.Banana;
}


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
uint public x;
constructor(uint _x) {
x = _x;
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
uint public x;
constructor(uint _x) {
x = _x;
}
function increment() external {
x = x + 1;
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
uint public x;
constructor(uint _x) {
x = _x;
}
function increment() external {
x = x + 1;
}
function add(uint _x) external view returns(uint) {
uint sum = x + _x;
return sum;
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
function double(uint x) external pure returns(uint d) {
d = x * 2;
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
function double(uint x) external pure returns(uint d) {
d = x * 2;
}
function double(uint x, uint y) public pure returns(uint, uint) {
return (x*2, y*2);
}
}


/**
* Find the `value` stored in the contract
*
* @param {ethers.Contract} contract - ethers.js contract instance
* @return {promise} a promise which resolves with the `value`
*/
function getValue(contract) {
let value = contract.value();
return value;
}
module.exports = getValue;

/**
* Modify the `value` stored in the contract
*
* @param {ethers.Contract} contract - ethers.js contract instance
* @return {promise} a promise of transaction
*/
function setValue(contract) {
return contract.modify(6);
}
module.exports = setValue;

/**
* Transfer funds on the contract from the current signer
* to the friends address
*
* @param {ethers.Contract} contract - ethers.js contract instance
* @param {string} friend - a string containing a hexadecimal ethereum address
* @return {promise} a promise of the transfer transaction
*/
function transfer(contract, friend) {
return contract.transfer(friend, 1000);
}
module.exports = transfer;

/**
* Set the message on the contract using the signer passed in
*
* @param {ethers.Contract} contract - ethers.js contract instance
* @param {ethers.types.Signer} signer - ethers.js signer instance
* @return {promise} a promise of transaction modifying the `message`
*/
function setMessage(contract, signer) {
return contract.connect(signer).modify("abc");
}
module.exports = setMessage;

const ethers = require('ethers');
/**
* Deposit at least 1 ether into the contract
*
* @param {ethers.Contract} contract - ethers.js contract instance
* @return {promise} a promise of the deposit transaction
*/
function deposit(contract) {
return contract.deposit({ value: ethers.utils.parseEther("3") });
}
module.exports = deposit;


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address public owner;
constructor() {
owner = msg.sender;
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address public owner;
constructor() {
owner = msg.sender;
}
receive() external payable {
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address public owner;
constructor() {
owner = msg.sender;
}
receive() external payable {
}
function tip() public payable {
(bool ret, ) = owner.call{ value: msg.value }("");
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address public owner;
address public charity;
constructor(address _charity) {
owner = msg.sender;
charity = _charity;
}
receive() external payable {
}
function tip() public payable {
(bool ret, ) = owner.call{ value: msg.value }("");
require(ret);
}
function donate() public {
(bool ret, ) = charity.call{ value: address(this).balance }("");
require(ret);
selfdestruct(payable(msg.sender));
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address public owner;
address public charity;
constructor(address _charity) {
owner = msg.sender;
charity = _charity;
}
receive() external payable {
}
function tip() public payable {
(bool ret, ) = owner.call{ value: msg.value }("");
require(ret);
}
function donate() public {
(bool ret, ) = charity.call{ value: address(this).balance }("");
require(ret);
selfdestruct(payable(msg.sender));
}
}


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address deployer;
constructor() payable {
require(msg.value >= 1000000000000000000);
deployer = msg.sender;
}
function withdraw() public {
(bool ret, ) = deployer.call{ value: address(this).balance }("");
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address deployer;
constructor() payable {
require(msg.value >= 1000000000000000000);
deployer = msg.sender;
}
function withdraw() public {
require(deployer == msg.sender);
(bool ret, ) = deployer.call{ value: address(this).balance }("");
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.7.5;
contract Contract {
address owner;
uint configA;
uint configB;
uint configC;
constructor() {
owner = msg.sender;
}
function setA(uint _configA) public onlyOwner {
configA = _configA;
}
function setB(uint _configB) public onlyOwner {
configB = _configB;
}
function setC(uint _configC) public onlyOwner {
configC = _configC;
}
modifier onlyOwner {
require(owner == msg.sender);
_;
}
}


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
interface IHero {
function alert() external;
}
contract Sidekick {
function sendAlert(address hero) external {
IHero(hero).alert();
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Sidekick {
function sendAlert(address hero) external {
bytes4 signature = bytes4(keccak256("alert()"));
(bool ret, ) = hero.call(abi.encodePacked(signature));
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Sidekick {
function sendAlert(address hero, uint enemies, bool armed) external {
(bool ret, ) = hero.call(
abi.encodeWithSignature("alert(uint256,bool)", enemies, armed)
);
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Sidekick {
function relay(address hero, bytes memory data) external {
(bool ret, ) = hero.call(data);
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Sidekick {
function makeContact(address hero) external {
(bool ret, ) = hero.call(abi.encodeWithSignature("fallback()"));
require(ret);
}
}

pragma solidity ^0.8.4;
contract Contract {
function sumAndAverage(uint a, uint b, uint c, uint d) external pure returns(uint,uint) {
uint sum = a + b + c + d;
uint average = sum / 4;
return (sum, average);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
uint countdown = 10;
function tick() external {
countdown--;
if (0 == countdown) {
selfdestruct(payable(msg.sender));
}
}
}


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
bool public a = true;
bool public b = false;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
uint8 public a = 3;
uint16 public b = 268;
uint256 public sum = a + b;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
int8 public a = 10;
int8 public b = -15;
int16 public difference = a - b;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
bytes32 public msg1 = "Hello World";
string public msg2 = "ccccccccccccccccccccccccccccccccabcd";
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
enum Foods { Apple, Pizza, Bagel, Banana }
Foods public food1 = Foods.Apple;
Foods public food2 = Foods.Pizza;
Foods public food3 = Foods.Bagel;
Foods public food4 = Foods.Banana;
}


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
uint public x;
constructor(uint _x) {
x = _x;
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
uint public x;
constructor(uint _x) {
x = _x;
}
function increment() external {
x = x + 1;
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
uint public x;
constructor(uint _x) {
x = _x;
}
function increment() external {
x = x + 1;
}
function add(uint _x) external view returns(uint) {
uint sum = x + _x;
return sum;
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
function double(uint x) external pure returns(uint d) {
d = x * 2;
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
function double(uint x) external pure returns(uint d) {
d = x * 2;
}
function double(uint x, uint y) public pure returns(uint, uint) {
return (x*2, y*2);
}
}


/**
* Find the `value` stored in the contract
*
* @param {ethers.Contract} contract - ethers.js contract instance
* @return {promise} a promise which resolves with the `value`
*/
function getValue(contract) {
let value = contract.value();
return value;
}
module.exports = getValue;

/**
* Modify the `value` stored in the contract
*
* @param {ethers.Contract} contract - ethers.js contract instance
* @return {promise} a promise of transaction
*/
function setValue(contract) {
return contract.modify(6);
}
module.exports = setValue;

/**
* Transfer funds on the contract from the current signer
* to the friends address
*
* @param {ethers.Contract} contract - ethers.js contract instance
* @param {string} friend - a string containing a hexadecimal ethereum address
* @return {promise} a promise of the transfer transaction
*/
function transfer(contract, friend) {
return contract.transfer(friend, 1000);
}
module.exports = transfer;

/**
* Set the message on the contract using the signer passed in
*
* @param {ethers.Contract} contract - ethers.js contract instance
* @param {ethers.types.Signer} signer - ethers.js signer instance
* @return {promise} a promise of transaction modifying the `message`
*/
function setMessage(contract, signer) {
return contract.connect(signer).modify("abc");
}
module.exports = setMessage;

const ethers = require('ethers');
/**
* Deposit at least 1 ether into the contract
*
* @param {ethers.Contract} contract - ethers.js contract instance
* @return {promise} a promise of the deposit transaction
*/
function deposit(contract) {
return contract.deposit({ value: ethers.utils.parseEther("3") });
}
module.exports = deposit;


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address public owner;
constructor() {
owner = msg.sender;
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address public owner;
constructor() {
owner = msg.sender;
}
receive() external payable {
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address public owner;
constructor() {
owner = msg.sender;
}
receive() external payable {
}
function tip() public payable {
(bool ret, ) = owner.call{ value: msg.value }("");
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address public owner;
address public charity;
constructor(address _charity) {
owner = msg.sender;
charity = _charity;
}
receive() external payable {
}
function tip() public payable {
(bool ret, ) = owner.call{ value: msg.value }("");
require(ret);
}
function donate() public {
(bool ret, ) = charity.call{ value: address(this).balance }("");
require(ret);
selfdestruct(payable(msg.sender));
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address public owner;
address public charity;
constructor(address _charity) {
owner = msg.sender;
charity = _charity;
}
receive() external payable {
}
function tip() public payable {
(bool ret, ) = owner.call{ value: msg.value }("");
require(ret);
}
function donate() public {
(bool ret, ) = charity.call{ value: address(this).balance }("");
require(ret);
selfdestruct(payable(msg.sender));
}
}


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address deployer;
constructor() payable {
require(msg.value >= 1000000000000000000);
deployer = msg.sender;
}
function withdraw() public {
(bool ret, ) = deployer.call{ value: address(this).balance }("");
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
address deployer;
constructor() payable {
require(msg.value >= 1000000000000000000);
deployer = msg.sender;
}
function withdraw() public {
require(deployer == msg.sender);
(bool ret, ) = deployer.call{ value: address(this).balance }("");
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.7.5;
contract Contract {
address owner;
uint configA;
uint configB;
uint configC;
constructor() {
owner = msg.sender;
}
function setA(uint _configA) public onlyOwner {
configA = _configA;
}
function setB(uint _configB) public onlyOwner {
configB = _configB;
}
function setC(uint _configC) public onlyOwner {
configC = _configC;
}
modifier onlyOwner {
require(owner == msg.sender);
_;
}
}


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
interface IHero {
function alert() external;
}
contract Sidekick {
function sendAlert(address hero) external {
IHero(hero).alert();
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Sidekick {
function sendAlert(address hero) external {
bytes4 signature = bytes4(keccak256("alert()"));
(bool ret, ) = hero.call(abi.encodePacked(signature));
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Sidekick {
function sendAlert(address hero, uint enemies, bool armed) external {
(bool ret, ) = hero.call(
abi.encodeWithSignature("alert(uint256,bool)", enemies, armed)
);
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Sidekick {
function relay(address hero, bytes memory data) external {
(bool ret, ) = hero.call(data);
require(ret);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Sidekick {
function makeContact(address hero) external {
(bool ret, ) = hero.call(abi.encodeWithSignature("fallback()"));
require(ret);
}
}

pragma solidity ^0.8.4;
contract Contract {
function sumAndAverage(uint a, uint b, uint c, uint d) external pure returns(uint,uint) {
uint sum = a + b + c + d;
uint average = sum / 4;
return (sum, average);
}
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Contract {
uint countdown = 10;
function tick() external {
countdown--;
if (0 == countdown) {
selfdestruct(payable(msg.sender));
}
}
}
No activity yet