We hope you never need to do this, but feel it’s an important thing to document just in case.
The great thing about building a system on top of a smart contract is that nobody can stop you from interacting with it. You don’t need to depend on a company, a website, or even — as we’ll describe in this article — any special software.
Transactions in Ethereum
In order to interact with a smart contract you must send transactions to it. Typically with a dapp you will use metamask or some similar software which does this for you, but it’s useful to understand what is happening when you do this.
Ethereum transactions primarily consist of the following two attributes:
- Value: This is the amount of Ether (ETH) that is sent along with this transaction. If the transaction succeeds, this amount of ETH will be subtracted from the sending account and added to the receiving account (or smart contract). When interacting with the SportCrypt smart contract, the value will always be 0 (zero) except for deposit transactions.
- Data: A chunk of extra data that is to be sent along with the transaction. This contains the details of what you intend to do with the contract, such as trade, withdraw, etc. For normal transfers between regular accounts (ie not to a smart contract) the data is typically empty.
How to withdraw your full balance
If you can’t use the SportCrypt web interface for whatever reason, it is easy to construct a transaction that withdraws your entire balance.
Step 1: Open MetaMask and click the SEND button to initiate a transaction:

Step 2: When the SEND TRANSACTION dialog opens, fill in the following values (see below for explanation and copyable versions):

The values to enter are:
- Recipient Address: Use the SportCrypt smart contract’s address:
0x37304b0ab297f13f5520c523102797121182fb5b
- Amount: This is what metmask calls the value. Just enter 0 (zero) since you don’t need to send any ETH with this transaction (but you’ll still need enough in your account to pay the gas for the withdrawal transaction):
0
- Data: This is a special field for invoking methods on a smart contract. This is what you would send to withdraw your entire balance:
0x2e1a7d4dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
The 2e1a7d4d
part is the hash of the normalized signature of the withdraw method, and the ffffff...
part is the largest possible uint256
value.
You don’t need to worry about cancelling orders since withdrawing your collateral will automatically cancel them.
What Else?
The above instructions only describe how to withdraw your full balance without using the dapp. Doing other operations like claiming winnings is also possible, but a bit more complicated. To learn more you can start by reading our smart contract’s source code or checking out an existing claim transaction.
Lastly, in the event that SportCrypt stops finalizing matches, there is a recovery mechanism built into the smart contract so that after a waiting period matches can be cancelled and funds returned to the participants. See section 5.8 of our whitepaper for full details on this.
Conclusion
Again, we hope you never need to use this, but just the fact that you can if you need to demonstrates an important feature of dapps and SportCrypt in particular.