Skip to content

Commit

Permalink
PRO-2728-pm_getERC20TokenQuotes_endpoint (#140)
Browse files Browse the repository at this point in the history
* added pm_getERC20TokenQuotes method

* updated package version

* bug fixes

* added amoy chain on default
  • Loading branch information
vignesha22 authored Sep 30, 2024
1 parent 52599e6 commit 484d88f
Show file tree
Hide file tree
Showing 6 changed files with 481 additions and 128 deletions.
20 changes: 20 additions & 0 deletions backend/config.json.default
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,26 @@
"MultiTokenPaymasterOracleUsed": "chainlink",
"entryPoint": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
},
{
"chainId": 80002,
"bundler": "https://testnet-rpc.etherspot.io/v1/80002",
"contracts": {
"etherspotPaymasterAddress": "0xe893a26dd53b325bffaacdfa224692eff4c448c4"
},
"thresholdValue": "0.01",
"MultiTokenPaymasterOracleUsed": "chainlink",
"entryPoint": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
},
{
"chainId": 80002,
"bundler": "https://testnet-rpc.etherspot.io/v2/80002",
"contracts": {
"etherspotPaymasterAddress": "0x9ddB9DC20E904206823184577e9C571c713d2c57"
},
"thresholdValue": "0.01",
"MultiTokenPaymasterOracleUsed": "chainlink",
"entryPoint": "0x0000000071727De22E5E9d8BAf0edAc6f37da032"
},
{
"chainId": 84532,
"bundler": "https://testnet-rpc.etherspot.io/v1/84532",
Expand Down
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arka",
"version": "1.5.4",
"version": "1.6.0",
"description": "ARKA - (Albanian for Cashier's case) is the first open source Paymaster as a service software",
"type": "module",
"directories": {
Expand Down
222 changes: 222 additions & 0 deletions backend/src/abi/ERC20Abi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
export default [
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "balance",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "owner",
"type": "address"
},
{
"indexed": true,
"name": "spender",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
]
1 change: 1 addition & 0 deletions backend/src/constants/ErrorMessage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
CONTEXT_NOT_ARRAY: 'Context sent is not an array',
INVALID_DATA: 'Invalid data provided',
INVALID_SPONSORSHIP_POLICY: 'Invalid sponsorship policy data',
INVALID_SPONSORSHIP_POLICY_ID: 'Invalid sponsorship policy id',
Expand Down
Loading

0 comments on commit 484d88f

Please sign in to comment.