ecpay_expo/app/(tabs)/shared.tsx
2024-12-22 22:22:06 +05:30

197 lines
3.6 KiB
TypeScript

export const CHAIN_ID = 421614; // Arbitrum Sepolia
export const CONTRACT_ADDRESS = '0x6b6F4a57Ca3ADfCF5526455c47bc91fF4b7C86A0';
//Old contract: 0xa9B7B85cFB7eD8C57b92086C52c63E3c01eac0C0
/*
inputs: [
{
internalType: "address",
name: "receiver",
type: "address",
}
],
*/
//New contract: 0xad36caE443aBa3130a5a01F76F19B89b5C8118FA
// export const contractABI = [
// {
// inputs: [],
// name: "transferETH",
// outputs: [],
// stateMutability: "payable",
// type: "function"
// }
// ];
export const projectId = 'e3a443e9ea8dbf483ef28f1d4f8393de';
export const providerMetadata = {
name: 'ECPAY',
description: 'Pay merchants with EASE',
url: 'https://vps.playpoolstudios.com',
icons: ['https://example.com/icon.png'],
redirect: {
native: 'ecpay://',
universal: 'https://example.com',
},
};
export const contractABI =[
{
"inputs": [
{
"internalType": "string",
"name": "receiver",
"type": "string"
}
],
"name": "transferETH",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_recipient",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "contractBalance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getAllTransactions",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "string",
"name": "receiver",
"type": "string"
},
{
"internalType": "bytes32",
"name": "txHash",
"type": "bytes32"
}
],
"internalType": "struct ETHTransfer.Transaction[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_receiver",
"type": "string"
}
],
"name": "getTransactionsByReceiver",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "string",
"name": "receiver",
"type": "string"
},
{
"internalType": "bytes32",
"name": "txHash",
"type": "bytes32"
}
],
"internalType": "struct ETHTransfer.Transaction[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "recipient",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "transactions",
"outputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "string",
"name": "receiver",
"type": "string"
},
{
"internalType": "bytes32",
"name": "txHash",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
}
]