diff --git a/src/App.js b/src/App.js index fa38ed5d..8b74b719 100644 --- a/src/App.js +++ b/src/App.js @@ -153,6 +153,8 @@ class App extends React.Component { comboStakeRegCoin: "2000000", comboVoteDelegTarget: "", // Gov actions + gaMetadataURL: "https://raw.githubusercontent.com/Ryun1/metadata/main/cip100/ga.jsonld", + gaMetadataHash: "d57d30d2d03298027fde6d1c887c65da2b98b7ddefab189dcadab9a1d6792fee", constURL: "", constHash: "", treasuryTarget: "", @@ -480,6 +482,8 @@ class App extends React.Component { comboStakeRegCoin: "2000000", comboVoteDelegTarget: "", // Gov actions + gaMetadataURL: "https://raw.githubusercontent.com/Ryun1/metadata/main/cip100/ga.jsonld", + gaMetadataHash: "d57d30d2d03298027fde6d1c887c65da2b98b7ddefab189dcadab9a1d6792fee", constURL: "", constHash: "", treasuryTarget: "", @@ -1271,8 +1275,8 @@ class App extends React.Component { } const constChangeGovAct = GovernanceAction.new_new_constitution_action(constChange); // Create anchor and then reset state - const anchorURL = URL.new(this.state.cip95MetadataURL); - const anchorHash = AnchorDataHash.from_hex(this.state.cip95MetadataHash); + const anchorURL = URL.new(this.state.gaMetadataURL); + const anchorHash = AnchorDataHash.from_hex(this.state.gaMetadataHash); const anchor = Anchor.new(anchorURL, anchorHash); // Lets just use the connect wallet's reward address const rewardAddr = RewardAddress.from_address(Address.from_bech32(this.state.rewardAddress)); @@ -1296,8 +1300,8 @@ class App extends React.Component { const infoAction = InfoAction.new(); const infoGovAct = GovernanceAction.new_info_action(infoAction); // Create anchor and then reset state - const anchorURL = URL.new(this.state.cip95MetadataURL); - const anchorHash = AnchorDataHash.from_hex(this.state.cip95MetadataHash); + const anchorURL = URL.new(this.state.gaMetadataURL); + const anchorHash = AnchorDataHash.from_hex(this.state.gaMetadataHash); const anchor = Anchor.new(anchorURL, anchorHash); // Lets just use the connect wallet's reward address const rewardAddr = RewardAddress.from_address(Address.from_bech32(this.state.rewardAddress)); @@ -1332,8 +1336,8 @@ class App extends React.Component { } const treasuryGovAct = GovernanceAction.new_treasury_withdrawals_action(treasuryAction); // Create anchor and then reset state - const anchorURL = URL.new(this.state.cip95MetadataURL); - const anchorHash = AnchorDataHash.from_hex(this.state.cip95MetadataHash); + const anchorURL = URL.new(this.state.gaMetadataURL); + const anchorHash = AnchorDataHash.from_hex(this.state.gaMetadataHash); const anchor = Anchor.new(anchorURL, anchorHash); // Lets just use the connect wallet's reward address const rewardAddr = RewardAddress.from_address(Address.from_bech32(this.state.rewardAddress)); @@ -1383,8 +1387,8 @@ class App extends React.Component { const updateComGovAct = GovernanceAction.new_new_committee_action(updateComAction); // Create anchor and then reset state - const anchorURL = URL.new(this.state.cip95MetadataURL); - const anchorHash = AnchorDataHash.from_hex(this.state.cip95MetadataHash); + const anchorURL = URL.new(this.state.gaMetadataURL); + const anchorHash = AnchorDataHash.from_hex(this.state.gaMetadataHash); const anchor = Anchor.new(anchorURL, anchorHash); // Lets just use the connect wallet's reward address const rewardAddr = RewardAddress.from_address(Address.from_bech32(this.state.rewardAddress)); @@ -1415,8 +1419,8 @@ class App extends React.Component { } const noConfidenceGovAct = GovernanceAction.new_no_confidence_action(noConfidenceAction); // Create anchor and then reset state - const anchorURL = URL.new(this.state.cip95MetadataURL); - const anchorHash = AnchorDataHash.from_hex(this.state.cip95MetadataHash); + const anchorURL = URL.new(this.state.gaMetadataURL); + const anchorHash = AnchorDataHash.from_hex(this.state.gaMetadataHash); const anchor = Anchor.new(anchorURL, anchorHash); // Lets just use the connect wallet's reward address const rewardAddr = RewardAddress.from_address(Address.from_bech32(this.state.rewardAddress)); @@ -1463,8 +1467,8 @@ class App extends React.Component { } const parameterChangeGovAct = GovernanceAction.new_parameter_change_action(parameterChangeAction); // Create anchor and then reset state - const anchorURL = URL.new(this.state.cip95MetadataURL); - const anchorHash = AnchorDataHash.from_hex(this.state.cip95MetadataHash); + const anchorURL = URL.new(this.state.gaMetadataURL); + const anchorHash = AnchorDataHash.from_hex(this.state.gaMetadataHash); const anchor = Anchor.new(anchorURL, anchorHash); // Lets just use the connect wallet's reward address const rewardAddr = RewardAddress.from_address(Address.from_bech32(this.state.rewardAddress)); @@ -1495,8 +1499,8 @@ class App extends React.Component { } const hardForkInitiationGovAct = GovernanceAction.new_hard_fork_initiation_action(hardForkInitiationAction); // Create anchor and then reset state - const anchorURL = URL.new(this.state.cip95MetadataURL); - const anchorHash = AnchorDataHash.from_hex(this.state.cip95MetadataHash); + const anchorURL = URL.new(this.state.gaMetadataURL); + const anchorHash = AnchorDataHash.from_hex(this.state.gaMetadataHash); const anchor = Anchor.new(anchorURL, anchorHash); // Lets just use the connect wallet's reward address const rewardAddr = RewardAddress.from_address(Address.from_bech32(this.state.rewardAddress)); @@ -1826,8 +1830,8 @@ class App extends React.Component { this.setState({cip95MetadataURL: event.target.value})} - defaultValue={this.state.cip95MetadataURL} + onChange={(event) => this.setState({gaMetadataURL: event.target.value})} + defaultValue={this.state.gaMetadataURL} /> @@ -1837,7 +1841,8 @@ class App extends React.Component { this.setState({cip95MetadataHash: event.target.value})} + onChange={(event) => this.setState({gaMetadataHash: event.target.value})} + defaultValue={this.state.gaMetadataHash} /> @@ -1861,8 +1866,9 @@ class App extends React.Component { } /> - +

For convenience we limit to adding or removing only one credential at a time.

} /> - +

WIP because hardfork actions are unable to be enacted on SanchoNet yet.

+

WIP because this only allows changing of stake key deposit to 0.

- +

For convenience we only allow withdrawal to one address.

@@ -2645,7 +2653,7 @@ class App extends React.Component {
{this.state.cip95ResultTx !== '' && this.state.cip95ResultHash !== '' && ( <> -
🚀 Transaction built, sign and submitted successfully 🚀
+
🚀 Transaction signed and submitted successfully 🚀
)}

Tx Hash: {this.state.cip95ResultHash}