-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathexample.sol
More file actions
26 lines (19 loc) · 813 Bytes
/
Copy pathexample.sol
File metadata and controls
26 lines (19 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
pragma solidity ^0.4.11;
// TextMessage.ETH Contract Methods
contract TextMessage {
function sendText(string phoneNumber, string textBody) payable public; // requires minimum wei payment
function costWei() constant returns (uint); // returns minimum wei amount for SMS message
}
contract example {
uint txtCost;
address txtAddr = 0xA221c8dF14434e700fD3af96a96b7a3B66beCAed; // ropsten testnet
TextMessage txt = TextMessage(txtAddr);
function example() public { }
function deposit() public payable {
}
function sendMsg() payable public {
txtCost = txt.costWei();
// encrypt your values at https://cjx.io/encrypt?value=18055555555
txt.sendText.value(txtCost).gas(80000)("7b3031af5b66cf99bfe3f297467cd446", "716e01d0ecc1021a09fd27758fa377d5");
}
}