Cleanup for staking mainnet beta deployment (#35)
This commit is contained in:
parent
419d683b8c
commit
5f7445cd15
|
@ -2,3 +2,4 @@
|
|||
/borsh
|
||||
/pool
|
||||
/token
|
||||
/stake-ui
|
||||
|
|
|
@ -35,34 +35,64 @@ export type Network = {
|
|||
};
|
||||
|
||||
export const networks: Networks = {
|
||||
mainnet: {
|
||||
// Cluster.
|
||||
label: 'Mainnet Beta',
|
||||
url: 'https://solana-api.projectserum.com',
|
||||
explorerClusterSuffix: '',
|
||||
|
||||
srm: new PublicKey('SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt'),
|
||||
msrm: new PublicKey('MSRMcoVyrFxnSgo5uXwone5SKcGhT1KEJMFEkMEWf9L'),
|
||||
srmFaucet: null,
|
||||
msrmFaucet: null,
|
||||
god: new PublicKey('FhmUh2PEpTzUwBWPt4qgDBeqfmb2ES3T64CkT1ZiktSS'),
|
||||
megaGod: new PublicKey('FhmUh2PEpTzUwBWPt4qgDBeqfmb2ES3T64CkT1ZiktSS'),
|
||||
registryProgramId: new PublicKey(
|
||||
'Gw1XNGbSnx7PJcHTTuxxhWfkjjPmq29Qkv1hWbVFnrDp',
|
||||
),
|
||||
lockupProgramId: new PublicKey(
|
||||
'6GSn1woRF541HaiEWqNofYn8quzJuRBPi1nwoho8zNnh',
|
||||
),
|
||||
metaEntityProgramId: new PublicKey(
|
||||
'9etE5ZjHZTrZ2wQfyfTSp5WBxjpvaakNJa5fSVToZn17',
|
||||
),
|
||||
registrar: new PublicKey('4VuXXLYZ6zztpj6xV2v8pqfAA9rJMUcQznhcL945bYxg'),
|
||||
rewardEventQueue: new PublicKey(
|
||||
'3pYWVc4cEum5PyVyZFPBK5WDAwCu6SZMSQhv7KcSmbu8',
|
||||
),
|
||||
safe: new PublicKey('9GWd7WDUbeYSQ7LYu4KVE99Ards2mmXGi3bRhiptBvdx'),
|
||||
defaultEntity: new PublicKey(
|
||||
'52saNiBhPsjnkXnHp4rJ3QKWXxKimzkzwcZstBFLeybZ',
|
||||
),
|
||||
},
|
||||
devnet: {
|
||||
// Cluster.
|
||||
label: 'Devnet',
|
||||
url: 'https://devnet.solana.com',
|
||||
explorerClusterSuffix: 'devnet',
|
||||
|
||||
srmFaucet: new PublicKey('9q8NhG9U95S1M3NZGunKnXRpZ81LW65tAzzHgyknNj2r'),
|
||||
msrmFaucet: new PublicKey('6oAY2zRqF6dfGNCQSVGF6PB2dFgrtsajQCssvFCpC3Cm'),
|
||||
srm: new PublicKey('4Ghge2MMPmWXeD2FR541akGhjjgUi7RUtk7DBP5bTwGB'),
|
||||
msrm: new PublicKey('5PsAVQLCrgtKqZpLdg7HsTXHMcvVCQ1c4bFHHej8Axxn'),
|
||||
god: new PublicKey('7YbS8znK1eY3p6z1Xo6eCyx7XFyZPBs1mTdVCLsFGCqc'),
|
||||
megaGod: new PublicKey('GDhZrqcjUMJokqm6cjhyMXheBxxvUkfq3Q8YUtZ6BdCm'),
|
||||
srm: new PublicKey('GuYiNEona74SWyXUPH6YJiRjsGsXWUKDWxbYGTdfhq9Q'),
|
||||
msrm: new PublicKey('8a14E5uo9KReuGc3g6zy49p7pFSCdD6KCAGswKchQXwf'),
|
||||
srmFaucet: new PublicKey('dCxamz14WkfVspagG2ATKPqYnnnkbi6gbtBStEGJmye'),
|
||||
msrmFaucet: new PublicKey('BAhCxLPhxKH5DV8tKPryncbA5WgAiF6SjhET7u9vGNn2'),
|
||||
god: new PublicKey('9qx4JwgrAjqSDTv2fZh7ZJw5YGSgJrCsrVq7a3WNEnaW'),
|
||||
megaGod: new PublicKey('7BagAJ5fCGkG2SUQs7bsot3rC4mKJ3reqJLA1Yaav1PC'),
|
||||
registryProgramId: new PublicKey(
|
||||
'FigXetJcXogqm94qfmyKWy6U5KJAwtxSgJMjUHercVQp',
|
||||
'91A57picJWot5GPS5Dfc7bbqzfBPzHHtJ74bD7oetFnn',
|
||||
),
|
||||
lockupProgramId: new PublicKey(
|
||||
'CiNaYvdnQ42BNdbKvvAapHxiP18pvc3Vk5WuZ59ia64x',
|
||||
'4s2YYCY6JxiVBz6hNbFAkDFEvECU3xZWa6QxXdCPZteK',
|
||||
),
|
||||
metaEntityProgramId: new PublicKey(
|
||||
'8wfM5sd5Yivn4WWkcSp4pNua7ytDvjeyLVLaU3QWiLAT',
|
||||
'HbuSt513LQ2UiUCNDxV6q3QJAFf1iwyVfgChRoSAyGGA',
|
||||
),
|
||||
registrar: new PublicKey('BB8JRs7FUTawxV6QELRGoNus2TNaMg1egG9rKosxCiAW'),
|
||||
registrar: new PublicKey('39i6gAwhJsYuH7vLiLUmx5LuZxmqHp9FXB9sbRHQeGkF'),
|
||||
rewardEventQueue: new PublicKey(
|
||||
'5Ch6eHTC9rXHk5pLe9EfdYxWYUdtBpN9FY5xuH8BLawg',
|
||||
'Bj6BYeBZ5eJW3GtGze49Sf625Cp6jBFdhMdwdYVQaNEc',
|
||||
),
|
||||
safe: new PublicKey('3CuTNekgrJykh6ukB8Ty7Y6V5gTX4DD3p38HLYAtqV6c'),
|
||||
safe: new PublicKey('HhctHe6D4GhWPJykBdga4U35HVMynoaDiwhj24vK3FNG'),
|
||||
defaultEntity: new PublicKey(
|
||||
'BUvnMzShmicx2uiw2sJSRSHp19DLSfDijnYbwezAncwG',
|
||||
'7Aob4UzZsNnNZbiHUFS1h5JNUGDRBT4FjnLdAAKpp298',
|
||||
),
|
||||
},
|
||||
|
||||
|
@ -73,28 +103,28 @@ export const networks: Networks = {
|
|||
url: 'http://localhost:8899',
|
||||
explorerClusterSuffix: 'localhost',
|
||||
|
||||
srm: new PublicKey('3XNS3gbTcCjZojbVdMH1E6vHH9Dddc5CrhsDRGSV1wZL'),
|
||||
msrm: new PublicKey('7DZVnF2YpmiuyVG8sBFrvgUioq4s9r6y6hwAXKgAVFxT'),
|
||||
srmFaucet: null,
|
||||
msrmFaucet: null,
|
||||
srm: new PublicKey('2kU9eab4BbXZx4k7FhJdwe4gzc1bSEqASiohzq3BKsaY'),
|
||||
msrm: new PublicKey('8e4kjAnCZkMUx2XVdRSZg8JQ2nXXfy8GWQWCXrNKrQad'),
|
||||
god: new PublicKey('DNcaasMboG4AdfW2T81A6YiB6vo26zU38aXmaddgL1c'),
|
||||
megaGod: new PublicKey('Gj6XnPBYEvKQWtejiVqBnbUfaLXZ5WuozU39nnMhMyMN'),
|
||||
god: new PublicKey('5rhDZHRmUxYWbbesPUuoWJWi6TQNV2vqPrRmSShfDRVS'),
|
||||
megaGod: new PublicKey('B2tJ6tuaUyPFdWFQkhuYDhDoVjq2FZRGfQzf9FxJ5F42'),
|
||||
registryProgramId: new PublicKey(
|
||||
'DUuGKXGUeQhN9bsDJ3bhN8XQPaNiivNnqYRyREP6mL79',
|
||||
'2HmKKSTrk5Np7F5a5AvcrcaHuQahwpWRyJV2U2MY3Y6k',
|
||||
),
|
||||
lockupProgramId: new PublicKey(
|
||||
'2dHazPdUjqRBnF7qh2NeCgKCW5B5fYgYtXRtxkpvjUbf',
|
||||
'4DgjvXBztdWL9PwdRbvx7VmJ1nyDRzjzBzM6vr3xFBFH',
|
||||
),
|
||||
metaEntityProgramId: new PublicKey(
|
||||
'CbBi6FvvuNwkwjzULY2giDrcMrE8RCYh1LXpvsYiDMsJ',
|
||||
'4Ab8DDqvMyRZgr52Txiv1gxCBCt8rQCZqwJoDDfTd4TM',
|
||||
),
|
||||
registrar: new PublicKey('HCCd9pShhv158orEyA2BGRsvEQ8zEg2aqHHACNCwn3MR'),
|
||||
registrar: new PublicKey('DkfLodT4UupSCQSs1YedxjxDmdPqFn1NQEmT5mLNY2ZD'),
|
||||
rewardEventQueue: new PublicKey(
|
||||
'GzYK3YuHgGRoZ57ByKQUbTBbXkXaMAEo7KXNgFe6bxoN',
|
||||
'HhQxMLGDBx7eQgsX1om7Mcw5oQ7nFQBB74HUddiEw35m',
|
||||
),
|
||||
safe: new PublicKey('3PA8hDnUjyooFnc2f6WUDwnNBrVNN1CmCC5GC6fM6HY2'),
|
||||
safe: new PublicKey('EBbNTwe3Dkwdbb4MA7dSqkm9ecCe3Q5LetFjxy6fvzuB'),
|
||||
defaultEntity: new PublicKey(
|
||||
'791GDmb4RMZk7PJfczahw5fTubbSxgonWjtmsWmmUoAn',
|
||||
'DppBnhqkdLKhEkZ6qHTpKxAXQ9rziPboYYU1wjqokdgN',
|
||||
),
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "@project-serum/lockup-ui",
|
||||
"name": "@project-serum/stake-ui",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"homepage": "https://project-serum.github.io/serum-ts/lockup-ui/",
|
||||
"homepage": "https://project-serum.github.io/serum-ts/stake-ui/",
|
||||
"dependencies": {
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
|
@ -36,7 +36,7 @@
|
|||
"web-vitals": "^0.2.4"
|
||||
},
|
||||
"scripts": {
|
||||
"deploy:app": "rm -rf ../../docs/lockup-ui && mv ./build ../../docs/lockup-ui/",
|
||||
"deploy:app": "rm -rf ../../docs/stake-ui && mv ./build ../../docs/stake-ui/",
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test:ui": "react-scripts test",
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
@ -4,17 +4,16 @@ import Typography from '@material-ui/core/Typography';
|
|||
import Button from '@material-ui/core/Button';
|
||||
import IconButton from '@material-ui/core/IconButton';
|
||||
import Brightness1Icon from '@material-ui/icons/Brightness1';
|
||||
import * as skin from '../../skin';
|
||||
import Link from '@material-ui/core/Link';
|
||||
import { State as StoreState, BootstrapState } from '../../store/reducer';
|
||||
import Messaging from './Messaging';
|
||||
|
||||
export default function Footer() {
|
||||
const [chatDisplay, setChatDisplay] = useState(false);
|
||||
const [envDisplay, setEnvDisplay] = useState(false);
|
||||
const { isAppReady, isDisconnected, network, hasMember } = useSelector(
|
||||
const { isAppReady, isDisconnected, hasMember } = useSelector(
|
||||
(state: StoreState) => {
|
||||
return {
|
||||
network: state.common.network,
|
||||
isAppReady:
|
||||
state.common.isWalletConnected &&
|
||||
state.common.bootstrapState === BootstrapState.Bootstrapped,
|
||||
|
@ -43,45 +42,75 @@ export default function Footer() {
|
|||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
position: 'absolute',
|
||||
bottom: '40px',
|
||||
left: '10px',
|
||||
borderRadius: '4px',
|
||||
background: '#272727',
|
||||
}}
|
||||
onClick={() => {
|
||||
setEnvDisplay(!envDisplay);
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'column',
|
||||
marginRight: '10px',
|
||||
}}
|
||||
>
|
||||
<Brightness1Icon
|
||||
style={{
|
||||
color: isAppReady
|
||||
? skin.instance().active
|
||||
: isDisconnected
|
||||
? '#ccc'
|
||||
: skin.instance().ready,
|
||||
fontSize: '12px',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<IconButton
|
||||
style={{
|
||||
paddingLeft: '10px',
|
||||
paddingRight: '10px',
|
||||
paddingTop: 0,
|
||||
paddingBottom: 0,
|
||||
color: 'inherit',
|
||||
padding: 0,
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
onClick={() => {
|
||||
setEnvDisplay(!envDisplay);
|
||||
}}
|
||||
>
|
||||
<Typography style={{ fontSize: '14px', fontWeight: 'bold' }}>
|
||||
{network.label}
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'column',
|
||||
marginRight: '10px',
|
||||
}}
|
||||
>
|
||||
<Brightness1Icon
|
||||
style={{
|
||||
color: isDisconnected ? '#ccc' : 'rgb(60, 195, 215)',
|
||||
fontSize: '12px',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<Typography
|
||||
style={{ color: '#fff', fontSize: '14px', fontWeight: 'bold' }}
|
||||
>
|
||||
{'Environment'}
|
||||
</Typography>
|
||||
</IconButton>
|
||||
</div>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div style={{ marginLeft: 'auto', marginRight: 'auto', display: 'flex' }}>
|
||||
<FooterButton
|
||||
href={
|
||||
'https://github.com/project-serum/serum-dex/blob/master/docs/staking.md'
|
||||
}
|
||||
label={'Technical Documentation'}
|
||||
/>
|
||||
<FooterButton
|
||||
href={'https://github.com/project-serum/awesome-serum'}
|
||||
label={'Developer Resources'}
|
||||
/>
|
||||
<FooterButton
|
||||
href={'https://discord.com/channels/739225212658122886'}
|
||||
label={'Discord'}
|
||||
/>
|
||||
<FooterButton href={'https://t.me/ProjectSerum'} label={'Telegram'} />
|
||||
<FooterButton
|
||||
href={'https://github.com/project-serum'}
|
||||
label={'GitHub'}
|
||||
/>
|
||||
<FooterButton
|
||||
href={'https://solanabeach.io/'}
|
||||
label={'Solana Network'}
|
||||
isEnd={true}
|
||||
/>
|
||||
{hasMember && isAppReady && (
|
||||
<div
|
||||
style={{ display: 'none' /*'flex'*/ }}
|
||||
|
@ -111,7 +140,7 @@ export default function Footer() {
|
|||
overflowY: 'scroll',
|
||||
position: 'fixed',
|
||||
bottom: '30px',
|
||||
left: 0,
|
||||
right: 0,
|
||||
width: '500px',
|
||||
height: '400px',
|
||||
borderTopLeftRadius: '4px',
|
||||
|
@ -227,3 +256,27 @@ function NetworkEnvironment() {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
type FooterButtonProps = {
|
||||
label: string;
|
||||
href: string;
|
||||
isEnd?: boolean;
|
||||
};
|
||||
|
||||
function FooterButton(props: FooterButtonProps) {
|
||||
const { label, href, isEnd } = props;
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'column',
|
||||
marginRight: isEnd ? '' : '15px',
|
||||
}}
|
||||
>
|
||||
<Link href={href} target="_blank" color="inherit">
|
||||
<Typography style={{ fontSize: '14px' }}>{label}</Typography>
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -26,10 +26,20 @@ export default function Layout(props: PropsWithChildren<Props>) {
|
|||
backgroundColor: 'rgb(251, 251, 251)',
|
||||
}}
|
||||
>
|
||||
<RiskBar />
|
||||
<Header isAppReady={isAppReady} />
|
||||
<div
|
||||
style={{
|
||||
position: 'fixed',
|
||||
width: '100%',
|
||||
zIndex: 99,
|
||||
}}
|
||||
>
|
||||
<RiskBar />
|
||||
<Header isAppReady={isAppReady} />
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
marginTop: '94px',
|
||||
flex: 1,
|
||||
display: 'flex',
|
||||
marginBottom: '30px', // Compensates for the fixed position footer.
|
||||
|
@ -65,7 +75,7 @@ function RiskBar() {
|
|||
}}
|
||||
>
|
||||
<Typography style={{ fontSize: '14px' }}>
|
||||
This is unaudited software. Use at your own risk.
|
||||
Stake is unaudited software. Use at your own risk.
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
|
@ -441,6 +441,7 @@ function TransferDialog(props: TransferDialogProps) {
|
|||
return {
|
||||
srmMint: network.srm,
|
||||
msrmMint: network.msrm,
|
||||
member: state.registry.member,
|
||||
};
|
||||
});
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
|
@ -520,9 +521,15 @@ function TransferDialog(props: TransferDialogProps) {
|
|||
variant="outlined"
|
||||
mint={mint}
|
||||
decimals={!mint ? undefined : mint.equals(srmMint) ? 6 : 0}
|
||||
onChange={(f: PublicKey, maxDisplayAmount: BN) => {
|
||||
onChange={(f: PublicKey, _maxDisplayAmount: BN) => {
|
||||
setFrom(f);
|
||||
setMaxDisplayAmount(maxDisplayAmount.toNumber());
|
||||
// TODO: set an actual limit for the withdrawal UI (i.e.
|
||||
// what's currently in the vault). Currently not
|
||||
// done since we dont' have websocket connections
|
||||
// for each of the users accounts. However we
|
||||
// still use the "max" amount for display vesting
|
||||
// accounts.
|
||||
setMaxDisplayAmount(2 ** 53);
|
||||
}}
|
||||
/>
|
||||
<FormHelperText>
|
|
@ -258,7 +258,7 @@ export const initialState: State = {
|
|||
isWalletConnected: false,
|
||||
walletProvider: 'https://www.sollet.io',
|
||||
bootstrapState: BootstrapState.NeedsBootstrap,
|
||||
network: networks.devnet,
|
||||
network: networks.mainnet,
|
||||
ownedTokenAccounts: [],
|
||||
},
|
||||
lockup: {
|
Loading…
Reference in New Issue