-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #751 from kaleido-io/fftm
Add first step of FireFly Transaction Manager support - separate URL for submit
- Loading branch information
Showing
11 changed files
with
153 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
"ffimethods", | ||
"ffresty", | ||
"ffstruct", | ||
"FFTM", | ||
"fftypes", | ||
"finalizers", | ||
"Hyperledger", | ||
|
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
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
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
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules | ||
package-lock.json | ||
artifacts | ||
cache | ||
cache | ||
typechain-types |
32 changes: 32 additions & 0 deletions
32
smart_contracts/ethereum/solidity_firefly/hardhat.config.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,32 @@ | ||
import { HardhatUserConfig } from 'hardhat/config'; | ||
import '@nomiclabs/hardhat-etherscan'; | ||
import '@nomiclabs/hardhat-waffle'; | ||
import '@typechain/hardhat'; | ||
import 'hardhat-gas-reporter'; | ||
import 'solidity-coverage'; | ||
|
||
// You need to export an object to set up your config | ||
// Go to https://hardhat.org/config/ to learn more | ||
|
||
const config: HardhatUserConfig = { | ||
solidity: "0.8.4", | ||
defaultNetwork: "firefly-cli", | ||
networks: { | ||
'firefly-cli': { | ||
url: "http://127.0.0.1:5100" | ||
}, | ||
rinkeby: { | ||
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_PROJECT_ID}`, | ||
accounts: [`${process.env.RINKEBY_PRIVATE_KEY}`] | ||
} | ||
}, | ||
gasReporter: { | ||
enabled: process.env.REPORT_GAS !== undefined, | ||
currency: 'USD', | ||
}, | ||
etherscan: { | ||
apiKey: process.env.ETHERSCAN_API_KEY, | ||
}, | ||
}; | ||
|
||
export default config; |
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 |
---|---|---|
@@ -1,7 +1,19 @@ | ||
{ | ||
"name": "@hyperledger/assettrail-contracts", | ||
"name": "@hyperledger/firefly-contracts", | ||
"version": "0.0.1", | ||
"dependencies": { | ||
"truffle": "^5.4.32" | ||
"devDependencies": { | ||
"@nomiclabs/hardhat-ethers": "^2.0.5", | ||
"@nomiclabs/hardhat-etherscan": "^3.0.3", | ||
"@nomiclabs/hardhat-waffle": "^2.0.3", | ||
"@typechain/ethers-v5": "^10.0.0", | ||
"@typechain/hardhat": "^6.0.0", | ||
"ethers": "^5.6.4", | ||
"hardhat": "^2.9.3", | ||
"hardhat-gas-reporter": "^1.0.8", | ||
"solidity-coverage": "^0.7.20", | ||
"truffle": "^5.5.10", | ||
"ts-node": "^10.7.0", | ||
"typechain": "^8.0.0", | ||
"typescript": "^4.6.3" | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
smart_contracts/ethereum/solidity_firefly/scripts/deploy.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,28 @@ | ||
// We require the Hardhat Runtime Environment explicitly here. This is optional | ||
// but useful for running the script in a standalone fashion through `node <script>`. | ||
// | ||
// When running the script with `npx hardhat run <script>` you'll find the Hardhat | ||
// Runtime Environment's members available in the global scope. | ||
import { ethers } from "hardhat"; | ||
|
||
async function main() { | ||
// Hardhat always runs the compile task when running scripts with its command | ||
// line interface. | ||
// | ||
// If this script is run directly using `node` you may want to call compile | ||
// manually to make sure everything is compiled | ||
// await hre.run('compile'); | ||
|
||
// We get the contract to deploy | ||
const Firefly = await ethers.getContractFactory("Firefly"); | ||
const firefly = await Firefly.deploy(); | ||
await firefly.deployed(); | ||
console.log("FireFly contract deployed to:", firefly.address); | ||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main().catch((error) => { | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); |