Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add artifact for eth conversion proxy
- Loading branch information
Showing
4 changed files
with
220 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
import { deployOne } from './deploy-one'; | ||
|
||
export default async function deploy( | ||
args: { chainlinkConversionPathAddress?: string; ethFeeProxyAddress?: string }, | ||
hre: HardhatRuntimeEnvironment, | ||
) { | ||
const contractName = 'EthConversionProxy'; | ||
|
||
if (!args.chainlinkConversionPathAddress) { | ||
// FIXME: should try to retrieve information from artifacts instead | ||
console.error( | ||
`Missing ChainlinkConversionPath on ${hre.network.name}, cannot deploy ${contractName}.`, | ||
); | ||
return; | ||
} | ||
if (!args.ethFeeProxyAddress) { | ||
// FIXME: should try to retrieve information from artifacts instead | ||
console.error(`Missing EthereumFeeProxy on ${hre.network.name}, cannot deploy ${contractName}.`); | ||
return; | ||
} | ||
|
||
return deployOne(args, hre, contractName, [ | ||
args.ethFeeProxyAddress, | ||
args.chainlinkConversionPathAddress, | ||
]); | ||
} |
163 changes: 163 additions & 0 deletions
163
packages/smart-contracts/src/lib/artifacts/EthConversionProxy/0.1.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
{ | ||
"abi": [ | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "_paymentProxyAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_chainlinkConversionPathAddress", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "address", | ||
"name": "currency", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "bytes", | ||
"name": "paymentReference", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "feeAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "maxRateTimespan", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "TransferWithConversionAndReference", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "address", | ||
"name": "to", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "amount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "bytes", | ||
"name": "paymentReference", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "feeAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "address", | ||
"name": "feeAddress", | ||
"type": "address" | ||
} | ||
], | ||
"name": "TransferWithReferenceAndFee", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "chainlinkConversionPath", | ||
"outputs": [ | ||
{ | ||
"internalType": "contract ChainlinkConversionPath", | ||
"name": "", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "paymentProxy", | ||
"outputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "_to", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "_requestAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "address[]", | ||
"name": "_path", | ||
"type": "address[]" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "_paymentReference", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "_feeAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_feeAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "_maxRateTimespan", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "transferFromWithReferenceAndFee", | ||
"outputs": [], | ||
"stateMutability": "payable", | ||
"type": "function" | ||
} | ||
] | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/smart-contracts/src/lib/artifacts/EthConversionProxy/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ContractArtifact } from '../../ContractArtifact'; | ||
|
||
import { abi as ABI_0_1_0 } from './0.1.0.json'; | ||
import type { EthConversionProxy } from '../../../types/EthConversionProxy'; | ||
|
||
export const ethConversionArtifact = new ContractArtifact<EthConversionProxy>( | ||
{ | ||
'0.1.0': { | ||
abi: ABI_0_1_0, | ||
deployment: { | ||
private: { | ||
address: '0x8273e4B8ED6c78e252a9fCa5563Adfcc75C91b2A', | ||
creationBlockNumber: 0, | ||
}, | ||
}, | ||
}, | ||
}, | ||
'0.1.0', | ||
); |