-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: deploy user smart contracts (#1200)
# Related Github tickets - VolumeFi#159 # Background Deploy any smart contract to any supported Paloma chain via the CLI using the Pigeon Feed functionality for paying for message relays. The PR adds a CLI interface to interact with user-defined smart contracts: - Upload new contract to Paloma. The contract will be available to be deploy in any of our target chains. - List contracts. Users can see their contracts and deployment status, as well as target addresses when successfully deployed. - Remove contract. Delete the contract from Paloma. - Deploy contract. Trigger deployment of a previously uploaded smart contract to any of our target chains. # Testing completed - [x] test coverage exists or has been added/updated - [x] tested in a private testnet # Breaking changes - [x] I have checked my code for breaking changes - [x] If there are breaking changes, there is a supporting migration.
- Loading branch information
Showing
54 changed files
with
6,449 additions
and
915 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
17 changes: 17 additions & 0 deletions
17
proto/palomachain/paloma/evm/set_smart_contract_deployers_proposal.proto
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,17 @@ | ||
syntax = "proto3"; | ||
package palomachain.paloma.evm; | ||
|
||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/palomachain/paloma/x/evm/types"; | ||
|
||
message SetSmartContractDeployersProposal { | ||
message Deployer { | ||
string chainReferenceID = 1; | ||
string contractAddress = 2; | ||
} | ||
|
||
string title = 1; | ||
string summary = 2; | ||
repeated Deployer deployers = 3 [ (gogoproto.nullable) = false ]; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
syntax = "proto3"; | ||
package palomachain.paloma.evm; | ||
|
||
import "cosmos_proto/cosmos.proto"; | ||
|
||
option go_package = "github.com/palomachain/paloma/x/evm/types"; | ||
|
||
// UserSmartContract defines user-uploaded smart contracts | ||
// We keep them in storage, so users can decide to deploy them anywhere | ||
message UserSmartContract { | ||
message Deployment { | ||
enum Status { | ||
PENDING = 0; | ||
IN_FLIGHT = 1; | ||
ACTIVE = 2; | ||
ERROR = 3; | ||
} | ||
|
||
string chain_reference_id = 1; | ||
Status status = 2; | ||
string address = 3; | ||
int64 created_at_block_height = 4; | ||
int64 updated_at_block_height = 5; | ||
} | ||
|
||
string author = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; | ||
uint64 id = 2; | ||
string title = 3; | ||
string abi_json = 4; | ||
string bytecode = 5; | ||
string constructor_input = 6; | ||
repeated Deployment deployments = 7; | ||
int64 created_at_block_height = 8; | ||
int64 updated_at_block_height = 9; | ||
} |
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,10 @@ | ||
package blocks | ||
|
||
const ( | ||
// dailyBlocks estimated with a block time of 1.5s | ||
dailyHeight = 57_600 | ||
DailyHeight = dailyHeight | ||
WeeklyHeight = dailyHeight * 7 | ||
MonthlyHeight = dailyHeight * 30 | ||
YearlyHeight = dailyHeight * 365 | ||
) |
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
Oops, something went wrong.