Skip to content

Commit

Permalink
feat: Add missing chains to Cayenne
Browse files Browse the repository at this point in the history
  • Loading branch information
DashKash54 committed Nov 17, 2023
1 parent 181e953 commit 196438a
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 0 deletions.
138 changes: 138 additions & 0 deletions apps/html/manual_tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,126 @@
});
};

var ETHOnBase = async () => {
const accessControlConditions = [
{
contractAddress: '',
standardContractType: '',
chain: 'base',
method: 'eth_getBalance',
parameters: [':userAddress', 'latest'],
returnValueTest: {
comparator: '>=',
value: '0',
},
},
];
await testProvisoningAndSigning({
accessControlConditions,
testName: 'ETHOnBase',
});
};

var ETHOnBaseGoerli = async () => {
const accessControlConditions = [
{
contractAddress: '',
standardContractType: '',
chain: 'baseGoerli',
method: 'eth_getBalance',
parameters: [':userAddress', 'latest'],
returnValueTest: {
comparator: '>=',
value: '0',
},
},
];
await testProvisoningAndSigning({
accessControlConditions,
testName: 'ETHOnBaseGoerli',
});
};

var ETHOnLukso = async () => {
const accessControlConditions = [
{
contractAddress: '',
standardContractType: '',
chain: 'lukso',
method: 'eth_getBalance',
parameters: [':userAddress', 'latest'],
returnValueTest: {
comparator: '>=',
value: '0',
},
},
];
await testProvisoningAndSigning({
accessControlConditions,
testName: 'ETHOnLukso',
});
};

var ETHOnLuksoTestnet = async () => {
const accessControlConditions = [
{
contractAddress: '',
standardContractType: '',
chain: 'luksoTestnet',
method: 'eth_getBalance',
parameters: [':userAddress', 'latest'],
returnValueTest: {
comparator: '>=',
value: '0',
},
},
];
await testProvisoningAndSigning({
accessControlConditions,
testName: 'ETHOnLuksoTestnet',
});
};

var ETHOnZora = async () => {
const accessControlConditions = [
{
contractAddress: '',
standardContractType: '',
chain: 'zora',
method: 'eth_getBalance',
parameters: [':userAddress', 'latest'],
returnValueTest: {
comparator: '>=',
value: '0',
},
},
];
await testProvisoningAndSigning({
accessControlConditions,
testName: 'ETHOnZora',
});
};

var ETHOnZoraGoerli = async () => {
const accessControlConditions = [
{
contractAddress: '',
standardContractType: '',
chain: 'zoraGoerli',
method: 'eth_getBalance',
parameters: [':userAddress', 'latest'],
returnValueTest: {
comparator: '>=',
value: '0',
},
},
];
await testProvisoningAndSigning({
accessControlConditions,
testName: 'ETHOnZoraGoerli',
});
};

var ETHOnZksyncTestnet = async () => {
const accessControlConditions = [
{
Expand Down Expand Up @@ -1635,6 +1755,24 @@ <h1>Manual tests</h1>
<button onclick="ETHOnZksync()">ETHOnZksync</button>
<br />
<br />
<button onclick="ETHOnBase()">ETHOnBase</button>
<br />
<br />
<button onclick="ETHOnBaseGoerli()">ETHOnBaseGoerli</button>
<br />
<br />
<button onclick="ETHOnLukso()">ETHOnLukso</button>
<br />
<br />
<button onclick="ETHOnLuksoTestnet()">ETHOnLuksoTestnet</button>
<br />
<br />
<button onclick="ETHOnZora()">ETHOnZora</button>
<br />
<br />
<button onclick="ETHOnZoraGoerli()">ETHOnZoraGoerli</button>
<br />
<br />
<button onclick="ETHOnZksyncTestnet()">ETHOnZksyncTestnet</button>
<br />
<br />
Expand Down
55 changes: 55 additions & 0 deletions packages/constants/src/lib/constants/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,61 @@ export const LIT_CHAINS: LITChain<LITEVMChain> = {
type: null,
vmType: 'EVM',
},
base: {
contractAddress: null,
chainId: 8453,
name: 'Base Mainnet',
symbol: 'ETH',
decimals: 18,
rpcUrls: ['https://mainnet.base.org'],
blockExplorerUrls: ['https://basescan.org'],
type: null,
vmType: 'EVM',
},
lukso: {
contractAddress: null,
chainId: 42,
name: 'Lukso',
symbol: 'ETH',
decimals: 18,
rpcUrls: ['https://rpc.lukso.gateway.fm'],
blockExplorerUrls: ['https://explorer.execution.mainnet.lukso.network/'],
type: null,
vmType: 'EVM',
},
luksoTestnet: {
contractAddress: null,
chainId: 4201,
name: 'Lukso Testnet',
symbol: 'ETH',
decimals: 18,
rpcUrls: ['https://rpc.testnet.lukso.network'],
blockExplorerUrls: ['https://explorer.execution.testnet.lukso.network'],
type: null,
vmType: 'EVM',
},
zora: {
contractAddress: null,
chainId: 7777777,
name: ' Zora',
symbol: 'ETH',
decimals: 18,
rpcUrls: ['https://rpc.zora.energy/'],
blockExplorerUrls: ['https://explorer.zora.energy'],
type: null,
vmType: 'EVM',
},
zoraGoerli: {
contractAddress: null,
chainId: 999,
name: 'Zora Goerli',
symbol: 'ETH',
decimals: 18,
rpcUrls: ['https://testnet.rpc.zora.energy'],
blockExplorerUrls: ['https://testnet.explorer.zora.energy'],
type: null,
vmType: 'EVM',
},
zksyncTestnet: {
contractAddress: null,
chainId: 280,
Expand Down

0 comments on commit 196438a

Please sign in to comment.