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
export interface EthApi { | |
/** | |
* List normal transactions to/from an ETH address. | |
* | |
* @param startBlock Starting block. It's inclusive. | |
* @param endBlock Ending block. It's inclusive. | |
* @param limit The max number of transactions returned. | |
* @param sort Sorting order. | |
*/ | |
listTransactions(address: string, startBlock?: number, endBlock?: number, limit: number = 10000, sort: string = "asc" | "desc"): Transaction[]; |
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 Exchange is Owned { | |
function depositToken(address token, address target, uint256 amount) public returns (bool) { | |
if (target == 0x0) target = msg.sender; | |
require(acceptDeposit(token, target, amount)); | |
require(Token(token).transferFrom(msg.sender, this, amount)); | |
return true; | |
} | |
function deposit(address target) public payable returns (bool) { | |
if (target == 0x0) target = 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
contract Joyso is Ownable, JoysoDataDecoder { | |
/** | |
* @notice match token orders with admins involved, only admin | |
* @param inputs Array of input orders, each order have 6 elements. Inputs must contain at least 2 orders. | |
* @dev inputs encoding please reference github wiki | |
*/ | |
function matchTokenOrderByAdmin_k44j(uint256[] inputs) external onlyAdmin { | |
... | |
bytes32 orderHash = keccak256( | |
this, |
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 IExchange_v1 { | |
/// @dev Fills the input order. | |
/// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. | |
/// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. | |
/// @param fillTakerTokenAmount Desired amount of takerToken to fill. | |
/// @param shouldThrowOnInsufficientBalanceOrAllowance Test if transfer will fail before attempting. | |
/// @param v ECDSA signature parameter v. | |
/// @param r ECDSA signature parameters r. | |
/// @param s ECDSA signature parameters s. | |
/// @return Total amount of takerToken filled in trade. |
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
val etherSpace = EtherSpace.build { | |
provider = "https://rinkeby.infura.io/" // Or your local node | |
credentials = Credentials(YOUR_PRIVATE_KEY_OR_WALLET) | |
} | |
var greeter = etherSpace.create(SMART_CONTRACT_ADDRESS, Greeter::class.java) | |
val receipt = greeter.newGreeting("Hello World") | |
println(greeter.greet()) // Should be "Hello World" |
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
interface Greeter { | |
@Throws(IOException::class) | |
@Send | |
fun newGreeting(greeting: String): TransactionReceipt | |
@Throws(IOException::class) | |
@Call | |
fun greet(): String | |
} |
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 greeter { | |
/* Define variable greeting of the type string */ | |
string greeting; | |
/* This runs when the contract is executed */ | |
function greeter(string _greeting) public { | |
greeting = _greeting; | |
} | |
/* Main function */ |
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
[2017-05-22 11:06:31,088,INFO] [ProbeModule.log:?] --> POST https://sandbox.tappayapis.com/tpc/partner/directpay/paybyprime http/1.1 | |
[2017-05-22 11:06:31,089,INFO] [ProbeModule.log:?] Content-Type: application/json; charset=UTF-8 | |
[2017-05-22 11:06:31,089,INFO] [ProbeModule.log:?] Content-Length: 460 | |
[2017-05-22 11:06:31,089,INFO] [ProbeModule.log:?] x-api-key: y7jnsIiNTv3PAmlP381vY9NYYTN3LgPd7IsgTe4j | |
[2017-05-22 11:06:31,094,INFO] [ProbeModule.log:?] | |
[2017-05-22 11:06:31,094,INFO] [ProbeModule.log:?] {"prime":"f69fad5ead496144c9442ce13c829bc29d4f5a5478ec3402ab881114d54d0856","vatnumber":"TW42846418","partnerkey":"y7jnsIiNTv3PAmlP381vY9NYYTN3LgPd7IsgTe4j","merchantid":"staging","amount":790,"currency":"TWD","ptradeid":"FB1234","orderid":"FB1234","details":"newProduct - Pink","cardholder":{"phonenumber":"+886961003642","name":"馮彥永","email":"tempo@zaoo.com","zip":"","addr":"","nationalid":""},"instalment":0,"authtocapperiodinday":0,"remember":false} | |
[2017-05-22 11:06:31,094,INFO] [ProbeModule.log:?] --> END POS |
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
[2017-05-20 10:05:45,444,INFO] [ProbeModule.log:?] --> POST https://sandbox.tappayapis.com/tpc/partner/directpay/paybyprime http/1.1 | |
[2017-05-20 10:05:45,444,INFO] [ProbeModule.log:?] Content-Type: application/json; charset=UTF-8 | |
[2017-05-20 10:05:45,444,INFO] [ProbeModule.log:?] Content-Length: 420 | |
[2017-05-20 10:05:45,444,INFO] [ProbeModule.log:?] x-api-key: y7jnsIiNTv3PAmlP381vY9NYYTN3LgPd7IsgTe4j | |
[2017-05-20 10:05:45,448,INFO] [ProbeModule.log:?] | |
[2017-05-20 10:05:45,448,INFO] [ProbeModule.log:?] {"prime":"f69fad5ead496144c9442ce13c829bc29d4f5a5478ec3402ab881114d54d0856","vatnumber":"TW42846418","partnerkey":"y7jnsIiNTv3PAmlP381vY9NYYTN3LgPd7IsgTe4j","merchantid":"staging","amount":790,"currency":"TWD","ptradeid":"FB1234","orderid":"FB1234","details":"測試資料","cardholder":{"phonenumber":"0912345670","name":"楊雅雯","email":"wraecca@gmail.com"},"instalment":0,"authtocapperiodinday":0,"remember":false} | |
[2017-05-20 10:05:45,448,INFO] [ProbeModule.log:?] --> END POST (420-byte body) | |
[2017-05-20 10:05:45,810,INFO] |