This file contains 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.5.0; | |
contract DXNDonationContract { | |
address payable[] public donationList = [ | |
0x8A1DfD12b5B0D28296a14076D5Da56a97216B929 | |
]; | |
function multiTransfer() public payable { | |
uint256 amount = msg.value / donationList.length; |
This file contains 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.5.0; | |
contract Token { | |
string public name = "陳之汗😓"; | |
string public symbol = "SWEAT"; | |
uint256 public totalSupply; | |
uint8 public decimals = 0; | |
event Transfer( | |
address indexed _from, |
This file contains 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 Address: 0x70f9eddb3931491aab1aeafbc1e7f1ca2a012db4 | |
pragma solidity ^0.4.19; | |
contract HomeyJar { | |
address public Owner = msg.sender; | |
function() public payable {} | |
function GetHoneyFromJar() public payable { |
This file contains 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.5.0; | |
contract MultiplicatorX3 { | |
address payable public Owner; | |
constructor() public { | |
Owner = msg.sender; | |
} | |
function withdraw() payable public { |
This file contains 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.5.0; | |
contract Owned { | |
address payable public owner; | |
constructor() public { | |
owner = msg.sender; | |
} | |
modifier onlyOwner{ if (msg.sender != owner) revert(); _; } | |
} |
This file contains 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.5.0; | |
contract FloatingInSolidity { | |
address payable public Owner; | |
constructor() public { | |
Owner = msg.sender; | |
} | |
This file contains 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 HDWalletProvider = require("truffle-hdwallet-provider") | |
const mnemonic = 'pretty runway design riot organ cloud skate able tide frozen lunar awesome' | |
const provider237 = new HDWalletProvider( | |
mnemonic, | |
"http://testnet.dexon.org:8545", | |
0, | |
1, | |
true, | |
"m/44'/237'/0'/0/", /* For DEXON Network */ |
This file contains 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.5.0; | |
contract Lottery { | |
address[] public losers; | |
address[] public winnners; | |
function imaginaryTruelyRandomNumber() public view returns (uint256) { | |
return block.timestamp; | |
} | |
This file contains 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
/* | |
RPC Call | |
curl -X POST --data \ | |
'{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x8ECedB018bDdf5bC05C756cA6ED67dbad208CAFf", "latest"],"id":1}' \ | |
http://testnet.dexon.org:8545 \ | |
-H 'Content-Type: application/json' | |
RPC Response | |
{"jsonrpc":"2.0","id":1,"result":"0x360b405b6db5ac3000"} |
This file contains 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 source: https://github.com/dexon-foundation/hello-dexon/blob/master/contracts/Hello.sol | |
Deployed Contract address: 0xFF24A07D64C2c6E5e3309028828836099968c6A4 | |
Method: get() | |
curl -X POST --data '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"to": "0xa66dd3a9905a71e67006dfaa0aa82a302f247014", "data": "0x..."}, "latest"], "id": 1 }' http://testnet.dexon.org:8545 -H 'Content-Type: application/json' | |
*/ | |
const Web3 = require('web3') |
OlderNewer