The purpose of this repo is to provide a quick example of how to wrap an existing contract to enable RallyTransact gasless transactions and then call the contract from a simple Flutter app. In this example we wrap the Orb Attestation contract with a contract that supports RallyTransact gasless transactions. The contract wrapper is implemented in /contracts/src/OrbAttestationWrapper.sol
and an example flutter app calling the contracts is at /app
.
The example app calls the transfer()
method on the Orb Attestation contract using the following test inputs.
{
"token": "0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582",
"fromProfileId": "702",
"from": "0xfebc231959550ffecd1ad1ae22a3d6bb55471b6a",
"toProfileId": "246",
"to": "0x16a88c2c2285d609f703cb6970c2f96a84e722ec",
"amount": "10",
"contentURI": "ar://Vqspq5PLryNC_2yAL80TwoKcwtk1uCTcCs7JJRENRqk",
"erc721Id": "0",
"isERC20": true
}
An example test transaction showing successful contract execution can be found here
Note: there are two examples of supporting RallyTransact with the existing OrbAttestation contract.
-
contracts/src/OrbAttestationWrapper
a wrapper contract that wraps the existing contract with a contract that supports RallyTransact -
contracts/src/OrbAttestationRallyTransact.sol
a contract that extends the existing Orb Attestation contract to support RallyTransact.