Skip to content

Commit

Permalink
Revert "Feat/pow support (#143)" (#158)
Browse files Browse the repository at this point in the history
This reverts commit fc3602c.
  • Loading branch information
AquiGorka authored and noryev committed Jun 17, 2024
1 parent 5f4d635 commit 7d30546
Show file tree
Hide file tree
Showing 30 changed files with 30 additions and 2,624 deletions.
51 changes: 0 additions & 51 deletions cmd/lilypad/pow_signal.go

This file was deleted.

1 change: 0 additions & 1 deletion cmd/lilypad/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ func NewRootCmd() *cobra.Command {

RootCmd.AddCommand(newSolverCmd())
RootCmd.AddCommand(newResourceProviderCmd())
RootCmd.AddCommand(newPowSignalCmd())
RootCmd.AddCommand(newRunCmd())
RootCmd.AddCommand(newMediatorCmd())
RootCmd.AddCommand(newJobCreatorCmd())
Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ require (
github.com/ethereum/go-ethereum v1.13.4
github.com/fatih/color v1.15.0
github.com/go-git/go-git/v5 v5.10.0
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.5.0
github.com/hashicorp/go-retryablehttp v0.7.4
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/holiman/uint256 v1.2.4
github.com/ipfs/go-merkledag v0.11.0
github.com/rs/zerolog v1.31.0
github.com/spf13/cobra v1.7.0
Expand Down Expand Up @@ -48,8 +45,10 @@ require (
github.com/go-stack/stack v1.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/holiman/uint256 v1.2.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/ipfs/bbloom v0.0.4 // indirect
github.com/ipfs/go-block-format v0.0.3 // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,10 @@ github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZn
github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw=
github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao=
github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU=
github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E=
github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o=
github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw=
github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
Expand Down
15 changes: 1 addition & 14 deletions hardhat/contracts/LilypadController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ contract LilypadController is ILilypadController, Ownable, Initializable {
address private paymentsAddress;
address private mediationAddress;
address private jobCreatorAddress;
address private powAddress;

ILilypadStorage private storageContract;
ILilypadPayments private paymentsContract;
Expand All @@ -36,15 +35,13 @@ contract LilypadController is ILilypadController, Ownable, Initializable {
address _usersAddress,
address _paymentsAddress,
address _mediationAddress,
address _jobCreatorAddress,
address _powAddress
address _jobCreatorAddress
) public initializer {
setStorageAddress(_storageAddress);
setUsersAddress(_usersAddress);
setPaymentsAddress(_paymentsAddress);
setMediationAddress(_mediationAddress);
setJobCreatorAddress(_jobCreatorAddress);
setPowAddress(_powAddress);
}

function setStorageAddress(address _storageAddress) public onlyOwner {
Expand Down Expand Up @@ -95,16 +92,6 @@ contract LilypadController is ILilypadController, Ownable, Initializable {
return jobCreatorAddress;
}

function setPowAddress(address _powAddress) public onlyOwner {
require(_powAddress != address(0), "Users address");
powAddress = _powAddress;
}

function getPowAddress() public view returns(address) {
return powAddress;
}


/**
* Agreements
*/
Expand Down
153 changes: 0 additions & 153 deletions hardhat/contracts/LilypadPow.sol

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const deployController: DeployFunction = async function (hre: HardhatRuntimeEnvi
const mediationContract = await deployments.get('LilypadMediationRandom')
const paymentsContract = await deployments.get('LilypadPayments')
const jobCreatorContract = await deployments.get('LilypadOnChainJobCreator')
const powContract = await deployments.get('LilypadPow')

await execute(
'LilypadController',
Expand All @@ -32,8 +31,7 @@ const deployController: DeployFunction = async function (hre: HardhatRuntimeEnvi
usersContract.address,
paymentsContract.address,
mediationContract.address,
jobCreatorContract.address,
powContract.address
jobCreatorContract.address
)

await execute(
Expand Down
28 changes: 0 additions & 28 deletions hardhat/deploy/007_deploy_pow.ts

This file was deleted.

7 changes: 2 additions & 5 deletions hardhat/scripts/print-contract-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import {
getJobManagerAddress,
getPaymentsAddress,
getStorageAddress,
getUsersAddress,
getPoWAddress
getUsersAddress
} from '../utils/web3'

async function main() {
Expand All @@ -17,8 +16,7 @@ async function main() {
const paymentsAddress = await getPaymentsAddress()
const storageAddress = await getStorageAddress()
const usersAddress = await getUsersAddress()
const powAddress = await getPoWAddress()


console.log(`export WEB3_RPC_URL=ws://localhost:8546`)
console.log(`export WEB3_CONTROLLER_ADDRESS=${controllerAddress}`)
console.log(`export WEB3_TOKEN_ADDRESS=${tokenAddress}`)
Expand All @@ -27,7 +25,6 @@ async function main() {
console.log(`export WEB3_PAYMENTS_ADDRESS=${paymentsAddress}`)
console.log(`export WEB3_STORAGE_ADDRESS=${storageAddress}`)
console.log(`export WEB3_USERS_ADDRESS=${usersAddress}`)
console.log(`export WEB3_POW_ADDRESS=${powAddress}`)
}

main().catch((error) => {
Expand Down
14 changes: 0 additions & 14 deletions hardhat/utils/web3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
LilypadOnChainJobCreator,
LilypadUsers,
ExampleClient,
LilypadPow,
} from '../typechain-types'

/*
Expand Down Expand Up @@ -248,16 +247,3 @@ export async function connectController() {
export async function getControllerAddress() {
return getContractAddress('LilypadController')
}

/*
pow
*/
export async function connectPow() {
return connectContract<LilypadPow>('LilypadPow')
}

export async function getPoWAddress() {
return getContractAddress('LilypadPow')
}
Loading

0 comments on commit 7d30546

Please sign in to comment.